v1

latestOpenAPI 3.0.02026-07-249055687.1 KB
repo-labels

Get repository label setting (beta)

Retrieve the setting (e.g. security/license policy) for a repository label.

Note that repository label settings currently only support issueRules, issueRulesPolicyDefault, licensePolicy, and recentlyPublishedThresholdMs. A policy is considered "active" for a given repository label if the issueRulesPolicyDefault is set, and inactive when not set. issueRules can be used to further refine the alert triage strategy.

This endpoint consumes 1 unit of your quota.

This endpoint requires the following org token scopes:

  • repo-label:list
get/orgs/{org_slug}/repos/labels/{label_id}/label-setting

Path parameters

org_slugstring required

The slug of the organization

label_idstring required

The ID of the label

Query parameters

setting_keystring required

Setting key to query for in the repository label. Valid values include issueRules, issueRulesPolicyDefault, licensePolicy, and recentlyPublishedThresholdMs

Response

Returns the setting for the specified repository label. The authenticated user must be a member of the organization.

issueRulesPolicyDefault'default' | 'low' | 'medium' | 'high' nullable

The default security policy for the repository label

licensePolicyobject nullable
recentlyPublishedThresholdMsinteger nullable

The recently published package alert threshold for the repository label, in milliseconds