@@ -22,6 +22,7 @@ children:
|
||||
- /outside-collaborators
|
||||
- /personal-access-tokens
|
||||
- /rules
|
||||
- /rule-suites
|
||||
- /security-managers
|
||||
- /webhooks
|
||||
autogenerated: rest
|
||||
|
||||
14
content/rest/orgs/rule-suites.md
Normal file
14
content/rest/orgs/rule-suites.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Rule Suites
|
||||
shortTitle: Rule Suites
|
||||
intro: 'Use the REST API to manage rule suites for organizations.'
|
||||
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
autogenerated: rest
|
||||
allowTitleToDifferFromFilename: true
|
||||
---
|
||||
|
||||
<!-- Content after this section is automatically generated -->
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Rules
|
||||
shortTitle: Rules
|
||||
intro: >-
|
||||
Use the rulesets API to manage rulesets for repositories. Organization
|
||||
Use the REST API to manage rulesets for organizations. Organization
|
||||
rulesets control how people can interact with selected branches and tags in
|
||||
repositories in an organization.
|
||||
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
|
||||
|
||||
@@ -21,6 +21,7 @@ children:
|
||||
- /lfs
|
||||
- /repos
|
||||
- /rules
|
||||
- /rule-suites
|
||||
- /tags
|
||||
autogenerated: rest
|
||||
---
|
||||
|
||||
14
content/rest/repos/rule-suites.md
Normal file
14
content/rest/repos/rule-suites.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Rule Suites
|
||||
shortTitle: Rule Suites
|
||||
intro: 'Use the REST API to manage rule suites for repositories.'
|
||||
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
autogenerated: rest
|
||||
allowTitleToDifferFromFilename: true
|
||||
---
|
||||
|
||||
<!-- Content after this section is automatically generated -->
|
||||
@@ -153,7 +153,6 @@ const oldVariableRegex = /{{\s*?site\.data\..*?}}/g
|
||||
// - {{ octicon-plus An example label }}
|
||||
//
|
||||
const oldOcticonRegex = /{{\s*?octicon-([a-z-]+)(\s[\w\s\d-]+)?\s*?}}/g
|
||||
|
||||
const relativeArticleLinkErrorText = 'Found unexpected relative article links:'
|
||||
const languageLinkErrorText = 'Found article links with hard-coded language codes:'
|
||||
const versionLinkErrorText = 'Found article links with hard-coded version numbers:'
|
||||
@@ -328,15 +327,13 @@ describe('lint markdown content', () => {
|
||||
isTranscript,
|
||||
isTranscriptLanding,
|
||||
hasExperimentalAlternative,
|
||||
frontmatterData,
|
||||
rawContent
|
||||
frontmatterData
|
||||
|
||||
beforeAll(async () => {
|
||||
const fileContents = await fs.readFile(markdownAbsPath, 'utf8')
|
||||
const { data, content: bodyContent } = frontmatter(fileContents)
|
||||
|
||||
content = bodyContent
|
||||
rawContent = fileContents
|
||||
frontmatterData = data
|
||||
ast = fromMarkdown(content)
|
||||
isHidden = data.hidden === true
|
||||
@@ -354,25 +351,6 @@ describe('lint markdown content', () => {
|
||||
})
|
||||
})
|
||||
|
||||
test('placeholder string is not present in any markdown files', async () => {
|
||||
// this article explains how to use todocs placeholder text so shouldn't fail this test
|
||||
if (
|
||||
markdownRelPath ===
|
||||
'content/contributing/collaborating-on-github-docs/using-the-todocs-placeholder-to-leave-notes.md' ||
|
||||
markdownRelPath === 'content/contributing/collaborating-on-github-docs/index.md'
|
||||
) {
|
||||
return
|
||||
}
|
||||
const matches = rawContent.match(placeholderRegex) || []
|
||||
const placeholderStr = matches.length === 1 ? 'placeholder' : 'placeholders'
|
||||
const errorMessage = `
|
||||
Found ${matches.length} ${placeholderStr} '${matches.join(
|
||||
', ',
|
||||
)}' in this file! Please update all placeholders.
|
||||
`
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
})
|
||||
|
||||
test('hidden docs must be Early Access, Site Policy, Search, Experimental, or Transcript', async () => {
|
||||
// We need to support some non-Early Access hidden docs in Site Policy
|
||||
if (isHidden) {
|
||||
@@ -403,94 +381,6 @@ describe('lint markdown content', () => {
|
||||
}
|
||||
})
|
||||
|
||||
test('relative URLs must start with "/"', async () => {
|
||||
const matches = links.filter((link) => {
|
||||
if (
|
||||
link.startsWith('http://') ||
|
||||
link.startsWith('https://') ||
|
||||
link.startsWith('tel:') ||
|
||||
link.startsWith('mailto:') ||
|
||||
link.startsWith('#') ||
|
||||
link.startsWith('/')
|
||||
)
|
||||
return false
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
const errorMessage = formatLinkError(relativeArticleLinkErrorText, matches)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
})
|
||||
|
||||
test('must not leak Early Access doc URLs', async () => {
|
||||
// Only execute for docs that are NOT Early Access
|
||||
if (!isEarlyAccess) {
|
||||
const matches = content.match(earlyAccessLinkRegex) || []
|
||||
const errorMessage = formatLinkError(earlyAccessLinkErrorText, matches)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
}
|
||||
})
|
||||
|
||||
test('must not leak Early Access image URLs', async () => {
|
||||
// Only execute for docs that are NOT Early Access
|
||||
if (!isEarlyAccess) {
|
||||
const matches = content.match(earlyAccessImageRegex) || []
|
||||
const errorMessage = formatLinkError(earlyAccessImageErrorText, matches)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
}
|
||||
})
|
||||
|
||||
test('must have correctly formatted Early Access image URLs', async () => {
|
||||
// Execute for ALL docs (not just Early Access) to ensure non-EA docs
|
||||
// are not leaking incorrectly formatted EA image URLs
|
||||
const matches = content.match(badEarlyAccessImageRegex) || []
|
||||
const errorMessage = formatLinkError(badEarlyAccessImageErrorText, matches)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
})
|
||||
|
||||
test('does not use old site.data variable syntax', async () => {
|
||||
const matches = content.match(oldVariableRegex) || []
|
||||
const matchesWithExample = matches.map((match) => {
|
||||
const example = match.replace(
|
||||
/{{\s*?site\.data\.([a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]+)+)\s*?}}/g,
|
||||
'{% data $1 %}',
|
||||
)
|
||||
return `${match} => ${example}`
|
||||
})
|
||||
const errorMessage = formatLinkError(oldVariableErrorText, matchesWithExample)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
})
|
||||
|
||||
test('does not use old octicon variable syntax', async () => {
|
||||
const matches = content.match(oldOcticonRegex) || []
|
||||
const errorMessage = formatLinkError(oldOcticonErrorText, matches)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
})
|
||||
|
||||
test('URLs must not contain a hard-coded language code', async () => {
|
||||
const matches = links.filter((link) => {
|
||||
return /\/(?:${languageCodes.join('|')})\//.test(link)
|
||||
})
|
||||
|
||||
const errorMessage = formatLinkError(languageLinkErrorText, matches)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
})
|
||||
|
||||
test('URLs must not contain a hard-coded domain name', async () => {
|
||||
const initialMatches = content.match(domainLinkRegex) || []
|
||||
|
||||
// Filter out some very specific false positive matches
|
||||
const matches = initialMatches.filter(() => {
|
||||
if (markdownRelPath === 'content/admin/all-releases.md') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
const errorMessage = formatLinkError(domainLinkErrorText, matches)
|
||||
expect(matches.length, errorMessage).toBe(0)
|
||||
})
|
||||
|
||||
test('contains no deprecated frontmatter properties', async () => {
|
||||
if (!isEarlyAccess) {
|
||||
const usedDeprecateProps = deprecatedProperties.filter((prop) => {
|
||||
|
||||
@@ -205,6 +205,24 @@
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
@@ -2799,6 +2817,24 @@
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "update-a-repository-ruleset",
|
||||
|
||||
@@ -3002,6 +3002,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/orgs/{org}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
@@ -3892,6 +3904,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
|
||||
@@ -249,6 +249,28 @@
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
@@ -3481,6 +3503,28 @@
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "update-a-repository-ruleset",
|
||||
|
||||
@@ -2606,6 +2606,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/orgs/{org}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
@@ -3520,6 +3532,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
|
||||
@@ -3068,6 +3068,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/orgs/{org}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
@@ -3958,6 +3970,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
|
||||
@@ -477,6 +477,24 @@
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
@@ -3457,6 +3475,24 @@
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"additional-permissions": [],
|
||||
"access": "write"
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "update-a-repository-ruleset",
|
||||
|
||||
@@ -3324,6 +3324,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/orgs/{org}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
@@ -4214,6 +4226,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
|
||||
@@ -577,6 +577,28 @@
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "orgs",
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
@@ -4275,6 +4297,28 @@
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"access": "write",
|
||||
"user-to-server": true,
|
||||
"server-to-server": true,
|
||||
"additional-permissions": []
|
||||
},
|
||||
{
|
||||
"category": "repos",
|
||||
"slug": "update-a-repository-ruleset",
|
||||
|
||||
@@ -2928,6 +2928,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/orgs/{org}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
@@ -3842,6 +3854,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
|
||||
@@ -3390,6 +3390,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/orgs/{org}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-organization-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-an-organization-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
@@ -4280,6 +4292,18 @@
|
||||
"verb": "post",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets"
|
||||
},
|
||||
{
|
||||
"slug": "list-repository-rule-suites",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-rule-suite",
|
||||
"subcategory": "rule-suites",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
|
||||
},
|
||||
{
|
||||
"slug": "get-a-repository-ruleset",
|
||||
"subcategory": "rules",
|
||||
|
||||
@@ -60,5 +60,5 @@
|
||||
"2022-11-28"
|
||||
]
|
||||
},
|
||||
"sha": "588349f3b71883016d36d3185aee4697ef812f41"
|
||||
"sha": "ffaf232180dbaff57ce08fa5490df44bbc606501"
|
||||
}
|
||||
@@ -361836,6 +361836,448 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"rule-suites": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites",
|
||||
"title": "List organization rule suites",
|
||||
"category": "orgs",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "org",
|
||||
"description": "<p>The organization name. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repository_name",
|
||||
"description": "<p>The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "time_period",
|
||||
"description": "<p>The time period to filter by.</p>\n<p>For example, <code>day</code> will filter for rule suites that occurred in the past 24 hours, and <code>week</code> will filter for insights that occurred in the past 7 days (168 hours).</p>",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"hour",
|
||||
"day",
|
||||
"week",
|
||||
"month"
|
||||
],
|
||||
"default": "day"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "actor_name",
|
||||
"description": "<p>The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_result",
|
||||
"description": "<p>The rule results to filter on. When specified, only suites with this result will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass",
|
||||
"all"
|
||||
],
|
||||
"default": "all"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "per_page",
|
||||
"description": "<p>The number of results per page (max 100).</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"description": "<p>Page number of the results to fetch.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"org": "ORG"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": [
|
||||
{
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"actor_id": 11,
|
||||
"username": "not-octocat",
|
||||
"before_sha": "48994e4e01ccc943624c6231f172702b82b233cc",
|
||||
"after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1",
|
||||
"ref": "refs/heads/i-am-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-07T08:43:03Z",
|
||||
"result": "pass",
|
||||
"evaluation_result": "fail"
|
||||
}
|
||||
],
|
||||
"schema": {
|
||||
"title": "Rule Suites",
|
||||
"description": "Response",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists suites of rule evaluations at the organization level.\nFor more information, see \"<a href=\"https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets\">Managing rulesets for repositories in your organization</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"title": "Get an organization rule suite",
|
||||
"category": "orgs",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "org",
|
||||
"description": "<p>The organization name. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_id",
|
||||
"description": "<p>The unique identifier of the rule suite result.\nTo get this ID, you can use <a href=\"https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites\">GET /repos/{owner}/{repo}/rulesets/rule-suites</a>\nfor repositories and <a href=\"https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites\">GET /orgs/{org}/rulesets/rule-suites</a>\nfor organizations.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"org": "ORG",
|
||||
"rule_suite_id": "RULE_SUITE_ID"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": {
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass",
|
||||
"evaluation_result": "fail",
|
||||
"rule_evaluations": [
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 2,
|
||||
"name": "Author email must be a GitHub email address"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "pass",
|
||||
"rule_type": "commit_author_email_pattern"
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "protected_branch"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "fail",
|
||||
"rule_type": "pull_request",
|
||||
"details": "Changes must be made through a pull request."
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 3,
|
||||
"name": "Evaluate commit message pattern"
|
||||
},
|
||||
"enforcement": "evaluate",
|
||||
"result": "fail",
|
||||
"rule_type": "commit_message_pattern"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"title": "Rule Suite",
|
||||
"description": "Response",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
},
|
||||
"rule_evaluations": {
|
||||
"type": "array",
|
||||
"description": "Details on the evaluated rules.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rule_source": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule source."
|
||||
},
|
||||
"id": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"description": "The ID of the rule source."
|
||||
},
|
||||
"name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "The name of the rule source."
|
||||
}
|
||||
}
|
||||
},
|
||||
"enforcement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"evaluate",
|
||||
"deleted ruleset"
|
||||
],
|
||||
"description": "The enforcement level of this rule source."
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the evaluation of the individual rule."
|
||||
},
|
||||
"rule_type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule."
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"description": "Any associated details with the rule evaluation."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a suite of rule evaluations from within an organization.\nFor more information, see \"<a href=\"https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets\">Managing rulesets for repositories in your organization</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -482573,6 +483015,469 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"rule-suites": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites",
|
||||
"title": "List repository rule suites",
|
||||
"category": "repos",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "<p>The account owner of the repository. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "<p>The name of the repository without the <code>.git</code> extension. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ref",
|
||||
"description": "<p>The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-multi-segment": true
|
||||
},
|
||||
{
|
||||
"name": "time_period",
|
||||
"description": "<p>The time period to filter by.</p>\n<p>For example, <code>day</code> will filter for rule suites that occurred in the past 24 hours, and <code>week</code> will filter for insights that occurred in the past 7 days (168 hours).</p>",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"hour",
|
||||
"day",
|
||||
"week",
|
||||
"month"
|
||||
],
|
||||
"default": "day"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "actor_name",
|
||||
"description": "<p>The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_result",
|
||||
"description": "<p>The rule results to filter on. When specified, only suites with this result will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass",
|
||||
"all"
|
||||
],
|
||||
"default": "all"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "per_page",
|
||||
"description": "<p>The number of results per page (max 100).</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"description": "<p>Page number of the results to fetch.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"owner": "OWNER",
|
||||
"repo": "REPO"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": [
|
||||
{
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"actor_id": 11,
|
||||
"username": "not-octocat",
|
||||
"before_sha": "48994e4e01ccc943624c6231f172702b82b233cc",
|
||||
"after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1",
|
||||
"ref": "refs/heads/i-am-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-07T08:43:03Z",
|
||||
"result": "pass",
|
||||
"evaluation_result": "fail"
|
||||
}
|
||||
],
|
||||
"schema": {
|
||||
"title": "Rule Suites",
|
||||
"description": "Response",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists suites of rule evaluations at the repository level.\nFor more information, see \"<a href=\"https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets\">Managing rulesets for a repository</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"title": "Get a repository rule suite",
|
||||
"category": "repos",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "<p>The account owner of the repository. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "<p>The name of the repository without the <code>.git</code> extension. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_id",
|
||||
"description": "<p>The unique identifier of the rule suite result.\nTo get this ID, you can use <a href=\"https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites\">GET /repos/{owner}/{repo}/rulesets/rule-suites</a>\nfor repositories and <a href=\"https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites\">GET /orgs/{org}/rulesets/rule-suites</a>\nfor organizations.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"owner": "OWNER",
|
||||
"repo": "REPO",
|
||||
"rule_suite_id": "RULE_SUITE_ID"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": {
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass",
|
||||
"evaluation_result": "fail",
|
||||
"rule_evaluations": [
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 2,
|
||||
"name": "Author email must be a GitHub email address"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "pass",
|
||||
"rule_type": "commit_author_email_pattern"
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "protected_branch"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "fail",
|
||||
"rule_type": "pull_request",
|
||||
"details": "Changes must be made through a pull request."
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 3,
|
||||
"name": "Evaluate commit message pattern"
|
||||
},
|
||||
"enforcement": "evaluate",
|
||||
"result": "fail",
|
||||
"rule_type": "commit_message_pattern"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"title": "Rule Suite",
|
||||
"description": "Response",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
},
|
||||
"rule_evaluations": {
|
||||
"type": "array",
|
||||
"description": "Details on the evaluated rules.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rule_source": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule source."
|
||||
},
|
||||
"id": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"description": "The ID of the rule source."
|
||||
},
|
||||
"name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "The name of the rule source."
|
||||
}
|
||||
}
|
||||
},
|
||||
"enforcement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"evaluate",
|
||||
"deleted ruleset"
|
||||
],
|
||||
"description": "The enforcement level of this rule source."
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the evaluation of the individual rule."
|
||||
},
|
||||
"rule_type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule."
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"description": "Any associated details with the rule evaluation."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a suite of rule evaluations from within a repository.\nFor more information, see \"<a href=\"https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets\">Managing rulesets for a repository</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
|
||||
@@ -384132,6 +384132,448 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"rule-suites": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites",
|
||||
"title": "List organization rule suites",
|
||||
"category": "orgs",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "org",
|
||||
"description": "<p>The organization name. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repository_name",
|
||||
"description": "<p>The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "time_period",
|
||||
"description": "<p>The time period to filter by.</p>\n<p>For example, <code>day</code> will filter for rule suites that occurred in the past 24 hours, and <code>week</code> will filter for insights that occurred in the past 7 days (168 hours).</p>",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"hour",
|
||||
"day",
|
||||
"week",
|
||||
"month"
|
||||
],
|
||||
"default": "day"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "actor_name",
|
||||
"description": "<p>The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_result",
|
||||
"description": "<p>The rule results to filter on. When specified, only suites with this result will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass",
|
||||
"all"
|
||||
],
|
||||
"default": "all"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "per_page",
|
||||
"description": "<p>The number of results per page (max 100).</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"description": "<p>Page number of the results to fetch.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"org": "ORG"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": [
|
||||
{
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"actor_id": 11,
|
||||
"username": "not-octocat",
|
||||
"before_sha": "48994e4e01ccc943624c6231f172702b82b233cc",
|
||||
"after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1",
|
||||
"ref": "refs/heads/i-am-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-07T08:43:03Z",
|
||||
"result": "pass",
|
||||
"evaluation_result": "fail"
|
||||
}
|
||||
],
|
||||
"schema": {
|
||||
"title": "Rule Suites",
|
||||
"description": "Response",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists suites of rule evaluations at the organization level.\nFor more information, see \"<a href=\"https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets\">Managing rulesets for repositories in your organization</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"title": "Get an organization rule suite",
|
||||
"category": "orgs",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "org",
|
||||
"description": "<p>The organization name. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_id",
|
||||
"description": "<p>The unique identifier of the rule suite result.\nTo get this ID, you can use <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/repos/rule-suites#list-repository-rule-suites\">GET /repos/{owner}/{repo}/rulesets/rule-suites</a>\nfor repositories and <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/orgs/rule-suites#list-organization-rule-suites\">GET /orgs/{org}/rulesets/rule-suites</a>\nfor organizations.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"org": "ORG",
|
||||
"rule_suite_id": "RULE_SUITE_ID"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": {
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass",
|
||||
"evaluation_result": "fail",
|
||||
"rule_evaluations": [
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 2,
|
||||
"name": "Author email must be a GitHub email address"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "pass",
|
||||
"rule_type": "commit_author_email_pattern"
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "protected_branch"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "fail",
|
||||
"rule_type": "pull_request",
|
||||
"details": "Changes must be made through a pull request."
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 3,
|
||||
"name": "Evaluate commit message pattern"
|
||||
},
|
||||
"enforcement": "evaluate",
|
||||
"result": "fail",
|
||||
"rule_type": "commit_message_pattern"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"title": "Rule Suite",
|
||||
"description": "Response",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
},
|
||||
"rule_evaluations": {
|
||||
"type": "array",
|
||||
"description": "Details on the evaluated rules.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rule_source": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule source."
|
||||
},
|
||||
"id": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"description": "The ID of the rule source."
|
||||
},
|
||||
"name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "The name of the rule source."
|
||||
}
|
||||
}
|
||||
},
|
||||
"enforcement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"evaluate",
|
||||
"deleted ruleset"
|
||||
],
|
||||
"description": "The enforcement level of this rule source."
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the evaluation of the individual rule."
|
||||
},
|
||||
"rule_type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule."
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"description": "Any associated details with the rule evaluation."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a suite of rule evaluations from within an organization.\nFor more information, see \"<a href=\"https://docs.github.com/enterprise-cloud@latest//organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets\">Managing rulesets for repositories in your organization</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -504997,6 +505439,469 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"rule-suites": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites",
|
||||
"title": "List repository rule suites",
|
||||
"category": "repos",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "<p>The account owner of the repository. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "<p>The name of the repository without the <code>.git</code> extension. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ref",
|
||||
"description": "<p>The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-multi-segment": true
|
||||
},
|
||||
{
|
||||
"name": "time_period",
|
||||
"description": "<p>The time period to filter by.</p>\n<p>For example, <code>day</code> will filter for rule suites that occurred in the past 24 hours, and <code>week</code> will filter for insights that occurred in the past 7 days (168 hours).</p>",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"hour",
|
||||
"day",
|
||||
"week",
|
||||
"month"
|
||||
],
|
||||
"default": "day"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "actor_name",
|
||||
"description": "<p>The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_result",
|
||||
"description": "<p>The rule results to filter on. When specified, only suites with this result will be returned.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass",
|
||||
"all"
|
||||
],
|
||||
"default": "all"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "per_page",
|
||||
"description": "<p>The number of results per page (max 100).</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"description": "<p>Page number of the results to fetch.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"owner": "OWNER",
|
||||
"repo": "REPO"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": [
|
||||
{
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"actor_id": 11,
|
||||
"username": "not-octocat",
|
||||
"before_sha": "48994e4e01ccc943624c6231f172702b82b233cc",
|
||||
"after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1",
|
||||
"ref": "refs/heads/i-am-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-07T08:43:03Z",
|
||||
"result": "pass",
|
||||
"evaluation_result": "fail"
|
||||
}
|
||||
],
|
||||
"schema": {
|
||||
"title": "Rule Suites",
|
||||
"description": "Response",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists suites of rule evaluations at the repository level.\nFor more information, see \"<a href=\"https://docs.github.com/enterprise-cloud@latest//repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets\">Managing rulesets for a repository</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}",
|
||||
"title": "Get a repository rule suite",
|
||||
"category": "repos",
|
||||
"subcategory": "rule-suites",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "owner",
|
||||
"description": "<p>The account owner of the repository. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "repo",
|
||||
"description": "<p>The name of the repository without the <code>.git</code> extension. The name is not case sensitive.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule_suite_id",
|
||||
"description": "<p>The unique identifier of the rule suite result.\nTo get this ID, you can use <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/repos/rule-suites#list-repository-rule-suites\">GET /repos/{owner}/{repo}/rulesets/rule-suites</a>\nfor repositories and <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/orgs/rule-suites#list-organization-rule-suites\">GET /orgs/{org}/rulesets/rule-suites</a>\nfor organizations.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": true,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"owner": "OWNER",
|
||||
"repo": "REPO",
|
||||
"rule_suite_id": "RULE_SUITE_ID"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Response</p>",
|
||||
"example": {
|
||||
"id": 21,
|
||||
"actor_id": 12,
|
||||
"username": "octocat",
|
||||
"before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d",
|
||||
"after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01",
|
||||
"ref": "refs/heads/i-see-everything",
|
||||
"repository_id": 404,
|
||||
"repository_name": "octo-repo",
|
||||
"pushed_at": "2023-07-06T08:43:03Z",
|
||||
"result": "bypass",
|
||||
"evaluation_result": "fail",
|
||||
"rule_evaluations": [
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 2,
|
||||
"name": "Author email must be a GitHub email address"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "pass",
|
||||
"rule_type": "commit_author_email_pattern"
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "protected_branch"
|
||||
},
|
||||
"enforcement": "active",
|
||||
"result": "fail",
|
||||
"rule_type": "pull_request",
|
||||
"details": "Changes must be made through a pull request."
|
||||
},
|
||||
{
|
||||
"rule_source": {
|
||||
"type": "ruleset",
|
||||
"id": 3,
|
||||
"name": "Evaluate commit message pattern"
|
||||
},
|
||||
"enforcement": "evaluate",
|
||||
"result": "fail",
|
||||
"rule_type": "commit_message_pattern"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"title": "Rule Suite",
|
||||
"description": "Response",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "The unique identifier of the rule insight."
|
||||
},
|
||||
"actor_id": {
|
||||
"type": "integer",
|
||||
"description": "The number that identifies the user."
|
||||
},
|
||||
"actor_name": {
|
||||
"type": "string",
|
||||
"description": "The handle for the GitHub user account."
|
||||
},
|
||||
"before_sha": {
|
||||
"type": "string",
|
||||
"description": "The first commit sha before the push evaluation."
|
||||
},
|
||||
"after_sha": {
|
||||
"type": "string",
|
||||
"description": "The last commit sha in the push evaluation."
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "The ref name that the evaluation ran on."
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "integer",
|
||||
"description": "The ID of the repository associated with the rule evaluation."
|
||||
},
|
||||
"repository_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the repository without the `.git` extension."
|
||||
},
|
||||
"pushed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"examples": [
|
||||
"2011-01-26T19:06:43Z"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"bypass"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` enforcement status."
|
||||
},
|
||||
"evaluation_result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`."
|
||||
},
|
||||
"rule_evaluations": {
|
||||
"type": "array",
|
||||
"description": "Details on the evaluated rules.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rule_source": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule source."
|
||||
},
|
||||
"id": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"description": "The ID of the rule source."
|
||||
},
|
||||
"name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "The name of the rule source."
|
||||
}
|
||||
}
|
||||
},
|
||||
"enforcement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"evaluate",
|
||||
"deleted ruleset"
|
||||
],
|
||||
"description": "The enforcement level of this rule source."
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
],
|
||||
"description": "The result of the evaluation of the individual rule."
|
||||
},
|
||||
"rule_type": {
|
||||
"type": "string",
|
||||
"description": "The type of rule."
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"description": "Any associated details with the rule evaluation."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a suite of rule evaluations from within a repository.\nFor more information, see \"<a href=\"https://docs.github.com/enterprise-cloud@latest//repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets\">Managing rulesets for a repository</a>.\"</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>OK</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "404",
|
||||
"description": "<p>Resource not found</p>"
|
||||
},
|
||||
{
|
||||
"httpStatusCode": "500",
|
||||
"description": "<p>Internal Error</p>"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
|
||||
@@ -36,5 +36,5 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"sha": "588349f3b71883016d36d3185aee4697ef812f41"
|
||||
"sha": "ffaf232180dbaff57ce08fa5490df44bbc606501"
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"sha": "588349f3b71883016d36d3185aee4697ef812f41"
|
||||
"sha": "ffaf232180dbaff57ce08fa5490df44bbc606501"
|
||||
}
|
||||
Reference in New Issue
Block a user