From b6248e6f6aec019e75ba2c8e189bfe89f36b7d01 Mon Sep 17 00:00:00 2001 From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Tue, 14 Oct 2025 10:29:25 -0400 Subject: [PATCH 01/16] Bump go-github from v75 to v76 in /scrape (#3783) --- scrape/apps.go | 2 +- scrape/apps_test.go | 2 +- scrape/go.mod | 2 +- scrape/go.sum | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scrape/apps.go b/scrape/apps.go index 8f9ca4d2c73..6fea3e38585 100644 --- a/scrape/apps.go +++ b/scrape/apps.go @@ -18,7 +18,7 @@ import ( "strings" "github.com/PuerkitoBio/goquery" - "github.com/google/go-github/v75/github" + "github.com/google/go-github/v76/github" ) // AppRestrictionsEnabled returns whether the specified organization has diff --git a/scrape/apps_test.go b/scrape/apps_test.go index da30574787d..25d10c010ba 100644 --- a/scrape/apps_test.go +++ b/scrape/apps_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/google/go-github/v75/github" + "github.com/google/go-github/v76/github" ) func Test_AppRestrictionsEnabled(t *testing.T) { diff --git a/scrape/go.mod b/scrape/go.mod index 2c2b9d45531..62e9c1cd792 100644 --- a/scrape/go.mod +++ b/scrape/go.mod @@ -5,7 +5,7 @@ go 1.24.0 require ( github.com/PuerkitoBio/goquery v1.10.3 github.com/google/go-cmp v0.7.0 - github.com/google/go-github/v75 v75.0.0 + github.com/google/go-github/v76 v76.0.0 github.com/xlzd/gotp v0.1.0 golang.org/x/net v0.46.0 ) diff --git a/scrape/go.sum b/scrape/go.sum index 61becaa67c8..81fcdc21ec3 100644 --- a/scrape/go.sum +++ b/scrape/go.sum @@ -6,8 +6,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-github/v75 v75.0.0 h1:k7q8Bvg+W5KxRl9Tjq16a9XEgVY1pwuiG5sIL7435Ic= -github.com/google/go-github/v75 v75.0.0/go.mod h1:H3LUJEA1TCrzuUqtdAQniBNwuKiQIqdGKgBo1/M/uqI= +github.com/google/go-github/v76 v76.0.0 h1:MCa9VQn+VG5GG7Y7BAkBvSRUN3o+QpaEOuZwFPJmdFA= +github.com/google/go-github/v76 v76.0.0/go.mod h1:38+d/8pYDO4fBLYfBhXF5EKO0wA3UkXBjfmQapFsNCQ= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/xlzd/gotp v0.1.0 h1:37blvlKCh38s+fkem+fFh7sMnceltoIEBYTVXyoa5Po= From 036aeb428b4df2297b476f281d1940b6e9d1c636 Mon Sep 17 00:00:00 2001 From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:53:56 -0400 Subject: [PATCH 02/16] Add custom jsonfieldname linter to ensure Go field name matches JSON tag name (#3757) --- .custom-gcl.yml | 8 +- .golangci.yml | 73 +++++- github/orgs.go | 2 +- tools/jsonfieldname/go.mod | 13 + tools/jsonfieldname/go.sum | 10 + tools/jsonfieldname/jsonfieldname.go | 232 ++++++++++++++++++ tools/jsonfieldname/jsonfieldname_test.go | 20 ++ .../testdata/src/has-warnings/main.go | 13 + .../testdata/src/no-warnings/main.go | 12 + 9 files changed, 377 insertions(+), 6 deletions(-) create mode 100644 tools/jsonfieldname/go.mod create mode 100644 tools/jsonfieldname/go.sum create mode 100644 tools/jsonfieldname/jsonfieldname.go create mode 100644 tools/jsonfieldname/jsonfieldname_test.go create mode 100644 tools/jsonfieldname/testdata/src/has-warnings/main.go create mode 100644 tools/jsonfieldname/testdata/src/no-warnings/main.go diff --git a/.custom-gcl.yml b/.custom-gcl.yml index 2aa94b1bb08..c116a82b1df 100644 --- a/.custom-gcl.yml +++ b/.custom-gcl.yml @@ -1,6 +1,8 @@ version: v2.2.2 plugins: - - module: "github.com/google/go-github/v75/tools/sliceofpointers" - path: ./tools/sliceofpointers - - module: "github.com/google/go-github/v75/tools/fmtpercentv" + - module: "github.com/google/go-github/v76/tools/fmtpercentv" path: ./tools/fmtpercentv + - module: "github.com/google/go-github/v76/tools/jsonfieldname" + path: ./tools/jsonfieldname + - module: "github.com/google/go-github/v76/tools/sliceofpointers" + path: ./tools/sliceofpointers diff --git a/.golangci.yml b/.golangci.yml index 673b9cd7cea..e64f5c11961 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,6 +16,7 @@ linters: - goheader - gosec - intrange + - jsonfieldname - misspell - musttag - nakedret @@ -142,11 +143,79 @@ linters: fmtpercentv: type: module description: Reports usage of %d or %s in format strings. - original-url: github.com/google/go-github/v75/tools/fmtpercentv + original-url: github.com/google/go-github/v76/tools/fmtpercentv + jsonfieldname: + type: module + description: Reports mismatches between Go field and JSON tag names. + original-url: github.com/google/go-github/v76/tools/jsonfieldname + settings: + allowed-exceptions: + - ActionsCacheUsageList.RepoCacheUsage # TODO: RepoCacheUsages ? + - AuditEntry.ExternalIdentityNameID + - AuditEntry.Timestamp + - CheckSuite.AfterSHA + - CheckSuite.BeforeSHA + - CodeSearchResult.CodeResults + - CodeSearchResult.Total + - CommitAuthor.Login + - CommitsSearchResult.Commits + - CommitsSearchResult.Total + - CreateOrgInvitationOptions.TeamID # TODO: TeamIDs + - DependencyGraphSnapshot.Sha # TODO: SHA + - Discussion.DiscussionCategory # TODO: Category ? + - EditOwner.OwnerInfo + - EnterpriseLicensedUsers.GithubComSamlNameID # TODO: GithubComSAMLNameID + - Event.RawPayload + - HookRequest.RawPayload + - HookResponse.RawPayload + - Issue.PullRequestLinks # TODO: PullRequest + - IssueImportRequest.IssueImport # TODO: Issue + - IssuesSearchResult.Issues # TODO: Items + - IssuesSearchResult.Total + - LabelsSearchResult.Labels # TODO: Items + - LabelsSearchResult.Total + - ListCheckRunsResults.Total + - ListCheckSuiteResults.Total + - ListCustomDeploymentRuleIntegrationsResponse.AvailableIntegrations + - ListDeploymentProtectionRuleResponse.ProtectionRules + - OrganizationCustomRepoRoles.CustomRepoRoles # TODO: CustomRoles + - OrganizationCustomRoles.CustomRepoRoles # TODO: Roles + - PreReceiveHook.ConfigURL + - ProjectV2ItemEvent.ProjectV2Item # TODO: ProjectsV2Item + - Protection.RequireLinearHistory # TODO: RequiredLinearHistory + - ProtectionRequest.RequireLinearHistory # TODO: RequiredLinearHistory + - PullRequestComment.InReplyTo # TODO: InReplyToID + - PullRequestReviewsEnforcementRequest.BypassPullRequestAllowancesRequest # TODO: BypassPullRequestAllowances + - PullRequestReviewsEnforcementRequest.DismissalRestrictionsRequest # TODO: DismissalRestrictions + - PullRequestReviewsEnforcementUpdate.BypassPullRequestAllowancesRequest # TODO: BypassPullRequestAllowances + - PullRequestReviewsEnforcementUpdate.DismissalRestrictionsRequest # TODO: DismissalRestrictions + - Reactions.MinusOne + - Reactions.PlusOne + - RepositoriesSearchResult.Repositories + - RepositoriesSearchResult.Total + - RepositoryVulnerabilityAlert.GitHubSecurityAdvisoryID + - SCIMDisplayReference.Ref + - SecretScanningAlertLocationDetails.Startline # TODO: StartLine + - SecretScanningPatternOverride.Bypassrate # TODO: BypassRate + - StarredRepository.Repository # TODO: Repo + - Timeline.Requester # TODO: ReviewRequester + - Timeline.Reviewer # TODO: RequestedReviewer + - TopicsSearchResult.Topics # TODO: Items + - TopicsSearchResult.Total + - TotalCacheUsage.TotalActiveCachesUsageSizeInBytes # TODO: TotalActiveCachesSizeInBytes + - TransferRequest.TeamID # TODO: TeamIDs + - Tree.Entries + - User.LdapDn # TODO: LDAPDN + - UsersSearchResult.Total + - UsersSearchResult.Users + - WeeklyStats.Additions + - WeeklyStats.Commits + - WeeklyStats.Deletions + - WeeklyStats.Week sliceofpointers: type: module description: Reports usage of []*string and slices of structs without pointers. - original-url: github.com/google/go-github/v75/tools/sliceofpointers + original-url: github.com/google/go-github/v76/tools/sliceofpointers exclusions: rules: - linters: diff --git a/github/orgs.go b/github/orgs.go index c810bfbb852..c7e4c412606 100644 --- a/github/orgs.go +++ b/github/orgs.go @@ -100,7 +100,7 @@ type Organization struct { // MembersCanDeleteRepositories toggles whether members with admin permissions can delete a repository. MembersCanDeleteRepositories *bool `json:"members_can_delete_repositories,omitempty"` // MembersCanChangeRepoVisibility toggles whether members with admin permissions can change the visibility for a repository. - MembersCanChangeRepoVisibility *bool `json:"members_can_change_repo_visiblilty,omitempty"` + MembersCanChangeRepoVisibility *bool `json:"members_can_change_repo_visibility,omitempty"` // MembersCanInviteOutsideCollaborators toggles whether members with admin permissions can invite outside collaborators. MembersCanInviteOutsideCollaborators *bool `json:"members_can_invite_outside_collaborators,omitempty"` // MembersCanDeleteIssues toggles whether members with admin permissions can delete issues. diff --git a/tools/jsonfieldname/go.mod b/tools/jsonfieldname/go.mod new file mode 100644 index 00000000000..3ae53f27ac4 --- /dev/null +++ b/tools/jsonfieldname/go.mod @@ -0,0 +1,13 @@ +module tools/jsonfieldname + +go 1.24.0 + +require ( + github.com/golangci/plugin-module-register v0.1.1 + golang.org/x/tools v0.29.0 +) + +require ( + golang.org/x/mod v0.22.0 // indirect + golang.org/x/sync v0.10.0 // indirect +) diff --git a/tools/jsonfieldname/go.sum b/tools/jsonfieldname/go.sum new file mode 100644 index 00000000000..c2f7392bb23 --- /dev/null +++ b/tools/jsonfieldname/go.sum @@ -0,0 +1,10 @@ +github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= +github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= diff --git a/tools/jsonfieldname/jsonfieldname.go b/tools/jsonfieldname/jsonfieldname.go new file mode 100644 index 00000000000..e4c117e3cb6 --- /dev/null +++ b/tools/jsonfieldname/jsonfieldname.go @@ -0,0 +1,232 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package jsonfieldname is a custom linter to be used by +// golangci-lint to find instances where the Go field name +// of a struct does not match the JSON tag name. +// It honors idiomatic Go initialisms and handles the +// special case of `Github` vs `GitHub` as agreed upon +// by the original author of the repo. +package jsonfieldname + +import ( + "go/ast" + "go/token" + "reflect" + "regexp" + "strings" + + "github.com/golangci/plugin-module-register/register" + "golang.org/x/tools/go/analysis" +) + +func init() { + register.Plugin("jsonfieldname", New) +} + +// JSONFieldNamePlugin is a custom linter plugin for golangci-lint. +type JSONFieldNamePlugin struct { + allowedExceptions map[string]bool +} + +// Settings is the configuration for the jsonfieldname linter. +type Settings struct { + AllowedExceptions []string `json:"allowed-exceptions" yaml:"allowed-exceptions"` +} + +// New returns an analysis.Analyzer to use with golangci-lint. +// It parses the "allowed-exceptions" section to determine which warnings to skip. +func New(cfg any) (register.LinterPlugin, error) { + allowedExceptions := map[string]bool{} + + if cfg != nil { + if settingsMap, ok := cfg.(map[string]any); ok { + if exceptionsRaw, ok := settingsMap["allowed-exceptions"]; ok { + if exceptionsList, ok := exceptionsRaw.([]any); ok { + for _, item := range exceptionsList { + if exception, ok := item.(string); ok { + allowedExceptions[exception] = true + } + } + } + } + } + } + + return &JSONFieldNamePlugin{allowedExceptions: allowedExceptions}, nil +} + +// BuildAnalyzers builds the analyzers for the JSONFieldNamePlugin. +func (f *JSONFieldNamePlugin) BuildAnalyzers() ([]*analysis.Analyzer, error) { + return []*analysis.Analyzer{ + { + Name: "jsonfieldname", + Doc: "Reports mismatches between Go field and JSON tag names. Note that the JSON tag name is the source-of-truth and the Go field name needs to match it.", + Run: func(pass *analysis.Pass) (any, error) { + return run(pass, f.allowedExceptions) + }, + }, + }, nil +} + +// GetLoadMode returns the load mode for the JSONFieldNamePlugin. +func (f *JSONFieldNamePlugin) GetLoadMode() string { + return register.LoadModeSyntax +} + +func run(pass *analysis.Pass, allowedExceptions map[string]bool) (any, error) { + for _, file := range pass.Files { + ast.Inspect(file, func(n ast.Node) bool { + if n == nil { + return false + } + + switch t := n.(type) { + case *ast.TypeSpec: + structType, ok := t.Type.(*ast.StructType) + if !ok { + return true + } + structName := t.Name.Name + + // Only check exported structs. + if !ast.IsExported(structName) { + return true + } + + for _, field := range structType.Fields.List { + if field.Tag == nil || len(field.Names) == 0 { + continue + } + + goField := field.Names[0] + tagValue := strings.Trim(field.Tag.Value, "`") + structTag := reflect.StructTag(tagValue) + jsonTagName, ok := structTag.Lookup("json") + if !ok || jsonTagName == "-" { + continue + } + jsonTagName = strings.TrimSuffix(jsonTagName, ",omitempty") + + checkGoFieldName(structName, goField.Name, jsonTagName, goField.Pos(), pass, allowedExceptions) + } + } + + return true + }) + } + return nil, nil +} + +func checkGoFieldName(structName, goFieldName, jsonTagName string, tokenPos token.Pos, pass *analysis.Pass, allowedExceptions map[string]bool) { + fullName := structName + "." + goFieldName + if allowedExceptions[fullName] { + return + } + + want, alternate := jsonTagToPascal(jsonTagName) + if goFieldName != want && goFieldName != alternate { + const msg = "change Go field name %q to %q for JSON tag %q in struct %q" + pass.Reportf(tokenPos, msg, goFieldName, want, jsonTagName, structName) + } +} + +func splitJSONTag(jsonTagName string) []string { + if strings.Contains(jsonTagName, "_") { + return strings.Split(jsonTagName, "_") + } + + if strings.Contains(jsonTagName, "-") { + return strings.Split(jsonTagName, "-") + } + + if strings.ToLower(jsonTagName) == jsonTagName { // single word + return []string{jsonTagName} + } + + s := camelCaseRE.ReplaceAllString(jsonTagName, "$1 $2") + parts := strings.Fields(s) + for i, part := range parts { + parts[i] = strings.ToLower(part) + } + + return parts +} + +var camelCaseRE = regexp.MustCompile(`([a-z0-9])([A-Z])`) + +func jsonTagToPascal(jsonTagName string) (want, alternate string) { + parts := splitJSONTag(jsonTagName) + alt := make([]string, len(parts)) + for i, part := range parts { + alt[i] = part + if part == "" { + continue + } + upper := strings.ToUpper(part) + if initialisms[upper] { + parts[i] = upper + alt[i] = upper + } else if specialCase, ok := specialCases[upper]; ok { + parts[i] = specialCase + alt[i] = specialCase + } else if possibleAlternate, ok := possibleAlternates[upper]; ok { + parts[i] = possibleAlternate + alt[i] = strings.ToUpper(part[:1]) + part[1:] + } else { + parts[i] = strings.ToUpper(part[:1]) + part[1:] + alt[i] = parts[i] + } + } + return strings.Join(parts, ""), strings.Join(alt, "") +} + +// Common Go initialisms that should be all caps. +var initialisms = map[string]bool{ + "API": true, "ASCII": true, + "CAA": true, "CAS": true, "CNAME": true, "CPU": true, + "CSS": true, "CWE": true, "CVE": true, "CVSS": true, + "DN": true, "DNS": true, + "EOF": true, "EPSS": true, + "GB": true, "GHSA": true, "GPG": true, "GUID": true, + "HTML": true, "HTTP": true, "HTTPS": true, + "ID": true, "IDE": true, "IDP": true, "IP": true, "JIT": true, + "JSON": true, + "LDAP": true, "LFS": true, "LHS": true, + "MD5": true, "MS": true, "MX": true, + "NPM": true, "NTP": true, "NVD": true, + "OID": true, "OS": true, + "PEM": true, "PR": true, "QPS": true, + "RAM": true, "RHS": true, "RPC": true, + "SAML": true, "SBOM": true, "SCIM": true, + "SHA": true, "SHA1": true, "SHA256": true, + "SKU": true, "SLA": true, "SMTP": true, "SNMP": true, + "SPDX": true, "SPDXID": true, "SQL": true, "SSH": true, + "SSL": true, "SSO": true, "SVN": true, + "TCP": true, "TFVC": true, "TLS": true, "TTL": true, + "UDP": true, "UI": true, "UID": true, "UUID": true, + "URI": true, "URL": true, "UTF8": true, + "VCF": true, "VCS": true, "VM": true, + "XML": true, "XMPP": true, "XSRF": true, "XSS": true, +} + +var specialCases = map[string]string{ + "CPUS": "CPUs", + "CWES": "CWEs", + "GRAPHQL": "GraphQL", + "HREF": "HRef", + "IDS": "IDs", + "IPS": "IPs", + "OAUTH": "OAuth", + "OPENAPI": "OpenAPI", + "URLS": "URLs", +} + +var possibleAlternates = map[string]string{ + "ORGANIZATION": "Org", + "ORGANIZATIONS": "Orgs", + "REPOSITORY": "Repo", + "REPOSITORIES": "Repos", +} diff --git a/tools/jsonfieldname/jsonfieldname_test.go b/tools/jsonfieldname/jsonfieldname_test.go new file mode 100644 index 00000000000..fa5044c7aba --- /dev/null +++ b/tools/jsonfieldname/jsonfieldname_test.go @@ -0,0 +1,20 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package jsonfieldname + +import ( + "testing" + + "golang.org/x/tools/go/analysis/analysistest" +) + +func TestRun(t *testing.T) { + t.Parallel() + testdata := analysistest.TestData() + plugin, _ := New(nil) + analyzers, _ := plugin.BuildAnalyzers() + analysistest.Run(t, testdata, analyzers[0], "has-warnings", "no-warnings") +} diff --git a/tools/jsonfieldname/testdata/src/has-warnings/main.go b/tools/jsonfieldname/testdata/src/has-warnings/main.go new file mode 100644 index 00000000000..04670e20b1d --- /dev/null +++ b/tools/jsonfieldname/testdata/src/has-warnings/main.go @@ -0,0 +1,13 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +type Example struct { + GitHubThing string `json:"github_thing"` // want `change Go field name "GitHubThing" to "GithubThing" for JSON tag "github_thing" in struct "Example"` + Id string `json:"id,omitempty"` // want `change Go field name "Id" to "ID" for JSON tag "id" in struct "Example"` + strings string `json:"strings,omitempty"` // want `change Go field name "strings" to "Strings" for JSON tag "strings" in struct "Example"` + camelcaseexample *int `json:"camelCaseExample,omitempty"` // want `change Go field name "camelcaseexample" to "CamelCaseExample" for JSON tag "camelCaseExample" in struct "Example"` +} diff --git a/tools/jsonfieldname/testdata/src/no-warnings/main.go b/tools/jsonfieldname/testdata/src/no-warnings/main.go new file mode 100644 index 00000000000..73119c771f0 --- /dev/null +++ b/tools/jsonfieldname/testdata/src/no-warnings/main.go @@ -0,0 +1,12 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +type Example struct { + GithubThing string `json:"github_thing"` // Should not be flagged + ID string `json:"id,omitempty"` // Should not be flagged + Strings string `json:"strings,omitempty"` // Should not be flagged +} From 98a62fd200b35bf0a7abe7862fc38ffcae5c7c28 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Wed, 22 Oct 2025 15:46:53 +0300 Subject: [PATCH 03/16] chore: Fix typo in comment (#3786) --- github/secret_scanning_pattern_configs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/secret_scanning_pattern_configs.go b/github/secret_scanning_pattern_configs.go index c2d51f7d803..5eb51c4597f 100644 --- a/github/secret_scanning_pattern_configs.go +++ b/github/secret_scanning_pattern_configs.go @@ -18,7 +18,7 @@ type SecretScanningPatternConfigs struct { CustomPatternOverrides []*SecretScanningPatternOverride `json:"custom_pattern_overrides,omitempty"` } -// SecretScanningPatternOverride respresents an override for provider partner or custom organization patterns. +// SecretScanningPatternOverride represents an override for provider partner or custom organization patterns. type SecretScanningPatternOverride struct { TokenType *string `json:"token_type,omitempty"` CustomPatternVersion *string `json:"custom_pattern_version,omitempty"` From 12cbac6b8a60195eb3e4107eb4d4f0b6398d969a Mon Sep 17 00:00:00 2001 From: Alexis Couvreur Date: Thu, 23 Oct 2025 17:40:52 -0400 Subject: [PATCH 04/16] feat: Add support for private registries endpoints (#3785) --- github/github-accessors.go | 112 ++++++++++ github/github-accessors_test.go | 148 ++++++++++++++ github/github.go | 2 + github/private_registries.go | 263 ++++++++++++++++++++++++ github/private_registries_test.go | 326 ++++++++++++++++++++++++++++++ 5 files changed, 851 insertions(+) create mode 100644 github/private_registries.go create mode 100644 github/private_registries_test.go diff --git a/github/github-accessors.go b/github/github-accessors.go index d94949d8f29..6e2bbaf93bd 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -6310,6 +6310,14 @@ func (c *CreateEvent) GetSender() *User { return c.Sender } +// GetUsername returns the Username field if it's non-nil, zero value otherwise. +func (c *CreateOrganizationPrivateRegistry) GetUsername() string { + if c == nil || c.Username == nil { + return "" + } + return *c.Username +} + // GetEmail returns the Email field if it's non-nil, zero value otherwise. func (c *CreateOrgInvitationOptions) GetEmail() string { if c == nil || c.Email == nil { @@ -18694,6 +18702,62 @@ func (p *PreReceiveHook) GetName() string { return *p.Name } +// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. +func (p *PrivateRegistries) GetTotalCount() int { + if p == nil || p.TotalCount == nil { + return 0 + } + return *p.TotalCount +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (p *PrivateRegistry) GetCreatedAt() Timestamp { + if p == nil || p.CreatedAt == nil { + return Timestamp{} + } + return *p.CreatedAt +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *PrivateRegistry) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + +// GetRegistryType returns the RegistryType field if it's non-nil, zero value otherwise. +func (p *PrivateRegistry) GetRegistryType() string { + if p == nil || p.RegistryType == nil { + return "" + } + return *p.RegistryType +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (p *PrivateRegistry) GetUpdatedAt() Timestamp { + if p == nil || p.UpdatedAt == nil { + return Timestamp{} + } + return *p.UpdatedAt +} + +// GetUsername returns the Username field if it's non-nil, zero value otherwise. +func (p *PrivateRegistry) GetUsername() string { + if p == nil || p.Username == nil { + return "" + } + return *p.Username +} + +// GetVisibility returns the Visibility field. +func (p *PrivateRegistry) GetVisibility() *PrivateRegistryVisibility { + if p == nil { + return nil + } + return p.Visibility +} + // GetHRef returns the HRef field if it's non-nil, zero value otherwise. func (p *PRLink) GetHRef() string { if p == nil || p.HRef == nil { @@ -28854,6 +28918,54 @@ func (u *UpdateEnterpriseRunnerGroupRequest) GetVisibility() string { return *u.Visibility } +// GetEncryptedValue returns the EncryptedValue field if it's non-nil, zero value otherwise. +func (u *UpdateOrganizationPrivateRegistry) GetEncryptedValue() string { + if u == nil || u.EncryptedValue == nil { + return "" + } + return *u.EncryptedValue +} + +// GetKeyID returns the KeyID field if it's non-nil, zero value otherwise. +func (u *UpdateOrganizationPrivateRegistry) GetKeyID() string { + if u == nil || u.KeyID == nil { + return "" + } + return *u.KeyID +} + +// GetRegistryType returns the RegistryType field if it's non-nil, zero value otherwise. +func (u *UpdateOrganizationPrivateRegistry) GetRegistryType() string { + if u == nil || u.RegistryType == nil { + return "" + } + return *u.RegistryType +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (u *UpdateOrganizationPrivateRegistry) GetURL() string { + if u == nil || u.URL == nil { + return "" + } + return *u.URL +} + +// GetUsername returns the Username field if it's non-nil, zero value otherwise. +func (u *UpdateOrganizationPrivateRegistry) GetUsername() string { + if u == nil || u.Username == nil { + return "" + } + return *u.Username +} + +// GetVisibility returns the Visibility field. +func (u *UpdateOrganizationPrivateRegistry) GetVisibility() *PrivateRegistryVisibility { + if u == nil { + return nil + } + return u.Visibility +} + // GetForce returns the Force field if it's non-nil, zero value otherwise. func (u *UpdateRef) GetForce() bool { if u == nil || u.Force == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 3d1cf6e3b13..32d44331180 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -8234,6 +8234,17 @@ func TestCreateEvent_GetSender(tt *testing.T) { c.GetSender() } +func TestCreateOrganizationPrivateRegistry_GetUsername(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CreateOrganizationPrivateRegistry{Username: &zeroValue} + c.GetUsername() + c = &CreateOrganizationPrivateRegistry{} + c.GetUsername() + c = nil + c.GetUsername() +} + func TestCreateOrgInvitationOptions_GetEmail(tt *testing.T) { tt.Parallel() var zeroValue string @@ -24302,6 +24313,80 @@ func TestPreReceiveHook_GetName(tt *testing.T) { p.GetName() } +func TestPrivateRegistries_GetTotalCount(tt *testing.T) { + tt.Parallel() + var zeroValue int + p := &PrivateRegistries{TotalCount: &zeroValue} + p.GetTotalCount() + p = &PrivateRegistries{} + p.GetTotalCount() + p = nil + p.GetTotalCount() +} + +func TestPrivateRegistry_GetCreatedAt(tt *testing.T) { + tt.Parallel() + var zeroValue Timestamp + p := &PrivateRegistry{CreatedAt: &zeroValue} + p.GetCreatedAt() + p = &PrivateRegistry{} + p.GetCreatedAt() + p = nil + p.GetCreatedAt() +} + +func TestPrivateRegistry_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &PrivateRegistry{Name: &zeroValue} + p.GetName() + p = &PrivateRegistry{} + p.GetName() + p = nil + p.GetName() +} + +func TestPrivateRegistry_GetRegistryType(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &PrivateRegistry{RegistryType: &zeroValue} + p.GetRegistryType() + p = &PrivateRegistry{} + p.GetRegistryType() + p = nil + p.GetRegistryType() +} + +func TestPrivateRegistry_GetUpdatedAt(tt *testing.T) { + tt.Parallel() + var zeroValue Timestamp + p := &PrivateRegistry{UpdatedAt: &zeroValue} + p.GetUpdatedAt() + p = &PrivateRegistry{} + p.GetUpdatedAt() + p = nil + p.GetUpdatedAt() +} + +func TestPrivateRegistry_GetUsername(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &PrivateRegistry{Username: &zeroValue} + p.GetUsername() + p = &PrivateRegistry{} + p.GetUsername() + p = nil + p.GetUsername() +} + +func TestPrivateRegistry_GetVisibility(tt *testing.T) { + tt.Parallel() + p := &PrivateRegistry{} + p.GetVisibility() + p = nil + p.GetVisibility() +} + func TestPRLink_GetHRef(tt *testing.T) { tt.Parallel() var zeroValue string @@ -37165,6 +37250,69 @@ func TestUpdateEnterpriseRunnerGroupRequest_GetVisibility(tt *testing.T) { u.GetVisibility() } +func TestUpdateOrganizationPrivateRegistry_GetEncryptedValue(tt *testing.T) { + tt.Parallel() + var zeroValue string + u := &UpdateOrganizationPrivateRegistry{EncryptedValue: &zeroValue} + u.GetEncryptedValue() + u = &UpdateOrganizationPrivateRegistry{} + u.GetEncryptedValue() + u = nil + u.GetEncryptedValue() +} + +func TestUpdateOrganizationPrivateRegistry_GetKeyID(tt *testing.T) { + tt.Parallel() + var zeroValue string + u := &UpdateOrganizationPrivateRegistry{KeyID: &zeroValue} + u.GetKeyID() + u = &UpdateOrganizationPrivateRegistry{} + u.GetKeyID() + u = nil + u.GetKeyID() +} + +func TestUpdateOrganizationPrivateRegistry_GetRegistryType(tt *testing.T) { + tt.Parallel() + var zeroValue string + u := &UpdateOrganizationPrivateRegistry{RegistryType: &zeroValue} + u.GetRegistryType() + u = &UpdateOrganizationPrivateRegistry{} + u.GetRegistryType() + u = nil + u.GetRegistryType() +} + +func TestUpdateOrganizationPrivateRegistry_GetURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + u := &UpdateOrganizationPrivateRegistry{URL: &zeroValue} + u.GetURL() + u = &UpdateOrganizationPrivateRegistry{} + u.GetURL() + u = nil + u.GetURL() +} + +func TestUpdateOrganizationPrivateRegistry_GetUsername(tt *testing.T) { + tt.Parallel() + var zeroValue string + u := &UpdateOrganizationPrivateRegistry{Username: &zeroValue} + u.GetUsername() + u = &UpdateOrganizationPrivateRegistry{} + u.GetUsername() + u = nil + u.GetUsername() +} + +func TestUpdateOrganizationPrivateRegistry_GetVisibility(tt *testing.T) { + tt.Parallel() + u := &UpdateOrganizationPrivateRegistry{} + u.GetVisibility() + u = nil + u.GetVisibility() +} + func TestUpdateRef_GetForce(tt *testing.T) { tt.Parallel() var zeroValue bool diff --git a/github/github.go b/github/github.go index bf17933207c..09d35833d19 100644 --- a/github/github.go +++ b/github/github.go @@ -218,6 +218,7 @@ type Client struct { Meta *MetaService Migrations *MigrationService Organizations *OrganizationsService + PrivateRegistries *PrivateRegistriesService Projects *ProjectsService PullRequests *PullRequestsService RateLimit *RateLimitService @@ -457,6 +458,7 @@ func (c *Client) initialize() { c.Meta = (*MetaService)(&c.common) c.Migrations = (*MigrationService)(&c.common) c.Organizations = (*OrganizationsService)(&c.common) + c.PrivateRegistries = (*PrivateRegistriesService)(&c.common) c.Projects = (*ProjectsService)(&c.common) c.PullRequests = (*PullRequestsService)(&c.common) c.RateLimit = (*RateLimitService)(&c.common) diff --git a/github/private_registries.go b/github/private_registries.go new file mode 100644 index 00000000000..ff8582c45dc --- /dev/null +++ b/github/private_registries.go @@ -0,0 +1,263 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// PrivateRegistriesService handles communication with the private registries +// methods of the GitHub API. +// +// GitHub API docs: https://docs.github.com/rest/private-registries +type PrivateRegistriesService service + +// PrivateRegistryType represents the type of private registry. +type PrivateRegistryType string + +const ( + PrivateRegistryTypeMavenRepository PrivateRegistryType = "maven_repository" + PrivateRegistryTypeNugetFeed PrivateRegistryType = "nuget_feed" + PrivateRegistryTypeGoProxyServer PrivateRegistryType = "goproxy_server" + PrivateRegistryTypeNpmRegistry PrivateRegistryType = "npm_registry" + PrivateRegistryTypeRubygemsServer PrivateRegistryType = "rubygems_server" + PrivateRegistryTypeCargoRegistry PrivateRegistryType = "cargo_registry" + PrivateRegistryTypeComposerRepository PrivateRegistryType = "composer_repository" + PrivateRegistryTypeDockerRegistry PrivateRegistryType = "docker_registry" + PrivateRegistryTypeGitSource PrivateRegistryType = "git_source" + PrivateRegistryTypeHelmRegistry PrivateRegistryType = "helm_registry" + PrivateRegistryTypeHexOrganization PrivateRegistryType = "hex_organization" + PrivateRegistryTypeHexRepository PrivateRegistryType = "hex_repository" + PrivateRegistryTypePubRepository PrivateRegistryType = "pub_repository" + PrivateRegistryTypePythonIndex PrivateRegistryType = "python_index" + PrivateRegistryTypeTerraformRegistry PrivateRegistryType = "terraform_registry" +) + +// PrivateRegistryVisibility represents the visibility of a private registry. +type PrivateRegistryVisibility string + +const ( + PrivateRegistryVisibilityPrivate PrivateRegistryVisibility = "private" + PrivateRegistryVisibilityAll PrivateRegistryVisibility = "all" + PrivateRegistryVisibilitySelected PrivateRegistryVisibility = "selected" +) + +// PrivateRegistry represents a private registry configuration. +type PrivateRegistry struct { + // Name of the private registry. + Name *string `json:"name,omitempty"` + // RegistryType is the type of private registry. You can find the list of supported types in PrivateRegistryType. + RegistryType *string `json:"registry_type,omitempty"` + // Username to use when authenticating with the private registry. + // This field is omitted if the private registry does not require a username for authentication. + Username *string `json:"username,omitempty"` + // CreatedAt is the timestamp when the private registry was created. + CreatedAt *Timestamp `json:"created_at,omitempty"` + // UpdatedAt is the timestamp when the private registry was last updated. + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + // Visibility is the visibility of the private registry. Possible values are: "private", "all", and "selected". + Visibility *PrivateRegistryVisibility `json:"visibility,omitempty"` +} + +// PrivateRegistries represents a list of private registries. +type PrivateRegistries struct { + // TotalCount is the total number of private registries. + TotalCount *int `json:"total_count,omitempty"` + // Configurations is the list of private registry configurations. + Configurations []*PrivateRegistry `json:"configurations,omitempty"` +} + +// CreateOrganizationPrivateRegistry represents the payload to create a private registry. +type CreateOrganizationPrivateRegistry struct { + // RegistryType is the type of private registry. + // You can find the list of supported types in PrivateRegistryType. + RegistryType string `json:"registry_type"` + + // URL is the URL of the private registry. + URL string `json:"url"` + + // The username to use when authenticating with the private registry. + // This field should be omitted if the private registry does not require a username for authentication. + Username *string `json:"username,omitempty"` + + // The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) + // using the public key retrieved from the PrivateRegistriesService.GetOrganizationPrivateRegistriesPublicKey. + EncryptedValue string `json:"encrypted_value"` + // KeyID is the ID of the public key used to encrypt the secret. + KeyID string `json:"key_id"` + // Visibility is the visibility of the private registry. + // Possible values are: "private", "all", and "selected". + Visibility PrivateRegistryVisibility `json:"visibility"` + + // An array of repository IDs that can access the organization private registry. + // You can only provide a list of repository IDs when CreateOrganizationPrivateRegistry.Visibility is set to PrivateRegistryVisibilitySelected. + // This field should be omitted if visibility is set to PrivateRegistryVisibilityAll or PrivateRegistryVisibilityPrivate. + SelectedRepositoryIDs []int64 `json:"selected_repository_ids,omitempty"` +} + +// UpdateOrganizationPrivateRegistry represents the payload to update a private registry. +type UpdateOrganizationPrivateRegistry struct { + // RegistryType is the type of private registry. + // You can find the list of supported types in PrivateRegistryType. + RegistryType *string `json:"registry_type,omitempty"` + + // URL is the URL of the private registry. + URL *string `json:"url,omitempty"` + + // The username to use when authenticating with the private registry. + // This field should be omitted if the private registry does not require a username for authentication. + Username *string `json:"username,omitempty"` + + // The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) + // using the public key retrieved from the PrivateRegistriesService.GetOrganizationPrivateRegistriesPublicKey. + EncryptedValue *string `json:"encrypted_value,omitempty"` + // KeyID is the ID of the public key used to encrypt the secret. + KeyID *string `json:"key_id,omitempty"` + // Visibility is the visibility of the private registry. + // Possible values are: "private", "all", and "selected". + Visibility *PrivateRegistryVisibility `json:"visibility,omitempty"` + + // An array of repository IDs that can access the organization private registry. + // You can only provide a list of repository IDs when CreateOrganizationPrivateRegistry.Visibility is set to PrivateRegistryVisibilitySelected. + // This field should be omitted if visibility is set to PrivateRegistryVisibilityAll or PrivateRegistryVisibilityPrivate. + SelectedRepositoryIDs []int64 `json:"selected_repository_ids,omitempty"` +} + +// ListOrganizationPrivateRegistries lists private registries for an organization. +// +// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations#list-private-registries-for-an-organization +// +//meta:operation GET /orgs/{org}/private-registries +func (s *PrivateRegistriesService) ListOrganizationPrivateRegistries(ctx context.Context, org string, opts *ListOptions) (*PrivateRegistries, *Response, error) { + u := fmt.Sprintf("orgs/%v/private-registries", org) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var privateRegistries PrivateRegistries + resp, err := s.client.Do(ctx, req, &privateRegistries) + if err != nil { + return nil, resp, err + } + return &privateRegistries, resp, nil +} + +// CreateOrganizationPrivateRegistry creates a private registry configuration with an encrypted value for an organization. +// +// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations#create-a-private-registry-for-an-organization +// +//meta:operation POST /orgs/{org}/private-registries +func (s *PrivateRegistriesService) CreateOrganizationPrivateRegistry(ctx context.Context, org string, privateRegistry CreateOrganizationPrivateRegistry) (*PrivateRegistry, *Response, error) { + u := fmt.Sprintf("orgs/%v/private-registries", org) + + req, err := s.client.NewRequest("POST", u, privateRegistry) + if err != nil { + return nil, nil, err + } + + var result PrivateRegistry + resp, err := s.client.Do(ctx, req, &result) + if err != nil { + return nil, resp, err + } + return &result, resp, nil +} + +// GetOrganizationPrivateRegistriesPublicKey retrieves the public key for encrypting secrets for an organization's private registries. +// +// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations#get-private-registries-public-key-for-an-organization +// +//meta:operation GET /orgs/{org}/private-registries/public-key +func (s *PrivateRegistriesService) GetOrganizationPrivateRegistriesPublicKey(ctx context.Context, org string) (*PublicKey, *Response, error) { + u := fmt.Sprintf("orgs/%v/private-registries/public-key", org) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var publicKey PublicKey + resp, err := s.client.Do(ctx, req, &publicKey) + if err != nil { + return nil, resp, err + } + return &publicKey, resp, nil +} + +// GetOrganizationPrivateRegistry gets a specific private registry for an organization. +// The `name` parameter is the name of the private registry to retrieve. It is the same as PrivateRegistry.Name. +// +// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations#get-a-private-registry-for-an-organization +// +//meta:operation GET /orgs/{org}/private-registries/{secret_name} +func (s *PrivateRegistriesService) GetOrganizationPrivateRegistry(ctx context.Context, org, secretName string) (*PrivateRegistry, *Response, error) { + u := fmt.Sprintf("orgs/%v/private-registries/%v", org, secretName) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var privateRegistry PrivateRegistry + resp, err := s.client.Do(ctx, req, &privateRegistry) + if err != nil { + return nil, resp, err + } + + return &privateRegistry, resp, nil +} + +// UpdateOrganizationPrivateRegistry updates a specific private registry for an organization. +// The `name` parameter is the name of the private registry to update. It is the same as PrivateRegistry.Name. +// +// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations#update-a-private-registry-for-an-organization +// +//meta:operation PATCH /orgs/{org}/private-registries/{secret_name} +func (s *PrivateRegistriesService) UpdateOrganizationPrivateRegistry(ctx context.Context, org, secretName string, privateRegistry UpdateOrganizationPrivateRegistry) (*PrivateRegistry, *Response, error) { + u := fmt.Sprintf("orgs/%v/private-registries/%v", org, secretName) + + req, err := s.client.NewRequest("PATCH", u, privateRegistry) + if err != nil { + return nil, nil, err + } + + var updatedRegistry PrivateRegistry + resp, err := s.client.Do(ctx, req, &updatedRegistry) + if err != nil { + return nil, resp, err + } + + return &updatedRegistry, resp, nil +} + +// DeleteOrganizationPrivateRegistry deletes a specific private registry for an organization. +// The `name` parameter is the name of the private registry to delete. It is the same as PrivateRegistry.Name. +// +// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations#delete-a-private-registry-for-an-organization +// +//meta:operation DELETE /orgs/{org}/private-registries/{secret_name} +func (s *PrivateRegistriesService) DeleteOrganizationPrivateRegistry(ctx context.Context, org, secretName string) (*Response, error) { + u := fmt.Sprintf("orgs/%v/private-registries/%v", org, secretName) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} diff --git a/github/private_registries_test.go b/github/private_registries_test.go new file mode 100644 index 00000000000..5c01b6dad59 --- /dev/null +++ b/github/private_registries_test.go @@ -0,0 +1,326 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "testing" + "time" + + "github.com/google/go-cmp/cmp" +) + +func TestPrivateRegistriesService_ListOrganizationPrivateRegistries(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/private-registries", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + testFormValues(t, r, values{ + "page": "2", + }) + fmt.Fprint(w, `{ + "total_count": 1, + "configurations": [ + { + "name": "MAVEN_REPOSITORY_SECRET", + "registry_type": "maven_repository", + "username": "monalisa", + "created_at": "2019-08-10T14:59:22Z", + "updated_at": "2020-01-10T14:59:22Z", + "visibility": "selected" + } + ] +}`) + }) + + opts := &ListOptions{Page: 2} + ctx := t.Context() + privateRegistries, _, err := client.PrivateRegistries.ListOrganizationPrivateRegistries(ctx, "o", opts) + if err != nil { + t.Fatalf("PrivateRegistries.ListOrganizationPrivateRegitries returned error: %v", err) + } + + want := &PrivateRegistries{ + TotalCount: Ptr(1), + Configurations: []*PrivateRegistry{ + { + Name: Ptr("MAVEN_REPOSITORY_SECRET"), + RegistryType: Ptr("maven_repository"), + Username: Ptr("monalisa"), + CreatedAt: &Timestamp{time.Date(2019, time.August, 10, 14, 59, 22, 0, time.UTC)}, + UpdatedAt: &Timestamp{time.Date(2020, time.January, 10, 14, 59, 22, 0, time.UTC)}, + Visibility: Ptr(PrivateRegistryVisibilitySelected), + }, + }, + } + if diff := cmp.Diff(want, privateRegistries); diff != "" { + t.Errorf("PrivateRegistries.ListOrganizationPrivateRegitries mismatch (-want +got):\\n%v", diff) + } + + const methodName = "ListOrganizationPrivateRegistries" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.PrivateRegistries.ListOrganizationPrivateRegistries(ctx, "\n", opts) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.PrivateRegistries.ListOrganizationPrivateRegistries(ctx, "o", opts) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) + + // still allow both set (no validation enforced) – ensure it does not error + ctxBypass := context.WithValue(t.Context(), BypassRateLimitCheck, true) + if _, _, err = client.PrivateRegistries.ListOrganizationPrivateRegistries(ctxBypass, "o", opts); err != nil { + t.Fatalf("unexpected error when both before/after set: %v", err) + } +} + +func TestPrivateRegistriesService_CreateOrganizationPrivateRegistry(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + input := &CreateOrganizationPrivateRegistry{ + RegistryType: "maven_repository", + URL: "https://maven.pkg.github.com/OWNER/REPOSITORY", + Username: Ptr("monalisa"), + EncryptedValue: "encrypted_value", + KeyID: "key_id", + Visibility: PrivateRegistryVisibilitySelected, + SelectedRepositoryIDs: []int64{1, 2, 3}, + } + + mux.HandleFunc("/orgs/o/private-registries", func(w http.ResponseWriter, r *http.Request) { + v := new(CreateOrganizationPrivateRegistry) + assertNilError(t, json.NewDecoder(r.Body).Decode(v)) + + testMethod(t, r, "POST") + if !cmp.Equal(v, input) { + t.Errorf("Request body = %+v, want %+v", v, input) + } + + fmt.Fprint(w, `{ + "name": "MAVEN_REPOSITORY_SECRET", + "registry_type": "maven_repository", + "username": "monalisa", + "created_at": "2019-08-10T14:59:22Z", + "updated_at": "2020-01-10T14:59:22Z", + "visibility": "selected" +}`) + }) + + ctx := t.Context() + privateRegistry, _, err := client.PrivateRegistries.CreateOrganizationPrivateRegistry(ctx, "o", *input) + if err != nil { + t.Fatalf("PrivateRegistries.CreateOrganizationPrivateRegitries returned error: %v", err) + } + + want := &PrivateRegistry{ + Name: Ptr("MAVEN_REPOSITORY_SECRET"), + RegistryType: Ptr("maven_repository"), + Username: Ptr("monalisa"), + CreatedAt: &Timestamp{time.Date(2019, time.August, 10, 14, 59, 22, 0, time.UTC)}, + UpdatedAt: &Timestamp{time.Date(2020, time.January, 10, 14, 59, 22, 0, time.UTC)}, + Visibility: Ptr(PrivateRegistryVisibilitySelected), + } + if diff := cmp.Diff(want, privateRegistry); diff != "" { + t.Errorf("PrivateRegistries.CreateOrganizationPrivateRegitries mismatch (-want +got):\\n%v", diff) + } + + const methodName = "CreateOrganizationPrivateRegistry" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.PrivateRegistries.CreateOrganizationPrivateRegistry(ctx, "\n", *input) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.PrivateRegistries.CreateOrganizationPrivateRegistry(ctx, "o", *input) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestPrivateRegistriesService_GetOrganizationPrivateRegistriesPublicKey(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/private-registries/public-key", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{ + "key_id": "0123456789", + "key": "public_key" +}`) + }) + ctx := t.Context() + publicKey, _, err := client.PrivateRegistries.GetOrganizationPrivateRegistriesPublicKey(ctx, "o") + if err != nil { + t.Fatalf("PrivateRegistries.GetOrganizationPrivateRegistriesPublicKey returned error: %v", err) + } + + want := &PublicKey{ + KeyID: Ptr("0123456789"), + Key: Ptr("public_key"), + } + if diff := cmp.Diff(want, publicKey); diff != "" { + t.Errorf("PrivateRegistries.GetOrganizationPrivateRegistriesPublicKey mismatch (-want +got):\\n%v", diff) + } + + const methodName = "GetOrganizationPrivateRegistriesPublicKey" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.PrivateRegistries.GetOrganizationPrivateRegistriesPublicKey(ctx, "\n") + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.PrivateRegistries.GetOrganizationPrivateRegistriesPublicKey(ctx, "o") + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestPrivateRegistriesService_GetOrganizationPrivateRegistry(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/private-registries/MAVEN_REPOSITORY_SECRET", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{ + "name": "MAVEN_REPOSITORY_SECRET", + "registry_type": "maven_repository", + "username": "monalisa", + "created_at": "2019-08-10T14:59:22Z", + "updated_at": "2020-01-10T14:59:22Z", + "visibility": "selected" +}`) + }) + ctx := t.Context() + privateRegistry, _, err := client.PrivateRegistries.GetOrganizationPrivateRegistry(ctx, "o", "MAVEN_REPOSITORY_SECRET") + if err != nil { + t.Fatalf("PrivateRegistries.GetOrganizationPrivateRegistry returned error: %v", err) + } + + want := &PrivateRegistry{ + Name: Ptr("MAVEN_REPOSITORY_SECRET"), + RegistryType: Ptr("maven_repository"), + Username: Ptr("monalisa"), + CreatedAt: &Timestamp{time.Date(2019, time.August, 10, 14, 59, 22, 0, time.UTC)}, + UpdatedAt: &Timestamp{time.Date(2020, time.January, 10, 14, 59, 22, 0, time.UTC)}, + Visibility: Ptr(PrivateRegistryVisibilitySelected), + } + if diff := cmp.Diff(want, privateRegistry); diff != "" { + t.Errorf("PrivateRegistries.GetOrganizationPrivateRegistry mismatch (-want +got):\\n%v", diff) + } + + const methodName = "GetOrganizationPrivateRegistry" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.PrivateRegistries.GetOrganizationPrivateRegistry(ctx, "\n", "MAVEN_REPOSITORY_SECRET") + return err + }) + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.PrivateRegistries.GetOrganizationPrivateRegistry(ctx, "o", "MAVEN_REPOSITORY_SECRET") + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestPrivateRegistries_UpdateOrganizationPrivateRegistry(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + input := &UpdateOrganizationPrivateRegistry{ + Username: Ptr("monalisa"), + EncryptedValue: Ptr("encrypted_value"), + KeyID: Ptr("key_id"), + Visibility: Ptr(PrivateRegistryVisibilitySelected), + } + + mux.HandleFunc("/orgs/o/private-registries/MAVEN_REPOSITORY_SECRET", func(w http.ResponseWriter, r *http.Request) { + v := new(UpdateOrganizationPrivateRegistry) + assertNilError(t, json.NewDecoder(r.Body).Decode(v)) + + testMethod(t, r, "PATCH") + if !cmp.Equal(v, input) { + t.Errorf("Request body = %+v, want %+v", v, input) + } + + fmt.Fprint(w, `{ + "name": "MAVEN_REPOSITORY_SECRET", + "registry_type": "maven_repository", + "username": "monalisa", + "created_at": "2019-08-10T14:59:22Z", + "updated_at": "2020-01-10T14:59:22Z", + "visibility": "selected" +}`) + }) + + ctx := t.Context() + privateRegistry, _, err := client.PrivateRegistries.UpdateOrganizationPrivateRegistry(ctx, "o", "MAVEN_REPOSITORY_SECRET", *input) + if err != nil { + t.Fatalf("PrivateRegistries.UpdateOrganizationPrivateRegistry returned error: %v", err) + } + + want := &PrivateRegistry{ + Name: Ptr("MAVEN_REPOSITORY_SECRET"), + RegistryType: Ptr("maven_repository"), + Username: Ptr("monalisa"), + CreatedAt: &Timestamp{time.Date(2019, time.August, 10, 14, 59, 22, 0, time.UTC)}, + UpdatedAt: &Timestamp{time.Date(2020, time.January, 10, 14, 59, 22, 0, time.UTC)}, + Visibility: Ptr(PrivateRegistryVisibilitySelected), + } + if diff := cmp.Diff(want, privateRegistry); diff != "" { + t.Errorf("PrivateRegistries.UpdateOrganizationPrivateRegistry mismatch (-want +got):\\n%v", diff) + } + + const methodName = "UpdateOrganizationPrivateRegistry" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.PrivateRegistries.UpdateOrganizationPrivateRegistry(ctx, "\n", "MAVEN_REPOSITORY_SECRET", *input) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.PrivateRegistries.UpdateOrganizationPrivateRegistry(ctx, "o", "MAVEN_REPOSITORY_SECRET", *input) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestPrivateRegistriesService_DeleteOrganizationPrivateRegistry(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/private-registries/MAVEN_REPOSITORY_SECRET", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "DELETE") + w.WriteHeader(http.StatusNoContent) + }) + ctx := t.Context() + _, err := client.PrivateRegistries.DeleteOrganizationPrivateRegistry(ctx, "o", "MAVEN_REPOSITORY_SECRET") + if err != nil { + t.Fatalf("PrivateRegistries.DeleteOrganizationPrivateRegistry returned error: %v", err) + } + + const methodName = "DeleteOrganizationPrivateRegistry" + testBadOptions(t, methodName, func() (err error) { + _, err = client.PrivateRegistries.DeleteOrganizationPrivateRegistry(ctx, "\n", "MAVEN_REPOSITORY_SECRET") + return err + }) + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + return client.PrivateRegistries.DeleteOrganizationPrivateRegistry(ctx, "o", "MAVEN_REPOSITORY_SECRET") + }) +} From b755d64c365491b0e36528802c4b9e89570ae50e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 23 Oct 2025 18:57:55 -0400 Subject: [PATCH 05/16] Only set `Authorization` when `token` is available (#3789) --- github/github.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/github/github.go b/github/github.go index 09d35833d19..46bd1f19104 100644 --- a/github/github.go +++ b/github/github.go @@ -355,7 +355,9 @@ func (c *Client) WithAuthToken(token string) *Client { c2.client.Transport = roundTripperFunc( func(req *http.Request) (*http.Response, error) { req = req.Clone(req.Context()) - req.Header.Set("Authorization", fmt.Sprintf("Bearer %v", token)) + if token != "" { + req.Header.Set("Authorization", fmt.Sprintf("Bearer %v", token)) + } return transport.RoundTrip(req) }, ) From ab86053cf2a030bd7d18edfdcdf019cfe08bdd96 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Fri, 24 Oct 2025 15:50:21 +0300 Subject: [PATCH 06/16] test: Ensure Authorization is not set with empty token (#3790) --- github/github_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/github/github_test.go b/github/github_test.go index ec9af05a5dd..394741e5694 100644 --- a/github/github_test.go +++ b/github/github_test.go @@ -395,6 +395,26 @@ func TestWithAuthToken(t *testing.T) { t.Parallel() validate(t, NewTokenClient(t.Context(), token).Client(), token) }) + + t.Run("do not set Authorization when empty token", func(t *testing.T) { + t.Parallel() + c := new(Client).WithAuthToken("") + + gotReq := false + ifAuthorizationSet := false + srv := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { + gotReq = true + _, ifAuthorizationSet = r.Header["Authorization"] + })) + _, err := c.client.Get(srv.URL) + assertNilError(t, err) + if !gotReq { + t.Error("request not sent") + } + if ifAuthorizationSet { + t.Error("The header 'Authorization' must not be set") + } + }) } func TestWithEnterpriseURLs(t *testing.T) { From 22f7fe37fbe42d6a51cd00b2f444abff226b0685 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 27 Oct 2025 10:01:25 -0400 Subject: [PATCH 07/16] Fix spelling issues (#3792) --- github/actions_workflow_runs.go | 2 +- github/activity_star.go | 2 +- github/billing.go | 6 +++--- github/doc.go | 2 +- github/enterprise_actions_runners.go | 2 +- github/enterprise_network_configurations_test.go | 2 +- github/event_types.go | 6 +++--- github/github.go | 4 ++-- github/orgs_members.go | 2 +- github/packages.go | 2 +- github/private_registries_test.go | 8 ++++---- github/pulls.go | 2 +- github/repos.go | 4 ++-- github/repos_autolinks.go | 2 +- github/repos_collaborators.go | 2 +- github/repos_hooks_configuration.go | 2 +- github/repos_stats.go | 2 +- github/secret_scanning_pattern_configs_test.go | 2 +- github/teams.go | 2 +- github/users_administration.go | 2 +- scrape/scrape_test.go | 2 +- test/integration/authorizations_test.go | 4 ++-- test/integration/github_test.go | 2 +- 23 files changed, 33 insertions(+), 33 deletions(-) diff --git a/github/actions_workflow_runs.go b/github/actions_workflow_runs.go index 5306b39c3df..7b13a23ef40 100644 --- a/github/actions_workflow_runs.go +++ b/github/actions_workflow_runs.go @@ -306,7 +306,7 @@ func (s *ActionsService) getWorkflowRunAttemptLogsWithRateLimit(ctx context.Cont } // RerunWorkflowByID re-runs a workflow by ID. -// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID a the DeploymentProtectionRuleEvent. +// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID of a DeploymentProtectionRuleEvent. // // GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#re-run-a-workflow // diff --git a/github/activity_star.go b/github/activity_star.go index bdd27c3d8db..bc68dfef2dd 100644 --- a/github/activity_star.go +++ b/github/activity_star.go @@ -59,7 +59,7 @@ type ActivityListStarredOptions struct { Sort string `url:"sort,omitempty"` // Direction in which to sort repositories. Possible values are: asc, desc. - // Default is "asc" when sort is "full_name", otherwise default is "desc". + // Default is "asc" when sort is "full_name"; otherwise, default is "desc". Direction string `url:"direction,omitempty"` ListOptions diff --git a/github/billing.go b/github/billing.go index a5bd36f6be3..bb6f8ec49ea 100644 --- a/github/billing.go +++ b/github/billing.go @@ -106,13 +106,13 @@ type PremiumRequestUsageReportOptions struct { // If no year or month is specified, the default year and month are used. Day *int `url:"day,omitempty"` - // The user name to query usage for. The name is not case sensitive. + // The user name to query usage for. The name is not case-sensitive. User *string `url:"user,omitempty"` - // The model name to query usage for. The name is not case sensitive. + // The model name to query usage for. The name is not case-sensitive. Model *string `url:"model,omitempty"` - // The product name to query usage for. The name is not case sensitive. + // The product name to query usage for. The name is not case-sensitive. Product *string `url:"product,omitempty"` } diff --git a/github/doc.go b/github/doc.go index 319bdd414af..65fd79bd28f 100644 --- a/github/doc.go +++ b/github/doc.go @@ -40,7 +40,7 @@ For more sample code snippets, head over to the https://github.com/google/go-git # Authentication -Use [Client.WithAuthToken] to configure your client to authenticate using an Oauth token +Use [Client.WithAuthToken] to configure your client to authenticate using an OAuth token (for example, a personal access token). This is what is needed for a majority of use cases aside from GitHub Apps. diff --git a/github/enterprise_actions_runners.go b/github/enterprise_actions_runners.go index fa345aea8a9..408dcfd8493 100644 --- a/github/enterprise_actions_runners.go +++ b/github/enterprise_actions_runners.go @@ -75,7 +75,7 @@ func (s *EnterpriseService) CreateRegistrationToken(ctx context.Context, enterpr return registrationToken, resp, nil } -// ListRunners lists all the self-hosted runners for a enterprise. +// ListRunners lists all the self-hosted runners for an enterprise. // // GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-enterprise // diff --git a/github/enterprise_network_configurations_test.go b/github/enterprise_network_configurations_test.go index ad3b4b7b2fc..43e1602298f 100644 --- a/github/enterprise_network_configurations_test.go +++ b/github/enterprise_network_configurations_test.go @@ -385,7 +385,7 @@ func TestEnterpriseService_GetEnterpriseNetworkSettingsResource(t *testing.T) { Region: Ptr("germanywestcentral"), } if !cmp.Equal(resource, want) { - t.Errorf("Enterprise.GetEnterpriseNetworkSettingsResource mistach (-want +got):\n%v", cmp.Diff(want, resource)) + t.Errorf("Enterprise.GetEnterpriseNetworkSettingsResource mismatch (-want +got):\n%v", cmp.Diff(want, resource)) } const methodName = "GetEnterpriseNetworkSettingsResource" diff --git a/github/event_types.go b/github/event_types.go index f459c95839e..ba175ac72cd 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -265,7 +265,7 @@ type DeploymentProtectionRuleEvent struct { Environment *string `json:"environment,omitempty"` Event *string `json:"event,omitempty"` - // The URL Github provides for a third-party to use in order to pass/fail a deployment gate + // The URL GitHub provides for a third-party to use in order to pass/fail a deployment gate DeploymentCallbackURL *string `json:"deployment_callback_url,omitempty"` Deployment *Deployment `json:"deployment,omitempty"` Repo *Repository `json:"repository,omitempty"` @@ -859,7 +859,7 @@ type MergeGroup struct { HeadRef *string `json:"head_ref,omitempty"` // The SHA of the merge group's parent commit. BaseSHA *string `json:"base_sha,omitempty"` - // The full ref of the branch the merge group will be merged into. + // The full ref of the branch into which the merge group will be merged. BaseRef *string `json:"base_ref,omitempty"` // An expanded representation of the head_sha commit. HeadCommit *Commit `json:"head_commit,omitempty"` @@ -1845,7 +1845,7 @@ type WatchEvent struct { } // WorkflowDispatchEvent is triggered when someone triggers a workflow run on GitHub or -// sends a POST request to the create a workflow dispatch event endpoint. +// sends a POST request to the endpoint to create a workflow dispatch event. // // GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch type WorkflowDispatchEvent struct { diff --git a/github/github.go b/github/github.go index 46bd1f19104..fa10a446219 100644 --- a/github/github.go +++ b/github/github.go @@ -850,7 +850,7 @@ const ( // bareDo sends an API request using `caller` http.Client passed in the parameters // and lets you handle the api response. If an error or API Error occurs, the error -// will contain more information. Otherwise you are supposed to read and close the +// will contain more information. Otherwise, you are supposed to read and close the // response's Body. If rate limit is exceeded and reset time is in the future, // bareDo returns *RateLimitError immediately without making a network API call. // @@ -967,7 +967,7 @@ func (c *Client) bareDo(ctx context.Context, caller *http.Client, req *http.Requ } // BareDo sends an API request and lets you handle the api response. If an error -// or API Error occurs, the error will contain more information. Otherwise you +// or API Error occurs, the error will contain more information. Otherwise, you // are supposed to read and close the response's Body. If rate limit is exceeded // and reset time is in the future, BareDo returns *RateLimitError immediately // without making a network API call. diff --git a/github/orgs_members.go b/github/orgs_members.go index d818d7f9f83..002811c6eac 100644 --- a/github/orgs_members.go +++ b/github/orgs_members.go @@ -69,7 +69,7 @@ type ListMembersOptions struct { // ListMembers lists the members for an organization. If the authenticated // user is an owner of the organization, this will return both concealed and -// public members, otherwise it will only return public members. +// public members; otherwise, it will only return public members. // // GitHub API docs: https://docs.github.com/rest/orgs/members#list-organization-members // GitHub API docs: https://docs.github.com/rest/orgs/members#list-public-organization-members diff --git a/github/packages.go b/github/packages.go index cc04a044d7d..0ad0ed69ef1 100644 --- a/github/packages.go +++ b/github/packages.go @@ -264,7 +264,7 @@ func (mt PackageEventContainerMetadataTag) String() string { // PackageNugetMetadata represents nuget metadata for a GitHub package. type PackageNugetMetadata struct { - ID json.RawMessage `json:"id,omitempty"` // Can either be a int64 or string + ID json.RawMessage `json:"id,omitempty"` // Can either be an int64 or string Name *string `json:"name,omitempty"` Value json.RawMessage `json:"value,omitempty"` // Can either be a bool, string, integer or object } diff --git a/github/private_registries_test.go b/github/private_registries_test.go index 5c01b6dad59..c214fd486bc 100644 --- a/github/private_registries_test.go +++ b/github/private_registries_test.go @@ -44,7 +44,7 @@ func TestPrivateRegistriesService_ListOrganizationPrivateRegistries(t *testing.T ctx := t.Context() privateRegistries, _, err := client.PrivateRegistries.ListOrganizationPrivateRegistries(ctx, "o", opts) if err != nil { - t.Fatalf("PrivateRegistries.ListOrganizationPrivateRegitries returned error: %v", err) + t.Fatalf("PrivateRegistries.ListOrganizationPrivateRegistries returned error: %v", err) } want := &PrivateRegistries{ @@ -61,7 +61,7 @@ func TestPrivateRegistriesService_ListOrganizationPrivateRegistries(t *testing.T }, } if diff := cmp.Diff(want, privateRegistries); diff != "" { - t.Errorf("PrivateRegistries.ListOrganizationPrivateRegitries mismatch (-want +got):\\n%v", diff) + t.Errorf("PrivateRegistries.ListOrganizationPrivateRegistries mismatch (-want +got):\\n%v", diff) } const methodName = "ListOrganizationPrivateRegistries" @@ -121,7 +121,7 @@ func TestPrivateRegistriesService_CreateOrganizationPrivateRegistry(t *testing.T ctx := t.Context() privateRegistry, _, err := client.PrivateRegistries.CreateOrganizationPrivateRegistry(ctx, "o", *input) if err != nil { - t.Fatalf("PrivateRegistries.CreateOrganizationPrivateRegitries returned error: %v", err) + t.Fatalf("PrivateRegistries.CreateOrganizationPrivateRegistries returned error: %v", err) } want := &PrivateRegistry{ @@ -133,7 +133,7 @@ func TestPrivateRegistriesService_CreateOrganizationPrivateRegistry(t *testing.T Visibility: Ptr(PrivateRegistryVisibilitySelected), } if diff := cmp.Diff(want, privateRegistry); diff != "" { - t.Errorf("PrivateRegistries.CreateOrganizationPrivateRegitries mismatch (-want +got):\\n%v", diff) + t.Errorf("PrivateRegistries.CreateOrganizationPrivateRegistries mismatch (-want +got):\\n%v", diff) } const methodName = "CreateOrganizationPrivateRegistry" diff --git a/github/pulls.go b/github/pulls.go index a490feb5785..917e4422124 100644 --- a/github/pulls.go +++ b/github/pulls.go @@ -142,7 +142,7 @@ type PullRequestListOptions struct { Sort string `url:"sort,omitempty"` // Direction in which to sort pull requests. Possible values are: asc, desc. - // If Sort is "created" or not specified, Default is "desc", otherwise Default + // If Sort is "created" or not specified, Default is "desc"; otherwise, Default // is "asc" Direction string `url:"direction,omitempty"` diff --git a/github/repos.go b/github/repos.go index 5388e8a87e9..92f802ae612 100644 --- a/github/repos.go +++ b/github/repos.go @@ -303,7 +303,7 @@ type RepositoryListByUserOptions struct { Sort string `url:"sort,omitempty"` // The order to sort by. - // Default: asc when using full_name, otherwise desc. + // Default: asc when using full_name; otherwise, desc. // Can be one of: asc, desc Direction string `url:"direction,omitempty"` @@ -1206,7 +1206,7 @@ type ProtectionRequest struct { AllowForkSyncing *bool `json:"allow_fork_syncing,omitempty"` } -// RequiredStatusChecks represents the protection status of a individual branch. +// RequiredStatusChecks represents the protection status of an individual branch. type RequiredStatusChecks struct { // Require branches to be up to date before merging. (Required.) Strict bool `json:"strict"` diff --git a/github/repos_autolinks.go b/github/repos_autolinks.go index 6c209b2d5e8..5bf2cede3cd 100644 --- a/github/repos_autolinks.go +++ b/github/repos_autolinks.go @@ -17,7 +17,7 @@ type AutolinkOptions struct { IsAlphanumeric *bool `json:"is_alphanumeric,omitempty"` } -// Autolink represents autolinks to external resources like JIRA issues and Zendesk tickets. +// Autolink represents autolinks to external resources like Jira issues and Zendesk tickets. type Autolink struct { ID *int64 `json:"id,omitempty"` KeyPrefix *string `json:"key_prefix,omitempty"` diff --git a/github/repos_collaborators.go b/github/repos_collaborators.go index d6c985359aa..a46f452942a 100644 --- a/github/repos_collaborators.go +++ b/github/repos_collaborators.go @@ -130,7 +130,7 @@ type RepositoryAddCollaboratorOptions struct { // Permission specifies the permission to grant the user on this repository. // Possible values are: // pull - team members can pull, but not push to or administer this repository - // push - team members can pull and push, but not administer this repository + // push - team members can push and pull, but not administer this repository // admin - team members can pull, push and administer this repository // maintain - team members can manage the repository without access to sensitive or destructive actions. // triage - team members can proactively manage issues and pull requests without write access. diff --git a/github/repos_hooks_configuration.go b/github/repos_hooks_configuration.go index 9560bd7a4ba..69d1f4060ba 100644 --- a/github/repos_hooks_configuration.go +++ b/github/repos_hooks_configuration.go @@ -16,7 +16,7 @@ type HookConfig struct { // Possible values are `json` and `form`, the field is not specified the default is `form` ContentType *string `json:"content_type,omitempty"` // The possible values are 0 and 1. - // Setting it to 1 will allow skip certificate verification for the host, + // Setting it to 1 will allow skipping certificate verification for the host, // potentially exposing to MitM attacks: https://en.wikipedia.org/wiki/Man-in-the-middle_attack InsecureSSL *string `json:"insecure_ssl,omitempty"` URL *string `json:"url,omitempty"` diff --git a/github/repos_stats.go b/github/repos_stats.go index a6ef9c0da43..b05bae6daef 100644 --- a/github/repos_stats.go +++ b/github/repos_stats.go @@ -150,7 +150,7 @@ func (s *RepositoriesService) ListCodeFrequency(ctx context.Context, owner, repo // RepositoryParticipation is the number of commits by everyone // who has contributed to the repository (including the owner) -// as well as the number of commits by the owner themself. +// as well as the number of commits by the owner themselves. type RepositoryParticipation struct { All []int `json:"all,omitempty"` Owner []int `json:"owner,omitempty"` diff --git a/github/secret_scanning_pattern_configs_test.go b/github/secret_scanning_pattern_configs_test.go index 0ed84719159..11ae9765b56 100644 --- a/github/secret_scanning_pattern_configs_test.go +++ b/github/secret_scanning_pattern_configs_test.go @@ -547,7 +547,7 @@ func TestSecretScanningProviderPatternSetting_Marshal(t *testing.T) { testJSONMarshal(t, v, want) } -func TestSecretScanninCustomPatternSetting_Marshal(t *testing.T) { +func TestSecretScanningCustomPatternSetting_Marshal(t *testing.T) { t.Parallel() testJSONMarshal(t, &SecretScanningCustomPatternSetting{}, `{}`) diff --git a/github/teams.go b/github/teams.go index 2214dfe30d8..682c6508185 100644 --- a/github/teams.go +++ b/github/teams.go @@ -504,7 +504,7 @@ type TeamAddTeamRepoOptions struct { // Permission specifies the permission to grant the team on this repository. // Possible values are: // pull - team members can pull, but not push to or administer this repository - // push - team members can pull and push, but not administer this repository + // push - team members can push and pull, but not administer this repository // admin - team members can pull, push and administer this repository // maintain - team members can manage the repository without access to sensitive or destructive actions. // triage - team members can proactively manage issues and pull requests without write access. diff --git a/github/users_administration.go b/github/users_administration.go index 5d0d4c15e76..69d23cb2381 100644 --- a/github/users_administration.go +++ b/github/users_administration.go @@ -42,7 +42,7 @@ func (s *UsersService) DemoteSiteAdmin(ctx context.Context, user string) (*Respo return s.client.Do(ctx, req, nil) } -// UserSuspendOptions represents the reason a user is being suspended. +// UserSuspendOptions represents the reason to suspend a user. type UserSuspendOptions struct { Reason *string `json:"reason,omitempty"` } diff --git a/scrape/scrape_test.go b/scrape/scrape_test.go index ca0452374d8..d77857da478 100644 --- a/scrape/scrape_test.go +++ b/scrape/scrape_test.go @@ -15,7 +15,7 @@ import ( "testing" ) -// setup a test HTTP server along with a scrape.Client that is configured to +// set up a test HTTP server along with a scrape.Client that is configured to // talk to that test server. Tests should register handlers on the mux which // provide mock responses for the GitHub pages being tested. func setup(t *testing.T) (client *Client, mux *http.ServeMux) { diff --git a/test/integration/authorizations_test.go b/test/integration/authorizations_test.go index a51e8355cec..e6a492497cb 100644 --- a/test/integration/authorizations_test.go +++ b/test/integration/authorizations_test.go @@ -44,7 +44,7 @@ func TestAuthorizationsAppOperations(t *testing.T) { t.Fatal("The returned auth/token does not match.") } - // Let's verify that we get a 404 for a non-existent token + // Let's verify that we get a 404 for a nonexistent token _, resp, err = appAuthenticatedClient.Authorizations.Check(t.Context(), clientID, InvalidTokenValue) if err == nil { t.Fatal("An error should have been returned because of the invalid token.") @@ -56,7 +56,7 @@ func TestAuthorizationsAppOperations(t *testing.T) { failOnError(t, err) failIfNotStatusCode(t, resp, 200) - // Let's verify that we get a 404 for a non-existent token + // Let's verify that we get a 404 for a nonexistent token _, resp, err = appAuthenticatedClient.Authorizations.Reset(t.Context(), clientID, InvalidTokenValue) if err == nil { t.Fatal("An error should have been returned because of the invalid token.") diff --git a/test/integration/github_test.go b/test/integration/github_test.go index 560e9884d39..09975511ca2 100644 --- a/test/integration/github_test.go +++ b/test/integration/github_test.go @@ -57,7 +57,7 @@ func createRandomTestRepository(t *testing.T, owner string, autoinit bool) *gith _, resp, err := client.Repositories.Get(t.Context(), owner, repoName) if err != nil { if resp.StatusCode == http.StatusNotFound { - // found a non-existent repo, perfect + // found a nonexistent repo, perfect break } From 53d0e6ab416f1bb9de20b117e419b5cf5107651a Mon Sep 17 00:00:00 2001 From: alkak95 <58725116+alkak95@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:30:59 +0530 Subject: [PATCH 08/16] refactor!: Remove pointer from required field of CreateStatus API (#3794) BREAKING CHANGE: `RepositoriesService.CreateStatus` now takes value for `status`, not pointer. --- github/repos_statuses.go | 4 ++-- github/repos_statuses_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/github/repos_statuses.go b/github/repos_statuses.go index 21f2c4c1e58..547cc1f12cf 100644 --- a/github/repos_statuses.go +++ b/github/repos_statuses.go @@ -75,9 +75,9 @@ func (s *RepositoriesService) ListStatuses(ctx context.Context, owner, repo, ref // GitHub API docs: https://docs.github.com/rest/commits/statuses#create-a-commit-status // //meta:operation POST /repos/{owner}/{repo}/statuses/{sha} -func (s *RepositoriesService) CreateStatus(ctx context.Context, owner, repo, ref string, status *RepoStatus) (*RepoStatus, *Response, error) { +func (s *RepositoriesService) CreateStatus(ctx context.Context, owner, repo, ref string, status RepoStatus) (*RepoStatus, *Response, error) { u := fmt.Sprintf("repos/%v/%v/statuses/%v", owner, repo, refURLEscape(ref)) - req, err := s.client.NewRequest("POST", u, status) + req, err := s.client.NewRequest("POST", u, &status) if err != nil { return nil, nil, err } diff --git a/github/repos_statuses_test.go b/github/repos_statuses_test.go index 3c3057bf284..ec9b94d9640 100644 --- a/github/repos_statuses_test.go +++ b/github/repos_statuses_test.go @@ -64,14 +64,14 @@ func TestRepositoriesService_CreateStatus(t *testing.T) { t.Parallel() client, mux, _ := setup(t) - input := &RepoStatus{State: Ptr("s"), TargetURL: Ptr("t"), Description: Ptr("d")} + input := RepoStatus{State: Ptr("s"), TargetURL: Ptr("t"), Description: Ptr("d")} mux.HandleFunc("/repos/o/r/statuses/r", func(w http.ResponseWriter, r *http.Request) { v := new(RepoStatus) assertNilError(t, json.NewDecoder(r.Body).Decode(v)) testMethod(t, r, "POST") - if !cmp.Equal(v, input) { + if !cmp.Equal(v, &input) { t.Errorf("Request body = %+v, want %+v", v, input) } fmt.Fprint(w, `{"id":1}`) @@ -108,7 +108,7 @@ func TestRepositoriesService_CreateStatus_invalidOwner(t *testing.T) { client, _, _ := setup(t) ctx := t.Context() - _, _, err := client.Repositories.CreateStatus(ctx, "%", "r", "r", nil) + _, _, err := client.Repositories.CreateStatus(ctx, "%", "r", "r", RepoStatus{}) testURLParseError(t, err) } From f271152082d76d760a7794083786e68cec5220e2 Mon Sep 17 00:00:00 2001 From: elminster-aom <60017052+elminster-aom@users.noreply.github.com> Date: Sun, 2 Nov 2025 20:06:28 +0100 Subject: [PATCH 09/16] Add test cases for JSON resource marshaling - SCIM (#3798) --- github/scim_test.go | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/github/scim_test.go b/github/scim_test.go index 57642207ab9..eca8709a970 100644 --- a/github/scim_test.go +++ b/github/scim_test.go @@ -698,3 +698,62 @@ func TestSCIMProvisionedIdentities_Marshal(t *testing.T) { testJSONMarshal(t, u, want) } + +func TestSCIMProvisionedGroups_Marshal(t *testing.T) { + t.Parallel() + testJSONMarshal(t, &SCIMProvisionedGroups{}, "{}") + + u := &SCIMProvisionedGroups{ + Schemas: []string{"s1"}, + TotalResults: Ptr(1), + ItemsPerPage: Ptr(2), + StartIndex: Ptr(3), + Resources: []*SCIMGroupAttributes{ + { + DisplayName: Ptr("dn"), + Members: []*SCIMDisplayReference{ + { + Value: "v", + Ref: "r", + Display: Ptr("d"), + }, + }, + Schemas: []string{"s2"}, + ExternalID: Ptr("eid"), + ID: Ptr("id"), + Meta: &SCIMMeta{ + ResourceType: Ptr("rt"), + Created: &Timestamp{referenceTime}, + LastModified: &Timestamp{referenceTime}, + Location: Ptr("l"), + }, + }, + }, + } + + want := `{ + "schemas": ["s1"], + "totalResults": 1, + "itemsPerPage": 2, + "startIndex": 3, + "Resources": [{ + "displayName": "dn", + "members": [{ + "value": "v", + "$ref": "r", + "display": "d" + }] + ,"schemas": ["s2"], + "externalId": "eid", + "id": "id", + "meta": { + "resourceType": "rt", + "created": ` + referenceTimeStr + `, + "lastModified": ` + referenceTimeStr + `, + "location": "l" + } + }] + }` + + testJSONMarshal(t, u, want) +} From e7abb9f86a278c047c5dd113674c27e4b7e9e44d Mon Sep 17 00:00:00 2001 From: Doug Blinkhorn <52138617+dblinkhorn@users.noreply.github.com> Date: Mon, 3 Nov 2025 04:05:31 -0800 Subject: [PATCH 10/16] fix: Org/Enterprise UpdateRepositoryRulesetClearBypassActor sends empty array (#3796) --- github/enterprise_rules.go | 4 +++- github/enterprise_rules_test.go | 1 + github/orgs_rules.go | 4 +++- github/orgs_rules_test.go | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/github/enterprise_rules.go b/github/enterprise_rules.go index f438223370f..33485824f7e 100644 --- a/github/enterprise_rules.go +++ b/github/enterprise_rules.go @@ -86,7 +86,9 @@ func (s *EnterpriseService) UpdateRepositoryRuleset(ctx context.Context, enterpr func (s *EnterpriseService) UpdateRepositoryRulesetClearBypassActor(ctx context.Context, enterprise string, rulesetID int64) (*Response, error) { u := fmt.Sprintf("enterprises/%v/rulesets/%v", enterprise, rulesetID) - rsClearBypassActor := rulesetClearBypassActors{} + rsClearBypassActor := rulesetClearBypassActors{ + BypassActors: []*BypassActor{}, + } req, err := s.client.NewRequest("PUT", u, rsClearBypassActor) if err != nil { diff --git a/github/enterprise_rules_test.go b/github/enterprise_rules_test.go index 4e1bfcd235f..b72c758a53b 100644 --- a/github/enterprise_rules_test.go +++ b/github/enterprise_rules_test.go @@ -1775,6 +1775,7 @@ func TestEnterpriseService_UpdateRepositoryRulesetClearBypassActor(t *testing.T) mux.HandleFunc("/enterprises/e/rulesets/84", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "PUT") + testBody(t, r, `{"bypass_actors":[]}`+"\n") fmt.Fprint(w, `{ "id": 84, "name": "test ruleset", diff --git a/github/orgs_rules.go b/github/orgs_rules.go index 357eb8ce7cf..2b6a79387e3 100644 --- a/github/orgs_rules.go +++ b/github/orgs_rules.go @@ -113,7 +113,9 @@ func (s *OrganizationsService) UpdateRepositoryRuleset(ctx context.Context, org func (s *OrganizationsService) UpdateRepositoryRulesetClearBypassActor(ctx context.Context, org string, rulesetID int64) (*Response, error) { u := fmt.Sprintf("orgs/%v/rulesets/%v", org, rulesetID) - rsClearBypassActor := rulesetClearBypassActors{} + rsClearBypassActor := rulesetClearBypassActors{ + BypassActors: []*BypassActor{}, + } req, err := s.client.NewRequest("PUT", u, rsClearBypassActor) if err != nil { diff --git a/github/orgs_rules_test.go b/github/orgs_rules_test.go index 1086aae83f2..03f634ab4d8 100644 --- a/github/orgs_rules_test.go +++ b/github/orgs_rules_test.go @@ -1593,6 +1593,7 @@ func TestOrganizationsService_UpdateRepositoryRulesetClearBypassActor(t *testing mux.HandleFunc("/orgs/o/rulesets/21", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "PUT") + testBody(t, r, `{"bypass_actors":[]}`+"\n") fmt.Fprint(w, `{ "id": 21, "name": "test ruleset", From 2b239f2dc69ff1c01ec2fb599d49120435f85eaa Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 3 Nov 2025 05:07:06 -0700 Subject: [PATCH 11/16] feat!: Add support for project items CRUD and project fields read operations (#3793) --- github/event_types.go | 21 +- github/github-accessors.go | 176 +++++ github/github-accessors_test.go | 239 +++++++ github/projects.go | 367 +++++++++- github/projects_test.go | 1032 +++++++++++++++++++++++------ test/integration/projects_test.go | 24 +- 6 files changed, 1599 insertions(+), 260 deletions(-) diff --git a/github/event_types.go b/github/event_types.go index ba175ac72cd..4e8dc55bd10 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -1150,15 +1150,18 @@ type FieldValue struct { // ProjectV2Item represents an item belonging to a project. type ProjectV2Item struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - ProjectNodeID *string `json:"project_node_id,omitempty"` - ContentNodeID *string `json:"content_node_id,omitempty"` - ContentType *string `json:"content_type,omitempty"` - Creator *User `json:"creator,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - ArchivedAt *Timestamp `json:"archived_at,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + ProjectNodeID *string `json:"project_node_id,omitempty"` + ContentNodeID *string `json:"content_node_id,omitempty"` + ProjectURL *string `json:"project_url,omitempty"` + ContentType *string `json:"content_type,omitempty"` + Creator *User `json:"creator,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + ArchivedAt *Timestamp `json:"archived_at,omitempty"` + ItemURL *string `json:"item_url,omitempty"` + Fields []*ProjectV2Field `json:"fields,omitempty"` } // PublicEvent is triggered when a private repository is open sourced. diff --git a/github/github-accessors.go b/github/github-accessors.go index 6e2bbaf93bd..7844b5b36d0 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -14078,6 +14078,38 @@ func (l *ListOrganizations) GetTotalCount() int { return *l.TotalCount } +// GetQuery returns the Query field if it's non-nil, zero value otherwise. +func (l *ListProjectsOptions) GetQuery() string { + if l == nil || l.Query == nil { + return "" + } + return *l.Query +} + +// GetAfter returns the After field if it's non-nil, zero value otherwise. +func (l *ListProjectsPaginationOptions) GetAfter() string { + if l == nil || l.After == nil { + return "" + } + return *l.After +} + +// GetBefore returns the Before field if it's non-nil, zero value otherwise. +func (l *ListProjectsPaginationOptions) GetBefore() string { + if l == nil || l.Before == nil { + return "" + } + return *l.Before +} + +// GetPerPage returns the PerPage field if it's non-nil, zero value otherwise. +func (l *ListProjectsPaginationOptions) GetPerPage() int { + if l == nil || l.PerPage == nil { + return 0 + } + return *l.PerPage +} + // GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. func (l *ListRepositories) GetTotalCount() int { if l == nil || l.TotalCount == nil { @@ -19118,6 +19150,14 @@ func (p *ProjectV2Event) GetSender() *User { return p.Sender } +// GetConfiguration returns the Configuration field. +func (p *ProjectV2Field) GetConfiguration() *ProjectV2FieldConfiguration { + if p == nil { + return nil + } + return p.Configuration +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (p *ProjectV2Field) GetCreatedAt() Timestamp { if p == nil || p.CreatedAt == nil { @@ -19126,6 +19166,14 @@ func (p *ProjectV2Field) GetCreatedAt() Timestamp { return *p.CreatedAt } +// GetDataType returns the DataType field if it's non-nil, zero value otherwise. +func (p *ProjectV2Field) GetDataType() string { + if p == nil || p.DataType == nil { + return "" + } + return *p.DataType +} + // GetID returns the ID field if it's non-nil, zero value otherwise. func (p *ProjectV2Field) GetID() int64 { if p == nil || p.ID == nil { @@ -19134,6 +19182,30 @@ func (p *ProjectV2Field) GetID() int64 { return *p.ID } +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *ProjectV2Field) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *ProjectV2Field) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" + } + return *p.NodeID +} + +// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. +func (p *ProjectV2Field) GetProjectURL() string { + if p == nil || p.ProjectURL == nil { + return "" + } + return *p.ProjectURL +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (p *ProjectV2Field) GetUpdatedAt() Timestamp { if p == nil || p.UpdatedAt == nil { @@ -19142,6 +19214,86 @@ func (p *ProjectV2Field) GetUpdatedAt() Timestamp { return *p.UpdatedAt } +// GetDuration returns the Duration field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldConfiguration) GetDuration() int { + if p == nil || p.Duration == nil { + return 0 + } + return *p.Duration +} + +// GetStartDay returns the StartDay field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldConfiguration) GetStartDay() int { + if p == nil || p.StartDay == nil { + return 0 + } + return *p.StartDay +} + +// GetDuration returns the Duration field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldIteration) GetDuration() int { + if p == nil || p.Duration == nil { + return 0 + } + return *p.Duration +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldIteration) GetID() string { + if p == nil || p.ID == nil { + return "" + } + return *p.ID +} + +// GetStartDate returns the StartDate field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldIteration) GetStartDate() string { + if p == nil || p.StartDate == nil { + return "" + } + return *p.StartDate +} + +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldIteration) GetTitle() string { + if p == nil || p.Title == nil { + return "" + } + return *p.Title +} + +// GetColor returns the Color field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldOption) GetColor() string { + if p == nil || p.Color == nil { + return "" + } + return *p.Color +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldOption) GetDescription() string { + if p == nil || p.Description == nil { + return "" + } + return *p.Description +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldOption) GetID() string { + if p == nil || p.ID == nil { + return "" + } + return *p.ID +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *ProjectV2FieldOption) GetName() string { + if p == nil || p.Name == nil { + return "" + } + return *p.Name +} + // GetArchivedAt returns the ArchivedAt field if it's non-nil, zero value otherwise. func (p *ProjectV2Item) GetArchivedAt() Timestamp { if p == nil || p.ArchivedAt == nil { @@ -19190,6 +19342,14 @@ func (p *ProjectV2Item) GetID() int64 { return *p.ID } +// GetItemURL returns the ItemURL field if it's non-nil, zero value otherwise. +func (p *ProjectV2Item) GetItemURL() string { + if p == nil || p.ItemURL == nil { + return "" + } + return *p.ItemURL +} + // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. func (p *ProjectV2Item) GetNodeID() string { if p == nil || p.NodeID == nil { @@ -19206,6 +19366,14 @@ func (p *ProjectV2Item) GetProjectNodeID() string { return *p.ProjectNodeID } +// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. +func (p *ProjectV2Item) GetProjectURL() string { + if p == nil || p.ProjectURL == nil { + return "" + } + return *p.ProjectURL +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (p *ProjectV2Item) GetUpdatedAt() Timestamp { if p == nil || p.UpdatedAt == nil { @@ -28966,6 +29134,14 @@ func (u *UpdateOrganizationPrivateRegistry) GetVisibility() *PrivateRegistryVisi return u.Visibility } +// GetArchived returns the Archived field if it's non-nil, zero value otherwise. +func (u *UpdateProjectItemOptions) GetArchived() bool { + if u == nil || u.Archived == nil { + return false + } + return *u.Archived +} + // GetForce returns the Force field if it's non-nil, zero value otherwise. func (u *UpdateRef) GetForce() bool { if u == nil || u.Force == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 32d44331180..c6ece7ee50a 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -18288,6 +18288,50 @@ func TestListOrganizations_GetTotalCount(tt *testing.T) { l.GetTotalCount() } +func TestListProjectsOptions_GetQuery(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &ListProjectsOptions{Query: &zeroValue} + l.GetQuery() + l = &ListProjectsOptions{} + l.GetQuery() + l = nil + l.GetQuery() +} + +func TestListProjectsPaginationOptions_GetAfter(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &ListProjectsPaginationOptions{After: &zeroValue} + l.GetAfter() + l = &ListProjectsPaginationOptions{} + l.GetAfter() + l = nil + l.GetAfter() +} + +func TestListProjectsPaginationOptions_GetBefore(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &ListProjectsPaginationOptions{Before: &zeroValue} + l.GetBefore() + l = &ListProjectsPaginationOptions{} + l.GetBefore() + l = nil + l.GetBefore() +} + +func TestListProjectsPaginationOptions_GetPerPage(tt *testing.T) { + tt.Parallel() + var zeroValue int + l := &ListProjectsPaginationOptions{PerPage: &zeroValue} + l.GetPerPage() + l = &ListProjectsPaginationOptions{} + l.GetPerPage() + l = nil + l.GetPerPage() +} + func TestListRepositories_GetTotalCount(tt *testing.T) { tt.Parallel() var zeroValue int @@ -24825,6 +24869,14 @@ func TestProjectV2Event_GetSender(tt *testing.T) { p.GetSender() } +func TestProjectV2Field_GetConfiguration(tt *testing.T) { + tt.Parallel() + p := &ProjectV2Field{} + p.GetConfiguration() + p = nil + p.GetConfiguration() +} + func TestProjectV2Field_GetCreatedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -24836,6 +24888,17 @@ func TestProjectV2Field_GetCreatedAt(tt *testing.T) { p.GetCreatedAt() } +func TestProjectV2Field_GetDataType(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2Field{DataType: &zeroValue} + p.GetDataType() + p = &ProjectV2Field{} + p.GetDataType() + p = nil + p.GetDataType() +} + func TestProjectV2Field_GetID(tt *testing.T) { tt.Parallel() var zeroValue int64 @@ -24847,6 +24910,39 @@ func TestProjectV2Field_GetID(tt *testing.T) { p.GetID() } +func TestProjectV2Field_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2Field{Name: &zeroValue} + p.GetName() + p = &ProjectV2Field{} + p.GetName() + p = nil + p.GetName() +} + +func TestProjectV2Field_GetNodeID(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2Field{NodeID: &zeroValue} + p.GetNodeID() + p = &ProjectV2Field{} + p.GetNodeID() + p = nil + p.GetNodeID() +} + +func TestProjectV2Field_GetProjectURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2Field{ProjectURL: &zeroValue} + p.GetProjectURL() + p = &ProjectV2Field{} + p.GetProjectURL() + p = nil + p.GetProjectURL() +} + func TestProjectV2Field_GetUpdatedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -24858,6 +24954,116 @@ func TestProjectV2Field_GetUpdatedAt(tt *testing.T) { p.GetUpdatedAt() } +func TestProjectV2FieldConfiguration_GetDuration(tt *testing.T) { + tt.Parallel() + var zeroValue int + p := &ProjectV2FieldConfiguration{Duration: &zeroValue} + p.GetDuration() + p = &ProjectV2FieldConfiguration{} + p.GetDuration() + p = nil + p.GetDuration() +} + +func TestProjectV2FieldConfiguration_GetStartDay(tt *testing.T) { + tt.Parallel() + var zeroValue int + p := &ProjectV2FieldConfiguration{StartDay: &zeroValue} + p.GetStartDay() + p = &ProjectV2FieldConfiguration{} + p.GetStartDay() + p = nil + p.GetStartDay() +} + +func TestProjectV2FieldIteration_GetDuration(tt *testing.T) { + tt.Parallel() + var zeroValue int + p := &ProjectV2FieldIteration{Duration: &zeroValue} + p.GetDuration() + p = &ProjectV2FieldIteration{} + p.GetDuration() + p = nil + p.GetDuration() +} + +func TestProjectV2FieldIteration_GetID(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2FieldIteration{ID: &zeroValue} + p.GetID() + p = &ProjectV2FieldIteration{} + p.GetID() + p = nil + p.GetID() +} + +func TestProjectV2FieldIteration_GetStartDate(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2FieldIteration{StartDate: &zeroValue} + p.GetStartDate() + p = &ProjectV2FieldIteration{} + p.GetStartDate() + p = nil + p.GetStartDate() +} + +func TestProjectV2FieldIteration_GetTitle(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2FieldIteration{Title: &zeroValue} + p.GetTitle() + p = &ProjectV2FieldIteration{} + p.GetTitle() + p = nil + p.GetTitle() +} + +func TestProjectV2FieldOption_GetColor(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2FieldOption{Color: &zeroValue} + p.GetColor() + p = &ProjectV2FieldOption{} + p.GetColor() + p = nil + p.GetColor() +} + +func TestProjectV2FieldOption_GetDescription(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2FieldOption{Description: &zeroValue} + p.GetDescription() + p = &ProjectV2FieldOption{} + p.GetDescription() + p = nil + p.GetDescription() +} + +func TestProjectV2FieldOption_GetID(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2FieldOption{ID: &zeroValue} + p.GetID() + p = &ProjectV2FieldOption{} + p.GetID() + p = nil + p.GetID() +} + +func TestProjectV2FieldOption_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2FieldOption{Name: &zeroValue} + p.GetName() + p = &ProjectV2FieldOption{} + p.GetName() + p = nil + p.GetName() +} + func TestProjectV2Item_GetArchivedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -24921,6 +25127,17 @@ func TestProjectV2Item_GetID(tt *testing.T) { p.GetID() } +func TestProjectV2Item_GetItemURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2Item{ItemURL: &zeroValue} + p.GetItemURL() + p = &ProjectV2Item{} + p.GetItemURL() + p = nil + p.GetItemURL() +} + func TestProjectV2Item_GetNodeID(tt *testing.T) { tt.Parallel() var zeroValue string @@ -24943,6 +25160,17 @@ func TestProjectV2Item_GetProjectNodeID(tt *testing.T) { p.GetProjectNodeID() } +func TestProjectV2Item_GetProjectURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + p := &ProjectV2Item{ProjectURL: &zeroValue} + p.GetProjectURL() + p = &ProjectV2Item{} + p.GetProjectURL() + p = nil + p.GetProjectURL() +} + func TestProjectV2Item_GetUpdatedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -37313,6 +37541,17 @@ func TestUpdateOrganizationPrivateRegistry_GetVisibility(tt *testing.T) { u.GetVisibility() } +func TestUpdateProjectItemOptions_GetArchived(tt *testing.T) { + tt.Parallel() + var zeroValue bool + u := &UpdateProjectItemOptions{Archived: &zeroValue} + u.GetArchived() + u = &UpdateProjectItemOptions{} + u.GetArchived() + u = nil + u.GetArchived() +} + func TestUpdateRef_GetForce(tt *testing.T) { tt.Parallel() var zeroValue bool diff --git a/github/projects.go b/github/projects.go index 9f562fee865..1ccadaeaae5 100644 --- a/github/projects.go +++ b/github/projects.go @@ -57,13 +57,13 @@ func (p ProjectV2) String() string { return Stringify(p) } // per page (max 100 per GitHub API docs). type ListProjectsPaginationOptions struct { // A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. - Before string `url:"before,omitempty"` + Before *string `url:"before,omitempty"` // A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. - After string `url:"after,omitempty"` + After *string `url:"after,omitempty"` // For paginated result sets, the number of results to include per page. - PerPage int `url:"per_page,omitempty"` + PerPage *int `url:"per_page,omitempty"` } // ListProjectsOptions specifies optional parameters to list projects for user / organization. @@ -71,7 +71,7 @@ type ListProjectsOptions struct { ListProjectsPaginationOptions // Q is an optional query string to limit results to projects of the specified type. - Query string `url:"q,omitempty"` + Query *string `url:"q,omitempty"` } // ProjectV2FieldOption represents an option for a project field of type single_select or multi_select. @@ -79,13 +79,31 @@ type ListProjectsOptions struct { // // GitHub API docs: https://docs.github.com/rest/projects/fields type ProjectV2FieldOption struct { - ID string `json:"id,omitempty"` - // The display name of the option. - Name string `json:"name,omitempty"` - // The color associated with this option (e.g., "blue", "red"). - Color string `json:"color,omitempty"` - // An optional description for this option. - Description string `json:"description,omitempty"` + ID *string `json:"id,omitempty"` // The unique identifier for this option. + Name *string `json:"name,omitempty"` // The display name of the option. + Color *string `json:"color,omitempty"` // The color associated with this option (e.g., "blue", "red"). + Description *string `json:"description,omitempty"` // An optional description for this option. +} + +// ProjectV2FieldIteration represents an iteration within a project field of type iteration. +// It defines a specific time-bound period that can be associated with project items. +// +// GitHub API docs: https://docs.github.com/rest/projects/fields +type ProjectV2FieldIteration struct { + ID *string `json:"id,omitempty"` // The unique identifier for the iteration. + Title *string `json:"title,omitempty"` // The title of the iteration. + StartDate *string `json:"start_date,omitempty"` // The start date of the iteration in ISO 8601 format. + Duration *int `json:"duration,omitempty"` // The duration of the iteration in seconds. +} + +// ProjectV2FieldConfiguration represents the configuration for a project field of type iteration. +// It defines settings such as duration and start day for iterations within the project. +// +// GitHub API docs: https://docs.github.com/rest/projects/fields +type ProjectV2FieldConfiguration struct { + Duration *int `json:"duration,omitempty"` // The duration of the iteration field in seconds. + StartDay *int `json:"start_day,omitempty"` // The start day for the iteration. + Iterations []*ProjectV2FieldIteration `json:"iterations,omitempty"` // The list of iterations associated with the configuration. } // ProjectV2Field represents a field in a GitHub Projects V2 project. @@ -93,22 +111,23 @@ type ProjectV2FieldOption struct { // // GitHub API docs: https://docs.github.com/rest/projects/fields type ProjectV2Field struct { - ID *int64 `json:"id,omitempty"` - NodeID string `json:"node_id,omitempty"` - Name string `json:"name,omitempty"` - DataType string `json:"dataType,omitempty"` - URL string `json:"url,omitempty"` - Options []*any `json:"options,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Name *string `json:"name,omitempty"` + DataType *string `json:"data_type,omitempty"` + ProjectURL *string `json:"project_url,omitempty"` + Options []*ProjectV2FieldOption `json:"options,omitempty"` + Configuration *ProjectV2FieldConfiguration `json:"configuration,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` } -// ListProjectsForOrg lists Projects V2 for an organization. +// ListOrganizationProjects lists Projects V2 for an organization. // // GitHub API docs: https://docs.github.com/rest/projects/projects#list-projects-for-organization // //meta:operation GET /orgs/{org}/projectsV2 -func (s *ProjectsService) ListProjectsForOrg(ctx context.Context, org string, opts *ListProjectsOptions) ([]*ProjectV2, *Response, error) { +func (s *ProjectsService) ListOrganizationProjects(ctx context.Context, org string, opts *ListProjectsOptions) ([]*ProjectV2, *Response, error) { u := fmt.Sprintf("orgs/%v/projectsV2", org) u, err := addOptions(u, opts) if err != nil { @@ -128,12 +147,12 @@ func (s *ProjectsService) ListProjectsForOrg(ctx context.Context, org string, op return projects, resp, nil } -// GetProjectForOrg gets a Projects V2 project for an organization by ID. +// GetOrganizationProject gets a Projects V2 project for an organization by ID. // // GitHub API docs: https://docs.github.com/rest/projects/projects#get-project-for-organization // //meta:operation GET /orgs/{org}/projectsV2/{project_number} -func (s *ProjectsService) GetProjectForOrg(ctx context.Context, org string, projectNumber int) (*ProjectV2, *Response, error) { +func (s *ProjectsService) GetOrganizationProject(ctx context.Context, org string, projectNumber int) (*ProjectV2, *Response, error) { u := fmt.Sprintf("orgs/%v/projectsV2/%v", org, projectNumber) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -148,12 +167,12 @@ func (s *ProjectsService) GetProjectForOrg(ctx context.Context, org string, proj return project, resp, nil } -// ListProjectsForUser lists Projects V2 for a user. +// ListUserProjects lists Projects V2 for a user. // // GitHub API docs: https://docs.github.com/rest/projects/projects#list-projects-for-user // //meta:operation GET /users/{username}/projectsV2 -func (s *ProjectsService) ListProjectsForUser(ctx context.Context, username string, opts *ListProjectsOptions) ([]*ProjectV2, *Response, error) { +func (s *ProjectsService) ListUserProjects(ctx context.Context, username string, opts *ListProjectsOptions) ([]*ProjectV2, *Response, error) { u := fmt.Sprintf("users/%v/projectsV2", username) u, err := addOptions(u, opts) if err != nil { @@ -172,12 +191,12 @@ func (s *ProjectsService) ListProjectsForUser(ctx context.Context, username stri return projects, resp, nil } -// GetProjectForUser gets a Projects V2 project for a user by ID. +// GetUserProject gets a Projects V2 project for a user by ID. // // GitHub API docs: https://docs.github.com/rest/projects/projects#get-project-for-user // //meta:operation GET /users/{username}/projectsV2/{project_number} -func (s *ProjectsService) GetProjectForUser(ctx context.Context, username string, projectNumber int) (*ProjectV2, *Response, error) { +func (s *ProjectsService) GetUserProject(ctx context.Context, username string, projectNumber int) (*ProjectV2, *Response, error) { u := fmt.Sprintf("users/%v/projectsV2/%v", username, projectNumber) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -192,12 +211,12 @@ func (s *ProjectsService) GetProjectForUser(ctx context.Context, username string return project, resp, nil } -// ListProjectFieldsForOrg lists Projects V2 for an organization. +// ListOrganizationProjectFields lists Projects V2 for an organization. // // GitHub API docs: https://docs.github.com/rest/projects/fields#list-project-fields-for-organization // //meta:operation GET /orgs/{org}/projectsV2/{project_number}/fields -func (s *ProjectsService) ListProjectFieldsForOrg(ctx context.Context, org string, projectNumber int, opts *ListProjectsOptions) ([]*ProjectV2Field, *Response, error) { +func (s *ProjectsService) ListOrganizationProjectFields(ctx context.Context, org string, projectNumber int, opts *ListProjectsOptions) ([]*ProjectV2Field, *Response, error) { u := fmt.Sprintf("orgs/%v/projectsV2/%v/fields", org, projectNumber) u, err := addOptions(u, opts) if err != nil { @@ -216,3 +235,293 @@ func (s *ProjectsService) ListProjectFieldsForOrg(ctx context.Context, org strin } return fields, resp, nil } + +// ListUserProjectFields lists Projects V2 for a user. +// +// GitHub API docs: https://docs.github.com/rest/projects/fields#list-project-fields-for-user +// +//meta:operation GET /users/{username}/projectsV2/{project_number}/fields +func (s *ProjectsService) ListUserProjectFields(ctx context.Context, user string, projectNumber int, opts *ListProjectsOptions) ([]*ProjectV2Field, *Response, error) { + u := fmt.Sprintf("users/%v/projectsV2/%v/fields", user, projectNumber) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var fields []*ProjectV2Field + resp, err := s.client.Do(ctx, req, &fields) + if err != nil { + return nil, resp, err + } + return fields, resp, nil +} + +// GetOrganizationProjectField gets a single project field from an organization owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/fields#get-project-field-for-organization +// +//meta:operation GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id} +func (s *ProjectsService) GetOrganizationProjectField(ctx context.Context, org string, projectNumber int, fieldID int64) (*ProjectV2Field, *Response, error) { + u := fmt.Sprintf("orgs/%v/projectsV2/%v/fields/%v", org, projectNumber, fieldID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + field := new(ProjectV2Field) + resp, err := s.client.Do(ctx, req, field) + if err != nil { + return nil, resp, err + } + return field, resp, nil +} + +// GetUserProjectField gets a single project field from a user owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/fields#get-project-field-for-user +// +//meta:operation GET /users/{username}/projectsV2/{project_number}/fields/{field_id} +func (s *ProjectsService) GetUserProjectField(ctx context.Context, user string, projectNumber int, fieldID int64) (*ProjectV2Field, *Response, error) { + u := fmt.Sprintf("users/%v/projectsV2/%v/fields/%v", user, projectNumber, fieldID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + field := new(ProjectV2Field) + resp, err := s.client.Do(ctx, req, field) + if err != nil { + return nil, resp, err + } + return field, resp, nil +} + +// ListProjectItemsOptions specifies optional parameters when listing project items. +// Note: Pagination uses before/after cursor-style pagination similar to ListProjectsOptions. +// "Fields" can be used to restrict which field values are returned (by their numeric IDs). +type ListProjectItemsOptions struct { + // Embed ListProjectsOptions to reuse pagination and query parameters. + ListProjectsOptions + // Fields restricts which field values are returned by numeric field IDs. + Fields []int64 `url:"fields,omitempty,comma"` +} + +// GetProjectItemOptions specifies optional parameters when getting a project item. +type GetProjectItemOptions struct { + // Fields restricts which field values are returned by numeric field IDs. + Fields []int64 `url:"fields,omitempty,comma"` +} + +// AddProjectItemOptions represents the payload to add an item (issue or pull request) +// to a project. The Type must be either "Issue" or "PullRequest" (as per API docs) and +// ID is the numerical ID of that issue or pull request. +type AddProjectItemOptions struct { + Type string `json:"type,omitempty"` + ID int64 `json:"id,omitempty"` +} + +// UpdateProjectItemOptions represents fields that can be modified for a project item. +// Currently the REST API allows archiving/unarchiving an item (archived boolean). +// This struct can be expanded in the future as the API grows. +type UpdateProjectItemOptions struct { + // Archived indicates whether the item should be archived (true) or unarchived (false). + Archived *bool `json:"archived,omitempty"` + // Fields allows updating field values for the item. Each entry supplies a field ID and a value. + Fields []*ProjectV2Field `json:"fields,omitempty"` +} + +// ListOrganizationProjectItems lists items for an organization owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#list-items-for-an-organization-owned-project +// +//meta:operation GET /orgs/{org}/projectsV2/{project_number}/items +func (s *ProjectsService) ListOrganizationProjectItems(ctx context.Context, org string, projectNumber int, opts *ListProjectItemsOptions) ([]*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("orgs/%v/projectsV2/%v/items", org, projectNumber) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var items []*ProjectV2Item + resp, err := s.client.Do(ctx, req, &items) + if err != nil { + return nil, resp, err + } + return items, resp, nil +} + +// AddOrganizationProjectItem adds an issue or pull request item to an organization owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#add-item-to-organization-owned-project +// +//meta:operation POST /orgs/{org}/projectsV2/{project_number}/items +func (s *ProjectsService) AddOrganizationProjectItem(ctx context.Context, org string, projectNumber int, opts *AddProjectItemOptions) (*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("orgs/%v/projectsV2/%v/items", org, projectNumber) + req, err := s.client.NewRequest("POST", u, opts) + if err != nil { + return nil, nil, err + } + + item := new(ProjectV2Item) + resp, err := s.client.Do(ctx, req, item) + if err != nil { + return nil, resp, err + } + return item, resp, nil +} + +// GetOrganizationProjectItem gets a single item from an organization owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#get-an-item-for-an-organization-owned-project +// +//meta:operation GET /orgs/{org}/projectsV2/{project_number}/items/{item_id} +func (s *ProjectsService) GetOrganizationProjectItem(ctx context.Context, org string, projectNumber int, itemID int64, opts *GetProjectItemOptions) (*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("orgs/%v/projectsV2/%v/items/%v", org, projectNumber, itemID) + req, err := s.client.NewRequest("GET", u, opts) + if err != nil { + return nil, nil, err + } + item := new(ProjectV2Item) + resp, err := s.client.Do(ctx, req, item) + if err != nil { + return nil, resp, err + } + return item, resp, nil +} + +// UpdateOrganizationProjectItem updates an item in an organization owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#update-project-item-for-organization +// +//meta:operation PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id} +func (s *ProjectsService) UpdateOrganizationProjectItem(ctx context.Context, org string, projectNumber int, itemID int64, opts *UpdateProjectItemOptions) (*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("orgs/%v/projectsV2/%v/items/%v", org, projectNumber, itemID) + req, err := s.client.NewRequest("PATCH", u, opts) + if err != nil { + return nil, nil, err + } + item := new(ProjectV2Item) + resp, err := s.client.Do(ctx, req, item) + if err != nil { + return nil, resp, err + } + return item, resp, nil +} + +// DeleteOrganizationProjectItem deletes an item from an organization owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#delete-project-item-for-organization +// +//meta:operation DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id} +func (s *ProjectsService) DeleteOrganizationProjectItem(ctx context.Context, org string, projectNumber int, itemID int64) (*Response, error) { + u := fmt.Sprintf("orgs/%v/projectsV2/%v/items/%v", org, projectNumber, itemID) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + return s.client.Do(ctx, req, nil) +} + +// ListUserProjectItems lists items for a user owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#list-items-for-a-user-owned-project +// +//meta:operation GET /users/{username}/projectsV2/{project_number}/items +func (s *ProjectsService) ListUserProjectItems(ctx context.Context, username string, projectNumber int, opts *ListProjectItemsOptions) ([]*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("users/%v/projectsV2/%v/items", username, projectNumber) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + var items []*ProjectV2Item + resp, err := s.client.Do(ctx, req, &items) + if err != nil { + return nil, resp, err + } + return items, resp, nil +} + +// AddUserProjectItem adds an issue or pull request item to a user owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#add-item-to-user-owned-project +// +//meta:operation POST /users/{username}/projectsV2/{project_number}/items +func (s *ProjectsService) AddUserProjectItem(ctx context.Context, username string, projectNumber int, opts *AddProjectItemOptions) (*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("users/%v/projectsV2/%v/items", username, projectNumber) + req, err := s.client.NewRequest("POST", u, opts) + if err != nil { + return nil, nil, err + } + item := new(ProjectV2Item) + resp, err := s.client.Do(ctx, req, item) + if err != nil { + return nil, resp, err + } + return item, resp, nil +} + +// GetUserProjectItem gets a single item from a user owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#get-an-item-for-a-user-owned-project +// +//meta:operation GET /users/{username}/projectsV2/{project_number}/items/{item_id} +func (s *ProjectsService) GetUserProjectItem(ctx context.Context, username string, projectNumber int, itemID int64, opts *GetProjectItemOptions) (*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("users/%v/projectsV2/%v/items/%v", username, projectNumber, itemID) + req, err := s.client.NewRequest("GET", u, opts) + if err != nil { + return nil, nil, err + } + item := new(ProjectV2Item) + resp, err := s.client.Do(ctx, req, item) + if err != nil { + return nil, resp, err + } + return item, resp, nil +} + +// UpdateUserProjectItem updates an item in a user owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#update-project-item-for-user +// +//meta:operation PATCH /users/{username}/projectsV2/{project_number}/items/{item_id} +func (s *ProjectsService) UpdateUserProjectItem(ctx context.Context, username string, projectNumber int, itemID int64, opts *UpdateProjectItemOptions) (*ProjectV2Item, *Response, error) { + u := fmt.Sprintf("users/%v/projectsV2/%v/items/%v", username, projectNumber, itemID) + req, err := s.client.NewRequest("PATCH", u, opts) + if err != nil { + return nil, nil, err + } + item := new(ProjectV2Item) + resp, err := s.client.Do(ctx, req, item) + if err != nil { + return nil, resp, err + } + return item, resp, nil +} + +// DeleteUserProjectItem deletes an item from a user owned project. +// +// GitHub API docs: https://docs.github.com/rest/projects/items#delete-project-item-for-user +// +//meta:operation DELETE /users/{username}/projectsV2/{project_number}/items/{item_id} +func (s *ProjectsService) DeleteUserProjectItem(ctx context.Context, username string, projectNumber int, itemID int64) (*Response, error) { + u := fmt.Sprintf("users/%v/projectsV2/%v/items/%v", username, projectNumber, itemID) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + return s.client.Do(ctx, req, nil) +} diff --git a/github/projects_test.go b/github/projects_test.go index a5f71c0d675..4bb656b9e4b 100644 --- a/github/projects_test.go +++ b/github/projects_test.go @@ -8,11 +8,12 @@ package github import ( "context" "fmt" + "io" "net/http" "testing" ) -func TestProjectsService_ListProjectsForOrg(t *testing.T) { +func TestProjectsService_ListOrganizationProjects(t *testing.T) { t.Parallel() client, mux, _ := setup(t) @@ -29,24 +30,24 @@ func TestProjectsService_ListProjectsForOrg(t *testing.T) { fmt.Fprint(w, `[{"id":1,"title":"T1","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) }) - opts := &ListProjectsOptions{Query: "alpha", ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: "2", Before: "1"}} + opts := &ListProjectsOptions{Query: Ptr("alpha"), ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: Ptr("2"), Before: Ptr("1")}} ctx := t.Context() - projects, _, err := client.Projects.ListProjectsForOrg(ctx, "o", opts) + projects, _, err := client.Projects.ListOrganizationProjects(ctx, "o", opts) if err != nil { - t.Fatalf("Projects.ListProjectsForOrg returned error: %v", err) + t.Fatalf("Projects.ListOrganizationProjects returned error: %v", err) } if len(projects) != 1 || projects[0].GetID() != 1 || projects[0].GetTitle() != "T1" { - t.Fatalf("Projects.ListProjectsForOrg returned %+v", projects) + t.Fatalf("Projects.ListOrganizationProjects returned %+v", projects) } - const methodName = "ListProjectsForOrg" + const methodName = "ListOrganizationProjects" testBadOptions(t, methodName, func() (err error) { - _, _, err = client.Projects.ListProjectsForOrg(ctx, "\n", opts) + _, _, err = client.Projects.ListOrganizationProjects(ctx, "\n", opts) return err }) testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { - got, resp, err := client.Projects.ListProjectsForOrg(ctx, "o", opts) + got, resp, err := client.Projects.ListOrganizationProjects(ctx, "o", opts) if got != nil { t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) } @@ -55,12 +56,12 @@ func TestProjectsService_ListProjectsForOrg(t *testing.T) { // still allow both set (no validation enforced) – ensure it does not error ctxBypass := context.WithValue(t.Context(), BypassRateLimitCheck, true) - if _, _, err = client.Projects.ListProjectsForOrg(ctxBypass, "o", &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: "b", After: "a"}}); err != nil { + if _, _, err = client.Projects.ListOrganizationProjects(ctxBypass, "o", &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: Ptr("b"), After: Ptr("a")}}); err != nil { t.Fatalf("unexpected error when both before/after set: %v", err) } } -func TestProjectsService_GetProjectForOrg(t *testing.T) { +func TestProjectsService_GetOrganizationProject(t *testing.T) { t.Parallel() client, mux, _ := setup(t) @@ -70,17 +71,17 @@ func TestProjectsService_GetProjectForOrg(t *testing.T) { }) ctx := t.Context() - project, _, err := client.Projects.GetProjectForOrg(ctx, "o", 1) + project, _, err := client.Projects.GetOrganizationProject(ctx, "o", 1) if err != nil { - t.Fatalf("Projects.GetProjectForOrg returned error: %v", err) + t.Fatalf("Projects.GetOrganizationProject returned error: %v", err) } if project.GetID() != 1 || project.GetTitle() != "OrgProj" { - t.Fatalf("Projects.GetProjectForOrg returned %+v", project) + t.Fatalf("Projects.GetOrganizationProject returned %+v", project) } - const methodName = "GetProjectForOrg" + const methodName = "GetOrganizationProject" testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { - got, resp, err := client.Projects.GetProjectForOrg(ctx, "o", 1) + got, resp, err := client.Projects.GetOrganizationProject(ctx, "o", 1) if got != nil { t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) } @@ -104,25 +105,25 @@ func TestProjectsService_ListUserProjects(t *testing.T) { fmt.Fprint(w, `[{"id":2,"title":"UProj","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) }) - opts := &ListProjectsOptions{Query: "beta", ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: "1", After: "2", PerPage: 2}} + opts := &ListProjectsOptions{Query: Ptr("beta"), ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: Ptr("1"), After: Ptr("2"), PerPage: Ptr(2)}} ctx := t.Context() var ctxBypass context.Context - projects, _, err := client.Projects.ListProjectsForUser(ctx, "u", opts) + projects, _, err := client.Projects.ListUserProjects(ctx, "u", opts) if err != nil { - t.Fatalf("Projects.ListProjectsForUser returned error: %v", err) + t.Fatalf("Projects.ListUserProjects returned error: %v", err) } if len(projects) != 1 || projects[0].GetID() != 2 || projects[0].GetTitle() != "UProj" { - t.Fatalf("Projects.ListProjectsForUser returned %+v", projects) + t.Fatalf("Projects.ListUserProjects returned %+v", projects) } - const methodName = "ListProjectsForUser" + const methodName = "ListUserProjects" testBadOptions(t, methodName, func() (err error) { - _, _, err = client.Projects.ListProjectsForUser(ctx, "\n", opts) + _, _, err = client.Projects.ListUserProjects(ctx, "\n", opts) return err }) testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { - got, resp, err := client.Projects.ListProjectsForUser(ctx, "u", opts) + got, resp, err := client.Projects.ListUserProjects(ctx, "u", opts) if got != nil { t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) } @@ -131,32 +132,32 @@ func TestProjectsService_ListUserProjects(t *testing.T) { // still allow both set (no validation enforced) – ensure it does not error ctxBypass = context.WithValue(t.Context(), BypassRateLimitCheck, true) - if _, _, err = client.Projects.ListProjectsForUser(ctxBypass, "u", &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: "b", After: "a"}}); err != nil { + if _, _, err = client.Projects.ListUserProjects(ctxBypass, "u", &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: Ptr("b"), After: Ptr("a")}}); err != nil { t.Fatalf("unexpected error when both before/after set: %v", err) } } -func TestProjectsService_GetProjectForUser(t *testing.T) { +func TestProjectsService_GetUserProject(t *testing.T) { t.Parallel() client, mux, _ := setup(t) - mux.HandleFunc("/users/u/projectsV2/2", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/users/u/projectsV2/3", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":2,"title":"UProj","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}`) + fmt.Fprint(w, `{"id":3,"title":"UserProj","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}`) }) ctx := t.Context() - project, _, err := client.Projects.GetProjectForUser(ctx, "u", 2) + project, _, err := client.Projects.GetUserProject(ctx, "u", 3) if err != nil { - t.Fatalf("Projects.GetProjectForUser returned error: %v", err) + t.Fatalf("Projects.GetUserProject returned error: %v", err) } - if project.GetID() != 2 || project.GetTitle() != "UProj" { - t.Fatalf("Projects.GetProjectForUser returned %+v", project) + if project.GetID() != 3 || project.GetTitle() != "UserProj" { + t.Fatalf("Projects.GetUserProject returned %+v", project) } - const methodName = "GetProjectForUser" + const methodName = "GetUserProject" testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { - got, resp, err := client.Projects.GetProjectForUser(ctx, "u", 2) + got, resp, err := client.Projects.GetUserProject(ctx, "u", 3) if got != nil { t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) } @@ -164,80 +165,247 @@ func TestProjectsService_GetProjectForUser(t *testing.T) { }) } -func TestProjectsService_ListProjectsForOrg_pagination(t *testing.T) { +func TestProjectsService_ListOrganizationProjectFields(t *testing.T) { t.Parallel() client, mux, _ := setup(t) - // First page returns a Link header with rel="next" containing an after cursor (after=cursor2) - mux.HandleFunc("/orgs/o/projectsV2", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/orgs/o/projectsV2/1/fields", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") q := r.URL.Query() - after := q.Get("after") - before := q.Get("before") - if after == "" && before == "" { - // first request - w.Header().Set("Link", "; rel=\"next\"") - fmt.Fprint(w, `[{"id":1,"title":"P1","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) + if q.Get("before") == "b" && q.Get("after") == "a" { // bypass scenario + fmt.Fprint(w, `[]`) return } - if after == "cursor2" { - // second request simulates a previous link - w.Header().Set("Link", "; rel=\"prev\"") - fmt.Fprint(w, `[{"id":2,"title":"P2","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) - return + testFormValues(t, r, values{"after": "2", "before": "1", "q": "text"}) + fmt.Fprint(w, `[ + { + "id": 1, + "node_id": "node_1", + "name": "Status", + "data_type": "single_select", + "url": "https://api.github.com/projects/1/fields/field1", + "options": [ + {"id": "1", "name": "Todo", "color": "blue", "description": "Tasks to be done"}, + {"id": "2", "name": "In Progress", "color": "yellow"} + ], + "created_at": "2011-01-02T15:04:05Z", + "updated_at": "2012-01-02T15:04:05Z" + }, + { + "id": 2, + "node_id": "node_2", + "name": "Priority", + "data_type": "text", + "url": "https://api.github.com/projects/1/fields/field2", + "created_at": "2011-01-02T15:04:05Z", + "updated_at": "2012-01-02T15:04:05Z" } - // unexpected state - http.Error(w, "unexpected query", http.StatusBadRequest) + ]`) }) + opts := &ListProjectsOptions{Query: Ptr("text"), ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: Ptr("2"), Before: Ptr("1")}} ctx := t.Context() - first, resp, err := client.Projects.ListProjectsForOrg(ctx, "o", nil) + fields, _, err := client.Projects.ListOrganizationProjectFields(ctx, "o", 1, opts) if err != nil { - t.Fatalf("first page error: %v", err) + t.Fatalf("Projects.ListOrganizationProjectFields returned error: %v", err) } - if len(first) != 1 || first[0].GetID() != 1 { - t.Fatalf("unexpected first page %+v", first) + if len(fields) != 2 { + t.Fatalf("Projects.ListOrganizationProjectFields returned %d fields, want 2", len(fields)) } - if resp.After != "cursor2" { - t.Fatalf("expected resp.After=cursor2 got %q", resp.After) + if fields[0].ID == nil || *fields[0].ID != 1 || fields[1].ID == nil || *fields[1].ID != 2 { + t.Fatalf("unexpected field IDs: %+v", fields) } - // Use resp.After as opts.After for next page - opts := &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: resp.After}} - second, resp2, err := client.Projects.ListProjectsForOrg(ctx, "o", opts) + const methodName = "ListOrganizationProjectFields" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Projects.ListOrganizationProjectFields(ctx, "\n", 1, opts) + return err + }) + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.ListOrganizationProjectFields(ctx, "o", 1, opts) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) + ctxBypass := context.WithValue(ctx, BypassRateLimitCheck, true) + if _, _, err = client.Projects.ListOrganizationProjectFields(ctxBypass, "o", 1, &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: Ptr("b"), After: Ptr("a")}}); err != nil { + t.Fatalf("unexpected error when both before/after set: %v", err) + } +} + +func TestProjectsService_ListUserProjectFields(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/users/u/projectsV2/1/fields", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + q := r.URL.Query() + if q.Get("before") == "b" && q.Get("after") == "a" { // bypass scenario + fmt.Fprint(w, `[]`) + return + } + testFormValues(t, r, values{"after": "2", "before": "1", "q": "text"}) + fmt.Fprint(w, `[ + { + "id": 1, + "node_id": "node_1", + "name": "Status", + "data_type": "single_select", + "url": "https://api.github.com/projects/1/fields/field1", + "options": [ + {"id": "1", "name": "Todo", "color": "blue", "description": "Tasks to be done"}, + {"id": "2", "name": "In Progress", "color": "yellow"} + ], + "created_at": "2011-01-02T15:04:05Z", + "updated_at": "2012-01-02T15:04:05Z" + }, + { + "id": 2, + "node_id": "node_2", + "name": "Priority", + "data_type": "text", + "url": "https://api.github.com/projects/1/fields/field2", + "created_at": "2011-01-02T15:04:05Z", + "updated_at": "2012-01-02T15:04:05Z" + } + ]`) + }) + + opts := &ListProjectsOptions{Query: Ptr("text"), ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: Ptr("2"), Before: Ptr("1")}} + ctx := t.Context() + fields, _, err := client.Projects.ListUserProjectFields(ctx, "u", 1, opts) if err != nil { - t.Fatalf("second page error: %v", err) + t.Fatalf("Projects.ListUserProjectFields returned error: %v", err) } - if len(second) != 1 || second[0].GetID() != 2 { - t.Fatalf("unexpected second page %+v", second) + if len(fields) != 2 { + t.Fatalf("Projects.ListUserProjectFields returned %d fields, want 2", len(fields)) } - if resp2.Before != "cursor2" { - t.Fatalf("expected resp2.Before=cursor2 got %q", resp2.Before) + if fields[0].ID == nil || *fields[0].ID != 1 || fields[1].ID == nil || *fields[1].ID != 2 { + t.Fatalf("unexpected field IDs: %+v", fields) } + + const methodName = "ListUserProjectFields" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Projects.ListUserProjectFields(ctx, "\n", 1, opts) + return err + }) + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.ListUserProjectFields(ctx, "u", 1, opts) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) + ctxBypass := context.WithValue(ctx, BypassRateLimitCheck, true) + if _, _, err = client.Projects.ListUserProjectFields(ctxBypass, "u", 1, &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: Ptr("b"), After: Ptr("a")}}); err != nil { + t.Fatalf("unexpected error when both before/after set: %v", err) + } +} + +func TestProjectsService_GetOrganizationProjectField(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/projectsV2/1/fields/1", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, ` + { + "id": 1, + "node_id": "node_1", + "name": "Status", + "data_type": "single_select", + "url": "https://api.github.com/projects/1/fields/field1", + "options": [ + {"id": "1", "name": "Todo", "color": "blue", "description": "Tasks to be done"}, + {"id": "2", "name": "In Progress", "color": "yellow"} + ], + "created_at": "2011-01-02T15:04:05Z", + "updated_at": "2012-01-02T15:04:05Z" + }`) + }) + + ctx := t.Context() + field, _, err := client.Projects.GetOrganizationProjectField(ctx, "o", 1, 1) + if err != nil { + t.Fatalf("Projects.GetOrganizationProjectField returned error: %v", err) + } + if field == nil || field.ID == nil || *field.ID != 1 { + t.Fatalf("unexpected field: %+v", field) + } + + const methodName = "GetOrganizationProjectField" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.GetOrganizationProjectField(ctx, "o", 1, 1) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) } -func TestProjectsService_ListProjectsForUser_pagination(t *testing.T) { +func TestProjectsService_GetUserProjectField(t *testing.T) { t.Parallel() client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/1/fields/3", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, ` + { + "id": 3, + "node_id": "node_3", + "name": "Status", + "data_type": "single_select", + "url": "https://api.github.com/projects/1/fields/field3", + "options": [ + {"id": "1", "name": "Done", "color": "red", "description": "Done task"}, + {"id": "2", "name": "In Progress", "color": "yellow"} + ], + "created_at": "2011-01-02T15:04:05Z", + "updated_at": "2012-01-02T15:04:05Z" + }`) + }) + + ctx := t.Context() + field, _, err := client.Projects.GetUserProjectField(ctx, "u", 1, 3) + if err != nil { + t.Fatalf("Projects.GetUserProjectField returned error: %v", err) + } + if field == nil || field.ID == nil || *field.ID != 3 { + t.Fatalf("unexpected field: %+v", field) + } + + const methodName = "GetUserProjectField" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.GetUserProjectField(ctx, "u", 1, 3) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestProjectsService_ListUserProjects_pagination(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) mux.HandleFunc("/users/u/projectsV2", func(w http.ResponseWriter, r *http.Request) { q := r.URL.Query() after := q.Get("after") before := q.Get("before") - if after == "" && before == "" { // first page + if after == "" && before == "" { w.Header().Set("Link", "; rel=\"next\"") fmt.Fprint(w, `[{"id":10,"title":"UP1","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) return } - if after == "ucursor2" { // second page provides prev + if after == "ucursor2" { w.Header().Set("Link", "; rel=\"prev\"") fmt.Fprint(w, `[{"id":11,"title":"UP2","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) return } http.Error(w, "unexpected query", http.StatusBadRequest) }) - ctx := t.Context() - first, resp, err := client.Projects.ListProjectsForUser(ctx, "u", nil) + first, resp, err := client.Projects.ListUserProjects(ctx, "u", nil) if err != nil { t.Fatalf("first page error: %v", err) } @@ -248,8 +416,8 @@ func TestProjectsService_ListProjectsForUser_pagination(t *testing.T) { t.Fatalf("expected resp.After=ucursor2 got %q", resp.After) } - opts := &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: resp.After}} - second, resp2, err := client.Projects.ListProjectsForUser(ctx, "u", opts) + opts := &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: Ptr(resp.After)}} + second, resp2, err := client.Projects.ListUserProjects(ctx, "u", opts) if err != nil { t.Fatalf("second page error: %v", err) } @@ -261,122 +429,30 @@ func TestProjectsService_ListProjectsForUser_pagination(t *testing.T) { } } -func TestProjectsService_ListProjectFieldsForOrg(t *testing.T) { +func TestProjectsService_ListUserProjects_error(t *testing.T) { t.Parallel() client, mux, _ := setup(t) - - mux.HandleFunc("/orgs/o/projectsV2/1/fields", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/users/u/projectsV2", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - q := r.URL.Query() - if q.Get("before") == "b" && q.Get("after") == "a" { - fmt.Fprint(w, `[]`) - return - } - testFormValues(t, r, values{"q": "text", "after": "2", "before": "1"}) - fmt.Fprint(w, `[ - { - "id": 1, - "node_id": "node_1", - "name": "Status", - "dataType": "single_select", - "url": "https://api.github.com/projects/1/fields/field1", - "options": [ - { - "id": "option1", - "name": "Todo", - "color": "blue", - "description": "Tasks to be done" - }, - { - "id": "option2", - "name": "In Progress", - "color": "yellow" - } - ], - "created_at": "2011-01-02T15:04:05Z", - "updated_at": "2012-01-02T15:04:05Z" - }, - { - "id": 2, - "node_id": "node_2", - "name": "Priority", - "dataType": "text", - "url": "https://api.github.com/projects/1/fields/field2", - "created_at": "2011-01-02T15:04:05Z", - "updated_at": "2012-01-02T15:04:05Z" - } - ]`) + fmt.Fprint(w, `[]`) }) - - opts := &ListProjectsOptions{Query: "text", ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: "2", Before: "1"}} ctx := t.Context() - fields, _, err := client.Projects.ListProjectFieldsForOrg(ctx, "o", 1, opts) - if err != nil { - t.Fatalf("Projects.ListProjectFieldsForOrg returned error: %v", err) - } - - if len(fields) != 2 { - t.Fatalf("Projects.ListProjectFieldsForOrg returned %v fields, want 2", len(fields)) - } - - field1 := fields[0] - if field1.ID == nil || *field1.ID != 1 || field1.Name != "Status" || field1.DataType != "single_select" { - t.Errorf("First field: got ID=%v, Name=%v, DataType=%v; want 1, Status, single_select", field1.ID, field1.Name, field1.DataType) - } - if len(field1.Options) != 2 { - t.Errorf("First field options: got %v, want 2", len(field1.Options)) - } else { - getName := func(o *any) string { - if o == nil || *o == nil { - return "" - } - switch v := (*o).(type) { - case map[string]any: - if n, ok := v["name"].(string); ok { - return n - } - default: - // fall back to fmt for debug; reflection can be added if needed. - } - return "" - } - name0, name1 := getName(field1.Options[0]), getName(field1.Options[1]) - if name0 != "Todo" || name1 != "In Progress" { - t.Errorf("First field option names: got %q, %q; want Todo, In Progress", name0, name1) - } - } - - // Validate second field (without options) - field2 := fields[1] - if field2.ID == nil || *field2.ID != 2 || field2.Name != "Priority" || field2.DataType != "text" { - t.Errorf("Second field: got ID=%v, Name=%v, DataType=%v; want 2, Priority, text", field2.ID, field2.Name, field2.DataType) - } - if len(field2.Options) != 0 { - t.Errorf("Second field options: got %v, want 0", len(field2.Options)) - } - - const methodName = "ListProjectFieldsForOrg" - testBadOptions(t, methodName, func() (err error) { - _, _, err = client.Projects.ListProjectFieldsForOrg(ctx, "\n", 1, opts) - return err - }) - + const methodName = "ListUserProjects" testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { - got, resp, err := client.Projects.ListProjectFieldsForOrg(ctx, "o", 1, opts) + got, resp, err := client.Projects.ListUserProjects(ctx, "u", nil) if got != nil { t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) } return resp, err }) - - // still allow both set (no validation enforced) – ensure it does not error - ctxBypass := context.WithValue(t.Context(), BypassRateLimitCheck, true) - if _, _, err = client.Projects.ListProjectFieldsForOrg(ctxBypass, "o", 1, &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: "b", After: "a"}}); err != nil { - t.Fatalf("unexpected error when both before/after set: %v", err) - } + // bad options (bad username) should error + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Projects.ListUserProjects(ctx, "\n", nil) + return err + }) } -func TestProjectsService_ListProjectFieldsForOrg_pagination(t *testing.T) { +func TestProjectsService_ListOrganizationProjectFields_pagination(t *testing.T) { t.Parallel() client, mux, _ := setup(t) @@ -388,13 +464,13 @@ func TestProjectsService_ListProjectFieldsForOrg_pagination(t *testing.T) { if after == "" && before == "" { // first request w.Header().Set("Link", "; rel=\"next\"") - fmt.Fprint(w, `[{"id":1,"name":"Status","dataType":"single_select","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) + fmt.Fprint(w, `[{"id":1,"name":"Status","data_type":"single_select","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) return } if after == "cursor2" { // second request simulates a previous link w.Header().Set("Link", "; rel=\"prev\"") - fmt.Fprint(w, `[{"id":2,"name":"Priority","dataType":"text","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) + fmt.Fprint(w, `[{"id":2,"name":"Priority","data_type":"text","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) return } // unexpected state @@ -402,7 +478,7 @@ func TestProjectsService_ListProjectFieldsForOrg_pagination(t *testing.T) { }) ctx := t.Context() - first, resp, err := client.Projects.ListProjectFieldsForOrg(ctx, "o", 1, nil) + first, resp, err := client.Projects.ListOrganizationProjectFields(ctx, "o", 1, nil) if err != nil { t.Fatalf("first page error: %v", err) } @@ -413,8 +489,8 @@ func TestProjectsService_ListProjectFieldsForOrg_pagination(t *testing.T) { t.Fatalf("expected resp.After=cursor2 got %q", resp.After) } - opts := &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: resp.After}} - second, resp2, err := client.Projects.ListProjectFieldsForOrg(ctx, "o", 1, opts) + opts := &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: Ptr(resp.After)}} + second, resp2, err := client.Projects.ListOrganizationProjectFields(ctx, "o", 1, opts) if err != nil { t.Fatalf("second page error: %v", err) } @@ -426,6 +502,53 @@ func TestProjectsService_ListProjectFieldsForOrg_pagination(t *testing.T) { } } +func TestProjectsService_ListOrganizationProjects_pagination(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/projectsV2", func(w http.ResponseWriter, r *http.Request) { + q := r.URL.Query() + after := q.Get("after") + before := q.Get("before") + if after == "" && before == "" { + w.Header().Set("Link", "; rel=\"next\"") + fmt.Fprint(w, `[{"id":20,"title":"OP1","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) + return + } + if after == "ocursor2" { + w.Header().Set("Link", "; rel=\"prev\"") + fmt.Fprint(w, `[{"id":21,"title":"OP2","created_at":"2011-01-02T15:04:05Z","updated_at":"2012-01-02T15:04:05Z"}]`) + return + } + http.Error(w, "unexpected query", http.StatusBadRequest) + }) + + ctx := t.Context() + first, resp, err := client.Projects.ListOrganizationProjects(ctx, "o", nil) + if err != nil { + t.Fatalf("first page error: %v", err) + } + if len(first) != 1 || first[0].GetID() != 20 { + t.Fatalf("unexpected first page %+v", first) + } + if resp.After != "ocursor2" { + t.Fatalf("expected resp.After=ocursor2 got %q", resp.After) + } + + opts := &ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: Ptr(resp.After)}} + second, resp2, err := client.Projects.ListOrganizationProjects(ctx, "o", opts) + if err != nil { + t.Fatalf("second page error: %v", err) + } + if len(second) != 1 || second[0].GetID() != 21 { + t.Fatalf("unexpected second page %+v", second) + } + if resp2.Before != "ocursor2" { + t.Fatalf("expected resp2.Before=ocursor2 got %q", resp2.Before) + } +} + +// Marshal test ensures V2 fields marshal correctly. func TestProjectV2_Marshal(t *testing.T) { t.Parallel() testJSONMarshal(t, &ProjectV2{}, "{}") @@ -451,48 +574,537 @@ func TestProjectV2_Marshal(t *testing.T) { testJSONMarshal(t, p, want) } +// Marshal test ensures V2 field structures marshal correctly. func TestProjectV2Field_Marshal(t *testing.T) { t.Parallel() - testJSONMarshal(t, &ProjectV2Field{}, "{}") // empty struct - testJSONMarshal(t, &ProjectV2FieldOption{}, "{}") // option struct still individually testable - - type optStruct struct { - Color string `json:"color,omitempty"` - Description string `json:"description,omitempty"` - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - } - optVal := &optStruct{Color: "blue", Description: "Tasks to be done", ID: "option1", Name: "Todo"} - var optAny any = optVal + testJSONMarshal(t, &ProjectV2Field{}, "{}") + testJSONMarshal(t, &ProjectV2FieldOption{}, "{}") field := &ProjectV2Field{ - ID: Ptr(int64(1)), - NodeID: "node_1", - Name: "Status", - DataType: "single_select", - URL: "https://api.github.com/projects/1/fields/field1", - Options: []*any{&optAny}, + ID: Ptr(int64(2)), + NodeID: Ptr("node_1"), + Name: Ptr("Status"), + DataType: Ptr("single_select"), + ProjectURL: Ptr("https://api.github.com/projects/67890"), + Options: []*ProjectV2FieldOption{ + { + ID: Ptr("1"), + Name: Ptr("Todo"), + Color: Ptr("blue"), + Description: Ptr("Tasks to be done"), + }, + }, CreatedAt: &Timestamp{referenceTime}, UpdatedAt: &Timestamp{referenceTime}, } want := `{ - "id": 1, - "node_id": "node_1", - "name": "Status", - "dataType": "single_select", - "url": "https://api.github.com/projects/1/fields/field1", - "options": [ - { - "id": "option1", - "name": "Todo", - "color": "blue", - "description": "Tasks to be done" - } - ], - "created_at": ` + referenceTimeStr + `, - "updated_at": ` + referenceTimeStr + ` - }` + "id": 2, + "node_id": "node_1", + "name": "Status", + "data_type": "single_select", + "project_url": "https://api.github.com/projects/67890", + "options": [ + { + "id": "1", + "name": "Todo", + "color": "blue", + "description": "Tasks to be done" + } + ], + "created_at": ` + referenceTimeStr + `, + "updated_at": ` + referenceTimeStr + ` + }` testJSONMarshal(t, field, want) } + +// Marshal test ensures ProjectV2FieldConfiguration marshals correctly. +func TestProjectV2FieldConfiguration_Marshal(t *testing.T) { + t.Parallel() + testJSONMarshal(t, &ProjectV2FieldConfiguration{}, "{}") + testJSONMarshal(t, &ProjectV2FieldIteration{}, "{}") + + // Test a field with configuration (iteration field) + fieldWithConfiguration := &ProjectV2Field{ + ID: Ptr(int64(3)), + NodeID: Ptr("node_3"), + Name: Ptr("Sprint"), + DataType: Ptr("iteration"), + ProjectURL: Ptr("https://api.github.com/projects/67890"), + Configuration: &ProjectV2FieldConfiguration{ + Duration: Ptr(1209600), // 2 weeks in seconds + StartDay: Ptr(1), // Monday + Iterations: []*ProjectV2FieldIteration{ + { + ID: Ptr("iter_1"), + Title: Ptr("Sprint 1"), + StartDate: Ptr("2025-01-06"), + Duration: Ptr(1209600), + }, + { + ID: Ptr("iter_2"), + Title: Ptr("Sprint 2"), + StartDate: Ptr("2025-01-20"), + Duration: Ptr(1209600), + }, + }, + }, + CreatedAt: &Timestamp{referenceTime}, + UpdatedAt: &Timestamp{referenceTime}, + } + + want := `{ + "id": 3, + "node_id": "node_3", + "name": "Sprint", + "data_type": "iteration", + "project_url": "https://api.github.com/projects/67890", + "configuration": { + "duration": 1209600, + "start_day": 1, + "iterations": [ + { + "id": "iter_1", + "title": "Sprint 1", + "start_date": "2025-01-06", + "duration": 1209600 + }, + { + "id": "iter_2", + "title": "Sprint 2", + "start_date": "2025-01-20", + "duration": 1209600 + } + ] + }, + "created_at": ` + referenceTimeStr + `, + "updated_at": ` + referenceTimeStr + ` + }` + + testJSONMarshal(t, fieldWithConfiguration, want) + + // Test just the configuration struct by itself + config := &ProjectV2FieldConfiguration{ + Duration: Ptr(604800), // 1 week in seconds + StartDay: Ptr(0), // Sunday + Iterations: []*ProjectV2FieldIteration{ + { + ID: Ptr("config_iter_1"), + Title: Ptr("Week 1"), + StartDate: Ptr("2025-01-01"), + Duration: Ptr(604800), + }, + }, + } + + configWant := `{ + "duration": 604800, + "start_day": 0, + "iterations": [ + { + "id": "config_iter_1", + "title": "Week 1", + "start_date": "2025-01-01", + "duration": 604800 + } + ] + }` + + testJSONMarshal(t, config, configWant) + + // Test iteration struct by itself + iteration := &ProjectV2FieldIteration{ + ID: Ptr("single_iter"), + Title: Ptr("Test Iteration"), + StartDate: Ptr("2025-02-01"), + Duration: Ptr(1209600), + } + + iterationWant := `{ + "id": "single_iter", + "title": "Test Iteration", + "start_date": "2025-02-01", + "duration": 1209600 + }` + + testJSONMarshal(t, iteration, iterationWant) +} + +func TestProjectsService_ListOrganizationProjectItems(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/projectsV2/1/items", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + q := r.URL.Query() + if q.Get("before") == "b" && q.Get("after") == "a" { // bypass scenario + fmt.Fprint(w, `[]`) + return + } + testFormValues(t, r, values{"after": "2", "before": "1", "per_page": "50", "fields": "10,11", "q": "status:open"}) + fmt.Fprint(w, `[{"id":17,"node_id":"PVTI_node"}]`) + }) + + opts := &ListProjectItemsOptions{ListProjectsOptions: ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{After: Ptr("2"), Before: Ptr("1"), PerPage: Ptr(50)}, Query: Ptr("status:open")}, Fields: []int64{10, 11}} + ctx := t.Context() + items, _, err := client.Projects.ListOrganizationProjectItems(ctx, "o", 1, opts) + if err != nil { + t.Fatalf("Projects.ListOrganizationProjectItems returned error: %v", err) + } + if len(items) != 1 || items[0].GetID() != 17 { + t.Fatalf("Projects.ListOrganizationProjectItems returned %+v", items) + } + + const methodName = "ListOrganizationProjectItems" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Projects.ListOrganizationProjectItems(ctx, "\n", 1, opts) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.ListOrganizationProjectItems(ctx, "o", 1, opts) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) + + ctxBypass := context.WithValue(ctx, BypassRateLimitCheck, true) + if _, _, err = client.Projects.ListOrganizationProjectItems(ctxBypass, "o", 1, &ListProjectItemsOptions{ListProjectsOptions: ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{Before: Ptr("b"), After: Ptr("a")}}}); err != nil { + t.Fatalf("unexpected error when both before/after set: %v", err) + } +} + +func TestProjectsService_AddOrganizationProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/orgs/o/projectsV2/1/items", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "POST") + b, _ := io.ReadAll(r.Body) + body := string(b) + if body != `{"type":"Issue","id":99}`+"\n" { // encoder adds newline + t.Fatalf("unexpected body: %s", body) + } + fmt.Fprint(w, `{"id":99,"node_id":"PVTI_new"}`) + }) + + ctx := t.Context() + item, _, err := client.Projects.AddOrganizationProjectItem(ctx, "o", 1, &AddProjectItemOptions{Type: "Issue", ID: 99}) + if err != nil { + t.Fatalf("Projects.AddOrganizationProjectItem returned error: %v", err) + } + if item.GetID() != 99 { + t.Fatalf("unexpected item: %+v", item) + } +} + +func TestProjectsService_AddProjectItemForOrg_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/orgs/o/projectsV2/1/items", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "POST") + w.WriteHeader(http.StatusCreated) + fmt.Fprint(w, `{"id":1}`) + }) + ctx := t.Context() + const methodName = "AddOrganizationProjectItem" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.AddOrganizationProjectItem(ctx, "o", 1, &AddProjectItemOptions{Type: "Issue", ID: 1}) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestProjectsService_GetOrganizationProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/orgs/o/projectsV2/1/items/17", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{"id":17,"node_id":"PVTI_node"}`) + }) + ctx := t.Context() + opts := &GetProjectItemOptions{} + item, _, err := client.Projects.GetOrganizationProjectItem(ctx, "o", 1, 17, opts) + if err != nil { + t.Fatalf("GetOrganizationProjectItem error: %v", err) + } + if item.GetID() != 17 { + t.Fatalf("unexpected item: %+v", item) + } +} + +func TestProjectsService_GetOrganizationProjectItem_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/orgs/o/projectsV2/1/items/17", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{"id":17}`) + }) + ctx := t.Context() + const methodName = "GetOrganizationProjectItem" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.GetOrganizationProjectItem(ctx, "o", 1, 17, &GetProjectItemOptions{}) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestProjectsService_UpdateOrganizationProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/orgs/o/projectsV2/1/items/17", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "PATCH") + b, _ := io.ReadAll(r.Body) + body := string(b) + if body != `{"archived":true}`+"\n" { + t.Fatalf("unexpected body: %s", body) + } + fmt.Fprint(w, `{"id":17}`) + }) + archived := true + ctx := t.Context() + item, _, err := client.Projects.UpdateOrganizationProjectItem(ctx, "o", 1, 17, &UpdateProjectItemOptions{Archived: &archived}) + if err != nil { + t.Fatalf("UpdateOrganizationProjectItem error: %v", err) + } + if item.GetID() != 17 { + t.Fatalf("unexpected item: %+v", item) + } +} + +func TestProjectsService_UpdateOrganizationProjectItem_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/orgs/o/projectsV2/1/items/17", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "PATCH") + fmt.Fprint(w, `{"id":17}`) + }) + archived := true + ctx := t.Context() + const methodName = "UpdateProjectItemForOrg" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.UpdateOrganizationProjectItem(ctx, "o", 1, 17, &UpdateProjectItemOptions{Archived: &archived}) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestProjectsService_DeleteOrganizationProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/orgs/o/projectsV2/1/items/17", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "DELETE") + w.WriteHeader(http.StatusNoContent) + }) + ctx := t.Context() + if _, err := client.Projects.DeleteOrganizationProjectItem(ctx, "o", 1, 17); err != nil { + t.Fatalf("DeleteOrganizationProjectItem error: %v", err) + } +} + +func TestProjectsService_DeleteOrganizationProjectItem_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/orgs/o/projectsV2/1/items/17", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "DELETE") + w.WriteHeader(http.StatusNoContent) + }) + ctx := t.Context() + const methodName = "DeleteOrganizationProjectItem" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + return client.Projects.DeleteOrganizationProjectItem(ctx, "o", 1, 17) + }) +} + +func TestProjectsService_ListUserProjectItems(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + testFormValues(t, r, values{"per_page": "20", "q": "type:issue"}) + fmt.Fprint(w, `[{"id":7,"node_id":"PVTI_user"}]`) + }) + ctx := t.Context() + items, _, err := client.Projects.ListUserProjectItems(ctx, "u", 2, &ListProjectItemsOptions{ListProjectsOptions: ListProjectsOptions{ListProjectsPaginationOptions: ListProjectsPaginationOptions{PerPage: Ptr(20)}, Query: Ptr("type:issue")}}) + if err != nil { + t.Fatalf("ListUserProjectItems error: %v", err) + } + if len(items) != 1 || items[0].GetID() != 7 { + t.Fatalf("unexpected items: %+v", items) + } +} + +func TestProjectsService_ListUserProjectItems_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `[]`) + }) + ctx := t.Context() + const methodName = "ListUserProjectItems" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.ListUserProjectItems(ctx, "u", 2, nil) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Projects.ListUserProjectItems(ctx, "\n", 2, nil) + return err + }) +} + +func TestProjectsService_AddUserProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "POST") + b, _ := io.ReadAll(r.Body) + body := string(b) + if body != `{"type":"PullRequest","id":123}`+"\n" { + t.Fatalf("unexpected body: %s", body) + } + fmt.Fprint(w, `{"id":123,"node_id":"PVTI_new_user"}`) + }) + ctx := t.Context() + item, _, err := client.Projects.AddUserProjectItem(ctx, "u", 2, &AddProjectItemOptions{Type: "PullRequest", ID: 123}) + if err != nil { + t.Fatalf("AddUserProjectItem error: %v", err) + } + if item.GetID() != 123 { + t.Fatalf("unexpected item: %+v", item) + } +} + +func TestProjectsService_AddUserProjectItem_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "POST") + fmt.Fprint(w, `{"id":5}`) + }) + ctx := t.Context() + const methodName = "AddUserProjectItem" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.AddUserProjectItem(ctx, "u", 2, &AddProjectItemOptions{Type: "Issue", ID: 5}) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestProjectsService_GetUserProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items/55", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{"id":55,"node_id":"PVTI_user_item"}`) + }) + ctx := t.Context() + opts := &GetProjectItemOptions{} + item, _, err := client.Projects.GetUserProjectItem(ctx, "u", 2, 55, opts) + if err != nil { + t.Fatalf("GetUserProjectItem error: %v", err) + } + if item.GetID() != 55 { + t.Fatalf("unexpected item: %+v", item) + } +} + +func TestProjectsService_GetUserProjectItem_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items/55", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{"id":55}`) + }) + ctx := t.Context() + const methodName = "GetUserProjectItem" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.GetUserProjectItem(ctx, "u", 2, 55, &GetProjectItemOptions{}) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestProjectsService_UpdateUserProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items/55", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "PATCH") + b, _ := io.ReadAll(r.Body) + body := string(b) + if body != `{"archived":false}`+"\n" { + t.Fatalf("unexpected body: %s", body) + } + fmt.Fprint(w, `{"id":55}`) + }) + archived := false + ctx := t.Context() + item, _, err := client.Projects.UpdateUserProjectItem(ctx, "u", 2, 55, &UpdateProjectItemOptions{Archived: &archived}) + if err != nil { + t.Fatalf("UpdateUserProjectItem error: %v", err) + } + if item.GetID() != 55 { + t.Fatalf("unexpected item: %+v", item) + } +} + +func TestProjectsService_UpdateUserProjectItem_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items/55", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "PATCH") + fmt.Fprint(w, `{"id":55}`) + }) + archived := false + ctx := t.Context() + const methodName = "UpdateUserProjectItem" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Projects.UpdateUserProjectItem(ctx, "u", 2, 55, &UpdateProjectItemOptions{Archived: &archived}) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestProjectsService_DeleteUserProjectItem(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items/55", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "DELETE") + w.WriteHeader(http.StatusNoContent) + }) + ctx := t.Context() + if _, err := client.Projects.DeleteUserProjectItem(ctx, "u", 2, 55); err != nil { + t.Fatalf("DeleteUserProjectItem error: %v", err) + } +} + +func TestProjectsService_DeleteUserProjectItem_error(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + mux.HandleFunc("/users/u/projectsV2/2/items/55", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "DELETE") + w.WriteHeader(http.StatusNoContent) + }) + ctx := t.Context() + const methodName = "DeleteUserProjectItem" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + return client.Projects.DeleteUserProjectItem(ctx, "u", 2, 55) + }) +} diff --git a/test/integration/projects_test.go b/test/integration/projects_test.go index f51af52691f..1357fcca816 100644 --- a/test/integration/projects_test.go +++ b/test/integration/projects_test.go @@ -41,10 +41,10 @@ func TestProjectsV2_Org(t *testing.T) { opts := &github.ListProjectsOptions{} // List projects for org; pick the first available project we can read. - projects, _, err := client.Projects.ListProjectsForOrg(ctx, org, opts) + projects, _, err := client.Projects.ListOrganizationProjects(ctx, org, opts) if err != nil { // If listing itself fails, abort this test. - t.Fatalf("Projects.ListProjectsForOrg returned error: %v", err) + t.Fatalf("Projects.ListOrganizationProjects returned error: %v", err) } if len(projects) == 0 { t.Skipf("no Projects V2 found for org %s", org) @@ -56,19 +56,19 @@ func TestProjectsV2_Org(t *testing.T) { projectNumber := *project.Number // Re-fetch via Get to exercise endpoint explicitly. - proj, _, err := client.Projects.GetProjectForOrg(ctx, org, projectNumber) + proj, _, err := client.Projects.GetOrganizationProject(ctx, org, projectNumber) if err != nil { // Permission mismatch? Skip CRUD while still reporting failure would make the test fail; // we want correctness so treat as fatal here. - t.Fatalf("Projects.GetProjectForOrg returned error: %v", err) + t.Fatalf("Projects.GetOrganizationProject returned error: %v", err) } if proj.Number == nil || *proj.Number != projectNumber { - t.Fatalf("GetProjectForOrg returned unexpected project number: got %+v want %d", proj.Number, projectNumber) + t.Fatalf("GetOrganizationProject returned unexpected project number: got %+v want %d", proj.Number, projectNumber) } - _, _, err = client.Projects.ListProjectFieldsForOrg(ctx, org, projectNumber, nil) + _, _, err = client.Projects.ListOrganizationProjectFields(ctx, org, projectNumber, nil) if err != nil { - t.Fatalf("Projects.ListProjectFieldsForOrg returned error: %v. Fields listing might require extra permissions", err) + t.Fatalf("Projects.ListOrganizationProjectFields returned error: %v. Fields listing might require extra permissions", err) } } @@ -81,9 +81,9 @@ func TestProjectsV2_User(t *testing.T) { ctx := t.Context() opts := &github.ListProjectsOptions{} - projects, _, err := client.Projects.ListProjectsForUser(ctx, user, opts) + projects, _, err := client.Projects.ListUserProjects(ctx, user, opts) if err != nil { - t.Fatalf("Projects.ListProjectsForUser returned error: %v. This indicates API or permission issue", err) + t.Fatalf("Projects.ListUserProjects returned error: %v. This indicates API or permission issue", err) } if len(projects) == 0 { t.Skipf("no Projects V2 found for user %s", user) @@ -93,12 +93,12 @@ func TestProjectsV2_User(t *testing.T) { t.Skip("selected user project has nil Number field") } - proj, _, err := client.Projects.GetProjectForUser(ctx, user, *project.Number) + proj, _, err := client.Projects.GetUserProject(ctx, user, *project.Number) if err != nil { // can't fetch specific project; treat as fatal - t.Fatalf("Projects.GetProjectForUser returned error: %v", err) + t.Fatalf("Projects.GetUserProject returned error: %v", err) } if proj.Number == nil || *proj.Number != *project.Number { - t.Fatalf("GetProjectForUser returned unexpected project number: got %+v want %d", proj.Number, *project.Number) + t.Fatalf("GetUserProject returned unexpected project number: got %+v want %d", proj.Number, *project.Number) } } From b17aab238d4cb11e8e7e0109e79f27ce39b2cd67 Mon Sep 17 00:00:00 2001 From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:35:51 -0500 Subject: [PATCH 12/16] Bump version of go-github to v77.0.0 (#3800) --- .custom-gcl.yml | 6 +- .golangci.yml | 6 +- README.md | 20 +- example/actionpermissions/main.go | 2 +- example/appengine/app.go | 2 +- example/basicauth/main.go | 2 +- .../newreposecretwithxcrypto/main.go | 2 +- .../newusersecretwithxcrypto/main.go | 2 +- example/commitpr/main.go | 6 +- example/go.mod | 6 +- example/listenvironments/main.go | 2 +- example/migrations/main.go | 2 +- example/newfilewithappauth/main.go | 2 +- example/newrepo/main.go | 2 +- example/newreposecretwithlibsodium/go.mod | 4 +- example/newreposecretwithlibsodium/main.go | 2 +- example/newreposecretwithxcrypto/main.go | 2 +- example/ratelimit/main.go | 2 +- example/simple/main.go | 2 +- example/tokenauth/main.go | 2 +- example/topics/main.go | 2 +- example/verifyartifact/main.go | 2 +- github/doc.go | 2 +- github/examples_test.go | 2 +- github/github.go | 2 +- go.mod | 2 +- test/fields/fields.go | 2 +- test/integration/activity_test.go | 2 +- test/integration/authorizations_test.go | 2 +- test/integration/github_test.go | 2 +- test/integration/projects_test.go | 2 +- test/integration/repos_test.go | 2 +- test/integration/users_test.go | 2 +- tools/gen-release-notes/main.go | 260 + tools/gen-release-notes/main_test.go | 240 + .../testdata/compare-v76.html | 4518 +++++++++++++++++ .../testdata/release-notes-v77.txt | 37 + tools/go.mod | 4 +- tools/metadata/main.go | 2 +- tools/metadata/main_test.go | 2 +- tools/metadata/metadata.go | 2 +- tools/metadata/openapi.go | 2 +- 42 files changed, 5112 insertions(+), 57 deletions(-) create mode 100644 tools/gen-release-notes/main.go create mode 100644 tools/gen-release-notes/main_test.go create mode 100644 tools/gen-release-notes/testdata/compare-v76.html create mode 100644 tools/gen-release-notes/testdata/release-notes-v77.txt diff --git a/.custom-gcl.yml b/.custom-gcl.yml index c116a82b1df..b90e06218b4 100644 --- a/.custom-gcl.yml +++ b/.custom-gcl.yml @@ -1,8 +1,8 @@ version: v2.2.2 plugins: - - module: "github.com/google/go-github/v76/tools/fmtpercentv" + - module: "github.com/google/go-github/v77/tools/fmtpercentv" path: ./tools/fmtpercentv - - module: "github.com/google/go-github/v76/tools/jsonfieldname" + - module: "github.com/google/go-github/v77/tools/jsonfieldname" path: ./tools/jsonfieldname - - module: "github.com/google/go-github/v76/tools/sliceofpointers" + - module: "github.com/google/go-github/v77/tools/sliceofpointers" path: ./tools/sliceofpointers diff --git a/.golangci.yml b/.golangci.yml index e64f5c11961..9c10ce24e42 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -143,11 +143,11 @@ linters: fmtpercentv: type: module description: Reports usage of %d or %s in format strings. - original-url: github.com/google/go-github/v76/tools/fmtpercentv + original-url: github.com/google/go-github/v77/tools/fmtpercentv jsonfieldname: type: module description: Reports mismatches between Go field and JSON tag names. - original-url: github.com/google/go-github/v76/tools/jsonfieldname + original-url: github.com/google/go-github/v77/tools/jsonfieldname settings: allowed-exceptions: - ActionsCacheUsageList.RepoCacheUsage # TODO: RepoCacheUsages ? @@ -215,7 +215,7 @@ linters: sliceofpointers: type: module description: Reports usage of []*string and slices of structs without pointers. - original-url: github.com/google/go-github/v76/tools/sliceofpointers + original-url: github.com/google/go-github/v77/tools/sliceofpointers exclusions: rules: - linters: diff --git a/README.md b/README.md index 301580d5283..6ec47e8b6a9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # go-github # [![go-github release (latest SemVer)](https://img.shields.io/github/v/release/google/go-github?sort=semver)](https://github.com/google/go-github/releases) -[![Go Reference](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v76/github) +[![Go Reference](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v77/github) [![Test Status](https://github.com/google/go-github/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/google/go-github/actions/workflows/tests.yml) [![Test Coverage](https://codecov.io/gh/google/go-github/branch/master/graph/badge.svg)](https://codecov.io/gh/google/go-github) [![Discuss at go-github@googlegroups.com](https://img.shields.io/badge/discuss-go--github%40googlegroups.com-blue.svg)](https://groups.google.com/group/go-github) @@ -30,7 +30,7 @@ If you're interested in using the [GraphQL API v4][], the recommended library is go-github is compatible with modern Go releases in module mode, with Go installed: ```bash -go get github.com/google/go-github/v76 +go get github.com/google/go-github/v77 ``` will resolve and add the package to the current development module, along with its dependencies. @@ -38,7 +38,7 @@ will resolve and add the package to the current development module, along with i Alternatively the same can be achieved if you use import in a package: ```go -import "github.com/google/go-github/v76/github" +import "github.com/google/go-github/v77/github" ``` and run `go get` without parameters. @@ -46,13 +46,13 @@ and run `go get` without parameters. Finally, to use the top-of-trunk version of this repo, use the following command: ```bash -go get github.com/google/go-github/v76@master +go get github.com/google/go-github/v77@master ``` ## Usage ## ```go -import "github.com/google/go-github/v76/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) +import "github.com/google/go-github/v77/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) import "github.com/google/go-github/github" // with go modules disabled ``` @@ -102,7 +102,7 @@ include the specified OAuth token. Therefore, authenticated clients should almost never be shared between different users. For API methods that require HTTP Basic Authentication, use the -[`BasicAuthTransport`](https://pkg.go.dev/github.com/google/go-github/v76/github#BasicAuthTransport). +[`BasicAuthTransport`](https://pkg.go.dev/github.com/google/go-github/v77/github#BasicAuthTransport). #### As a GitHub App #### @@ -125,7 +125,7 @@ import ( "net/http" "github.com/bradleyfalzon/ghinstallation/v2" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func main() { @@ -159,7 +159,7 @@ import ( "os" "strconv" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "github.com/jferrl/go-githubauth" "golang.org/x/oauth2" ) @@ -400,7 +400,7 @@ For complete usage of go-github, see the full [package docs][]. [GitHub API v3]: https://docs.github.com/en/rest [personal access token]: https://github.com/blog/1509-personal-api-tokens -[package docs]: https://pkg.go.dev/github.com/google/go-github/v76/github +[package docs]: https://pkg.go.dev/github.com/google/go-github/v77/github [GraphQL API v4]: https://developer.github.com/v4/ [shurcooL/githubv4]: https://github.com/shurcooL/githubv4 [GitHub webhook events]: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads @@ -474,7 +474,7 @@ Versions prior to 48.2.0 are not listed. | go-github Version | GitHub v3 API Version | | ----------------- | --------------------- | -| 76.0.0 | 2022-11-28 | +| 77.0.0 | 2022-11-28 | | ... | 2022-11-28 | | 48.2.0 | 2022-11-28 | diff --git a/example/actionpermissions/main.go b/example/actionpermissions/main.go index a2479139a9c..e9743d97605 100644 --- a/example/actionpermissions/main.go +++ b/example/actionpermissions/main.go @@ -14,7 +14,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) var ( diff --git a/example/appengine/app.go b/example/appengine/app.go index de43015e56c..20263aac59a 100644 --- a/example/appengine/app.go +++ b/example/appengine/app.go @@ -12,7 +12,7 @@ import ( "net/http" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "google.golang.org/appengine" "google.golang.org/appengine/log" ) diff --git a/example/basicauth/main.go b/example/basicauth/main.go index 81a3c525e87..4a30d37537b 100644 --- a/example/basicauth/main.go +++ b/example/basicauth/main.go @@ -22,7 +22,7 @@ import ( "os" "strings" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "golang.org/x/term" ) diff --git a/example/codespaces/newreposecretwithxcrypto/main.go b/example/codespaces/newreposecretwithxcrypto/main.go index d9e685a5158..094b346b32f 100644 --- a/example/codespaces/newreposecretwithxcrypto/main.go +++ b/example/codespaces/newreposecretwithxcrypto/main.go @@ -37,7 +37,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "golang.org/x/crypto/nacl/box" ) diff --git a/example/codespaces/newusersecretwithxcrypto/main.go b/example/codespaces/newusersecretwithxcrypto/main.go index 7c75cc95878..389413a6538 100644 --- a/example/codespaces/newusersecretwithxcrypto/main.go +++ b/example/codespaces/newusersecretwithxcrypto/main.go @@ -38,7 +38,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "golang.org/x/crypto/nacl/box" ) diff --git a/example/commitpr/main.go b/example/commitpr/main.go index 164c91a9f91..cb6bf326b16 100644 --- a/example/commitpr/main.go +++ b/example/commitpr/main.go @@ -13,7 +13,7 @@ // // Note, if you want to push a single file, you probably prefer to use the // content API. An example is available here: -// https://pkg.go.dev/github.com/google/go-github/v76/github#example-RepositoriesService-CreateFile +// https://pkg.go.dev/github.com/google/go-github/v77/github#example-RepositoriesService-CreateFile // // Note, for this to work at least 1 commit is needed, so you if you use this // after creating a repository you might want to make sure you set `AutoInit` to @@ -33,7 +33,7 @@ import ( "time" "github.com/ProtonMail/go-crypto/openpgp" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) var ( @@ -178,7 +178,7 @@ func pushCommit(ref *github.Reference, tree *github.Tree) (err error) { return err } -// createPR creates a pull request. Based on: https://pkg.go.dev/github.com/google/go-github/v76/github#example-PullRequestsService-Create +// createPR creates a pull request. Based on: https://pkg.go.dev/github.com/google/go-github/v77/github#example-PullRequestsService-Create func createPR() (err error) { if *prSubject == "" { return errors.New("missing `-pr-title` flag; skipping PR creation") diff --git a/example/go.mod b/example/go.mod index 7b95e61c893..f289cd5e6ac 100644 --- a/example/go.mod +++ b/example/go.mod @@ -1,4 +1,4 @@ -module github.com/google/go-github/v76/example +module github.com/google/go-github/v77/example go 1.24.0 @@ -7,7 +7,7 @@ require ( github.com/bradleyfalzon/ghinstallation/v2 v2.17.0 github.com/gofri/go-github-pagination v1.0.1 github.com/gofri/go-github-ratelimit/v2 v2.0.2 - github.com/google/go-github/v76 v76.0.0 + github.com/google/go-github/v77 v77.0.0 github.com/sigstore/sigstore-go v0.6.1 golang.org/x/crypto v0.43.0 golang.org/x/term v0.36.0 @@ -100,4 +100,4 @@ require ( ) // Use version at HEAD, not the latest published. -replace github.com/google/go-github/v76 => ../ +replace github.com/google/go-github/v77 => ../ diff --git a/example/listenvironments/main.go b/example/listenvironments/main.go index 102292d4ebf..457900a3aba 100644 --- a/example/listenvironments/main.go +++ b/example/listenvironments/main.go @@ -18,7 +18,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func main() { diff --git a/example/migrations/main.go b/example/migrations/main.go index 49c7e5660e3..46021e37c89 100644 --- a/example/migrations/main.go +++ b/example/migrations/main.go @@ -12,7 +12,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func fetchAllUserMigrations() ([]*github.UserMigration, error) { diff --git a/example/newfilewithappauth/main.go b/example/newfilewithappauth/main.go index 7972920d8e5..4db7245931f 100644 --- a/example/newfilewithappauth/main.go +++ b/example/newfilewithappauth/main.go @@ -16,7 +16,7 @@ import ( "time" "github.com/bradleyfalzon/ghinstallation/v2" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func main() { diff --git a/example/newrepo/main.go b/example/newrepo/main.go index 9e3658187c8..dd46512b74d 100644 --- a/example/newrepo/main.go +++ b/example/newrepo/main.go @@ -16,7 +16,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) var ( diff --git a/example/newreposecretwithlibsodium/go.mod b/example/newreposecretwithlibsodium/go.mod index ebc1bc2e779..5bd11527af2 100644 --- a/example/newreposecretwithlibsodium/go.mod +++ b/example/newreposecretwithlibsodium/go.mod @@ -4,10 +4,10 @@ go 1.24.0 require ( github.com/GoKillers/libsodium-go v0.0.0-20171022220152-dd733721c3cb - github.com/google/go-github/v76 v76.0.0 + github.com/google/go-github/v77 v77.0.0 ) require github.com/google/go-querystring v1.1.0 // indirect // Use version at HEAD, not the latest published. -replace github.com/google/go-github/v76 => ../.. +replace github.com/google/go-github/v77 => ../.. diff --git a/example/newreposecretwithlibsodium/main.go b/example/newreposecretwithlibsodium/main.go index 8d65539df50..94b4e3288ca 100644 --- a/example/newreposecretwithlibsodium/main.go +++ b/example/newreposecretwithlibsodium/main.go @@ -36,7 +36,7 @@ import ( "os" sodium "github.com/GoKillers/libsodium-go/cryptobox" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) var ( diff --git a/example/newreposecretwithxcrypto/main.go b/example/newreposecretwithxcrypto/main.go index f5bca101af8..b802f7e381c 100644 --- a/example/newreposecretwithxcrypto/main.go +++ b/example/newreposecretwithxcrypto/main.go @@ -37,7 +37,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "golang.org/x/crypto/nacl/box" ) diff --git a/example/ratelimit/main.go b/example/ratelimit/main.go index dfcbb305a3e..7d82b6fedb9 100644 --- a/example/ratelimit/main.go +++ b/example/ratelimit/main.go @@ -17,7 +17,7 @@ import ( "github.com/gofri/go-github-ratelimit/v2/github_ratelimit" "github.com/gofri/go-github-ratelimit/v2/github_ratelimit/github_primary_ratelimit" "github.com/gofri/go-github-ratelimit/v2/github_ratelimit/github_secondary_ratelimit" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func main() { diff --git a/example/simple/main.go b/example/simple/main.go index 2f651a4de40..386dcb3e76b 100644 --- a/example/simple/main.go +++ b/example/simple/main.go @@ -12,7 +12,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) // Fetch all the public organizations' membership of a user. diff --git a/example/tokenauth/main.go b/example/tokenauth/main.go index 78654f234fb..405b7659589 100644 --- a/example/tokenauth/main.go +++ b/example/tokenauth/main.go @@ -15,7 +15,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "golang.org/x/term" ) diff --git a/example/topics/main.go b/example/topics/main.go index 434f1ad50d4..0752671dad4 100644 --- a/example/topics/main.go +++ b/example/topics/main.go @@ -12,7 +12,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) // Fetch and lists all the public topics associated with the specified GitHub topic. diff --git a/example/verifyartifact/main.go b/example/verifyartifact/main.go index 789fa0fe0d6..9b3984b860d 100644 --- a/example/verifyartifact/main.go +++ b/example/verifyartifact/main.go @@ -18,7 +18,7 @@ import ( "log" "os" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "github.com/sigstore/sigstore-go/pkg/bundle" "github.com/sigstore/sigstore-go/pkg/root" "github.com/sigstore/sigstore-go/pkg/verify" diff --git a/github/doc.go b/github/doc.go index 65fd79bd28f..f5670793068 100644 --- a/github/doc.go +++ b/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v76/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v77/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) import "github.com/google/go-github/github" // with go modules disabled Construct a new GitHub client, then use the various services on the client to diff --git a/github/examples_test.go b/github/examples_test.go index 5fb81ebfd35..0954ebfc220 100644 --- a/github/examples_test.go +++ b/github/examples_test.go @@ -12,7 +12,7 @@ import ( "fmt" "log" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func ExampleMarkdownService_Render() { diff --git a/github/github.go b/github/github.go index fa10a446219..351b5797dd2 100644 --- a/github/github.go +++ b/github/github.go @@ -29,7 +29,7 @@ import ( ) const ( - Version = "v76.0.0" + Version = "v77.0.0" defaultAPIVersion = "2022-11-28" defaultBaseURL = "https://api.github.com/" diff --git a/go.mod b/go.mod index aa1b017793a..35e0f74554d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/google/go-github/v76 +module github.com/google/go-github/v77 go 1.24.0 diff --git a/test/fields/fields.go b/test/fields/fields.go index 6be67473ff4..a0f080702a0 100644 --- a/test/fields/fields.go +++ b/test/fields/fields.go @@ -25,7 +25,7 @@ import ( "reflect" "strings" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) var ( diff --git a/test/integration/activity_test.go b/test/integration/activity_test.go index 5bcf2eb5b4f..e1abda1b1b0 100644 --- a/test/integration/activity_test.go +++ b/test/integration/activity_test.go @@ -10,7 +10,7 @@ package integration import ( "testing" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) const ( diff --git a/test/integration/authorizations_test.go b/test/integration/authorizations_test.go index e6a492497cb..ea96e2bb8e9 100644 --- a/test/integration/authorizations_test.go +++ b/test/integration/authorizations_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) const ( diff --git a/test/integration/github_test.go b/test/integration/github_test.go index 09975511ca2..e29fe0a7246 100644 --- a/test/integration/github_test.go +++ b/test/integration/github_test.go @@ -15,7 +15,7 @@ import ( "sync" "testing" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) // client is a github.Client with the default http.Client. It is authorized if auth is true. diff --git a/test/integration/projects_test.go b/test/integration/projects_test.go index 1357fcca816..a3a1ffd2d08 100644 --- a/test/integration/projects_test.go +++ b/test/integration/projects_test.go @@ -11,7 +11,7 @@ import ( "os" "testing" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) // Integration tests for Projects V2 endpoints defined in github/projects.go. diff --git a/test/integration/repos_test.go b/test/integration/repos_test.go index 9ea4f099f6a..126a4ee73b1 100644 --- a/test/integration/repos_test.go +++ b/test/integration/repos_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func TestRepositories_CRUD(t *testing.T) { diff --git a/test/integration/users_test.go b/test/integration/users_test.go index 3a8643ebd28..742e88a7d28 100644 --- a/test/integration/users_test.go +++ b/test/integration/users_test.go @@ -12,7 +12,7 @@ import ( "math/rand" "testing" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func TestUsers_Get(t *testing.T) { diff --git a/tools/gen-release-notes/main.go b/tools/gen-release-notes/main.go new file mode 100644 index 00000000000..f125fca1293 --- /dev/null +++ b/tools/gen-release-notes/main.go @@ -0,0 +1,260 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// gen-release-notes first reads the web page https://github.com/google/go-github +// to determine what the prior release was, (e.g. "v76.0.0") +// then reads https://github.com/google/go-github/compare/${PRIOR_RELEASE}...master +// to find out what changes were made since then. +// +// Finally, it writes the release notes to stdout, summarizing the +// breaking and non-breaking changes since that release. +package main + +import ( + "flag" + "fmt" + "io" + "log" + "net/http" + "regexp" + "strings" +) + +const ( + baseWebURL = "https://github.com/google/go-github" + + // fragile, but works for now. + detailsDiv = `
` +) + +var ( + releaseRE = regexp.MustCompile(`]+>([^<]+)\s*]*>`) + linkPrimaryRE = regexp.MustCompile(`(?ms)(.*?]+>)`) + newlinesRE = regexp.MustCompile(`(?m)(\n+)`) + descriptionRE = regexp.MustCompile(`^\* (.*?\((#[^\)]+)\))`) +) + +func main() { + log.SetFlags(0) + flag.Parse() + + priorRelease := getPriorRelease() + + newChanges := newChangesSinceRelease(priorRelease) + + releaseNotes := genReleaseNotes(newChanges) + fmt.Printf("%v%v", releaseNotes, "\n") + + log.Print("Done.") +} + +func genReleaseNotes(text string) string { + // strip everything before first detailsDiv: + idx := strings.Index(text, detailsDiv) + if idx < 0 { + log.Fatal("Could not find detailsDiv") + } + text = text[idx:] + + allLines := splitIntoPRs(text) + fullBreakingLines, fullNonBreakingLines := splitBreakingLines(allLines) + refBreakingLines, refNonBreakingLines := genRefLines(fullBreakingLines, fullNonBreakingLines) + + return fmt.Sprintf(releaseNotesFmt, + strings.Join(fullBreakingLines, "\n"), + strings.Join(fullNonBreakingLines, "\n"), + strings.Join(refBreakingLines, "\n"), + strings.Join(refNonBreakingLines, "\n")) +} + +func splitIntoPRs(text string) []string { + parts := strings.Split(text, detailsDiv) + if len(parts) < 2 { + log.Fatal("unable to find PRs") + } + prs := make([]string, 0, len(parts)-1) + for _, part := range parts { + if part == "" { + continue + } + newDiv := matchDivs(part) + for { + oldDiv := newDiv + newDiv = stripPRHTML(oldDiv) + if newDiv == oldDiv { + break + } + } + prs = append(prs, newDiv) + } + return prs +} + +func stripPRHTML(text string) string { + _, innerText := getTagSequence(text) + if i := strings.Index(text, ""); i > 0 { + newText := text[:i] + strings.Join(innerText, "") + newText = strings.ReplaceAll(newText, "…", "") + newText = newlinesRE.ReplaceAllString(newText, "\n ") + return newText + } + return text +} + +func getTagSequence(text string) (tagSeq, innerText []string) { + m := bracketsRE.FindAllStringIndex(text, -1) + var lastEnd int + for _, pair := range m { + start := pair[0] + end := pair[1] - 1 + if lastEnd > 0 && start > lastEnd+1 { + rawText := text[lastEnd+1 : start] + s := strings.TrimSpace(rawText) + switch s { + case "", "…": // skip + default: + innerText = append(innerText, rawText) + } + } + lastEnd = end + s := text[start+1 : end] + if s == "code" { + innerText = append(innerText, " `") + continue + } + if s == "/code" { + innerText = append(innerText, "` ") + continue + } + if s[0] == '/' { + tagSeq = append(tagSeq, s) + continue + } + if i := strings.Index(s, " "); i > 0 { + tagSeq = append(tagSeq, s[0:i]) + } else { + tagSeq = append(tagSeq, s) + } + } + return tagSeq, innerText +} + +func matchDivs(text string) string { + chunks := strings.Split(text, `
`) + var divCount int + var lastChunk int + for i, chunk := range chunks { + chunks[i] = strings.TrimSpace(chunks[i]) + divsInChunk := strings.Count(chunk, `
0 { + newText = newText[:m2[0]] + } + return "* " + newText +} + +func splitBreakingLines(allLines []string) (breaking, nonBreaking []string) { + for _, pr := range allLines { + if strings.Contains(pr, "!: ") { + breaking = append(breaking, pr) + } else { + nonBreaking = append(nonBreaking, pr) + } + } + return breaking, nonBreaking +} + +func genRefLines(breaking, nonBreaking []string) (ref, refNon []string) { + for _, pr := range breaking { + m := descriptionRE.FindStringSubmatch(pr) + if len(m) == 3 { + ref = append(ref, strings.Replace(pr, m[1], m[2], 1)) + } + } + for _, pr := range nonBreaking { + m := descriptionRE.FindStringSubmatch(pr) + if len(m) == 3 { + refNon = append(refNon, strings.Replace(pr, m[1], m[2], 1)) + } + } + return ref, refNon +} + +func newChangesSinceRelease(priorRelease string) string { + url := fmt.Sprintf("%v/compare/%v...master", baseWebURL, priorRelease) + resp, err := http.Get(url) //nolint: gosec + must(err) + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + must(err) + + return string(body) +} + +func getPriorRelease() string { + resp, err := http.Get(baseWebURL) + must(err) + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + must(err) + + matches := releaseRE.FindStringSubmatch(string(body)) + if len(matches) != 2 { + log.Fatal("could not find release info") + } + + priorRelease := strings.TrimSpace(matches[1]) + if priorRelease == "" { + log.Fatal("found empty prior release version") + } + + return priorRelease +} + +func must(err error) { + if err != nil { + log.Fatal(err) + } +} + +const releaseNotesFmt = `This release contains the following breaking API changes: + +%v + +...and the following additional changes: + +%v + +&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + +This release contains the following breaking API changes: + +%v + +...and the following additional changes: + +%v +` diff --git a/tools/gen-release-notes/main_test.go b/tools/gen-release-notes/main_test.go new file mode 100644 index 00000000000..c81c589dbd7 --- /dev/null +++ b/tools/gen-release-notes/main_test.go @@ -0,0 +1,240 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + _ "embed" + "strings" + "testing" + + "github.com/google/go-cmp/cmp" +) + +//go:embed testdata/compare-v76.html +var compareV76HTML string + +//go:embed testdata/release-notes-v77.txt +var releaseNotes string + +func TestGenReleaseNotes(t *testing.T) { + t.Parallel() + text := strings.ReplaceAll(compareV76HTML, "\r\n", "\n") + got := genReleaseNotes(text) + got = strings.ReplaceAll(got, "\r\n", "\n") + want := strings.ReplaceAll(releaseNotes, "\r\n", "\n") + + if diff := cmp.Diff(want, got); diff != "" { + t.Log(got) + t.Errorf("genReleaseNotes mismatch (-want +got):\n%v", diff) + } +} + +func TestSplitIntoPRs(t *testing.T) { + t.Parallel() + + text := strings.ReplaceAll(compareV76HTML, "\r\n", "\n") + text = text[191600:] + + got := splitIntoPRs(text) + want := []string{ + `* Bump go-github from v75 to v76 in /scrape (#3783)`, + `* Add custom jsonfieldname linter to ensure Go field name matches JSON tag name (#3757)`, + `* chore: Fix typo in comment (#3786)`, + `* feat: Add support for private registries endpoints (#3785)`, + "* Only set `Authorization` when `token` is available (#3789)", + `* test: Ensure Authorization is not set with empty token (#3790)`, + `* Fix spelling issues (#3792)`, + "* refactor!: Remove pointer from required field of CreateStatus API (#3794)\n BREAKING CHANGE: `RepositoriesService.CreateStatus` now takes value for `status`, not pointer.", + `* Add test cases for JSON resource marshaling - SCIM (#3798)`, + `* fix: Org/Enterprise UpdateRepositoryRulesetClearBypassActor sends empty array (#3796)`, + `* feat!: Add support for project items CRUD and project fields read operations (#3793)`, + } + + if len(got) != len(want) { + t.Log(strings.Join(got, "\n")) + t.Fatalf("splitIntoPRs = %v lines, want %v", len(got), len(want)) + } + for i := range got { + if got[i] != want[i] { + t.Errorf("splitIntoPRs[%v] =\n%v\n, want \n%v", i, got[i], want[i]) + } + } +} + +func TestMatchDivs(t *testing.T) { + t.Parallel() + + text := `
+

+ Bump go-github from v75 to v76 in /scrape (#3783) + +

+ + +
+ +
+
+ + @gmlewis +
+
+ +
+ gmlewis + + authored + Oct 14, 2025 + +
+
+ + + + + + + + +
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+

Commits on Oct 17, 2025

+` + want := `* Bump go-github from v75 to v76 in /scrape (#3783) + +

+ + +
+ +` + + got := matchDivs(text) + if diff := cmp.Diff(want, got); diff != "" { + t.Errorf("matchDivs mismatch (-want +got):\n%v", diff) + } +} + +func TestGetTagSequence(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + text string + wantTagSeq []string + wantInnerText []string + }{ + { + name: "simple case", + text: `* Bump go-github from v75 to v76 in /scrape (#3783) + +

+ + +
`, + wantTagSeq: []string{"/a", "a", "/a", "a", "/a", "/p", "div"}, + wantInnerText: []string{"#3783", ")"}, + }, + { + name: "has ellipses", + text: `* Add custom jsonfieldname linter to ensure Go field name matches JSON … + + + +

+ +
…tag name (#3757)
`, + wantTagSeq: []string{"/a", "span", "button", "/button", "/span", "/p", "div", "pre", "a", "/a", "/pre"}, + wantInnerText: []string{"…tag name (", "#3757", ")"}, + }, + { + name: "has code blocks", + text: `* Only set Authorization when token is available (#3789) + +

+ + +
`, + wantTagSeq: []string{"/a", "a", "/a", "a", "/a", "a", "/a", "a", "/a", "a", "/a", "a", "/a", "/p", "div"}, + wantInnerText: []string{" `", "Authorization", "` ", "when", " `", "token", "` ", "is available (", "#3789", ")"}, + }, + { + name: "breaking change with backticks", + text: `* refactor!: Remove pointer from required field of CreateStatus API (#3794 + + + +

+ +
)
+
+BREAKING CHANGE: ` + "`" + `RepositoriesService.CreateStatus` + "`" + ` now takes value for ` + "`" + `status` + "`" + `, not pointer.
`, + wantTagSeq: []string{"/a", "a", "/a", "span", "button", "/button", "/span", "/p", "div", "pre", "a", "/a", "/pre"}, + wantInnerText: []string{"#3794", ")\n\nBREAKING CHANGE: `RepositoriesService.CreateStatus` now takes value for `status`, not pointer."}, + }, + { + name: "more ellipses", + text: `* fix: Org/Enterprise UpdateRepositoryRulesetClearBypassActor sends emp… + + + +

+ +
…ty array (#3796)
"`, + wantTagSeq: []string{"/a", "span", "button", "/button", "/span", "/p", "div", "pre", "a", "/a", "/pre"}, + wantInnerText: []string{"…ty array (", "#3796", ")"}, + }, + { + name: "another breaking change", + text: `* feat!: Add support for project items CRUD and project fields read ope… + + + +

+ +
…rations (#3793)
`, + wantTagSeq: []string{"/a", "span", "button", "/button", "/span", "/p", "div", "pre", "a", "/a", "/pre"}, + wantInnerText: []string{"…rations (", "#3793", ")"}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + gotTagSeq, gotInnerText := getTagSequence(tt.text) + if diff := cmp.Diff(tt.wantTagSeq, gotTagSeq); diff != "" { + t.Errorf("gotTagSeq=\n%#v,\n wantTagSeq=\n%#v", gotTagSeq, tt.wantTagSeq) + } + if diff := cmp.Diff(tt.wantInnerText, gotInnerText); diff != "" { + t.Errorf("gotInnerText=\n%#v,\n wantInnerText=\n%#v", gotInnerText, tt.wantInnerText) + } + }) + } +} diff --git a/tools/gen-release-notes/testdata/compare-v76.html b/tools/gen-release-notes/testdata/compare-v76.html new file mode 100644 index 00000000000..aab26a83e9f --- /dev/null +++ b/tools/gen-release-notes/testdata/compare-v76.html @@ -0,0 +1,4518 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Comparing v76.0.0...master · google/go-github · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ Skip to content + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + / + + go-github + + + Public +
+ + +
+ +
+ + +
+
+ +
+
+ + + + +
+ + + + + + +
+ + + + + + +
+ Permalink + +
+

Comparing changes

+
Choose two branches to see what’s changed or to start a new pull request. + If you need to, you can also or + learn more about diff comparisons. +
+ +
+

Open a pull request

+
Create a new pull request by comparing changes across two branches. If you need to, you can also . + Learn more about diff comparisons here. +
+ +
+ +
+ +
+ + base repository: + google/go-github + + + + + + + + + +
+ Failed to load repositories. Confirm that selected base ref is valid, then try again. +
+
+ + Loading + +
+ + +
+
+ + + +
+ + base: + v76.0.0 + + + + + + +
+
+
+ Choose a base ref + +
+ + +
+ +
+ + +
+ + +
+ +
+ + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ +
+
+ + + + + ... + +
+
+ +
+ + head repository: + google/go-github + + + + + + + + + +
+ Failed to load repositories. Confirm that selected head ref is valid, then try again. +
+
+ + Loading + +
+ + +
+
+ + + +
+ + compare: + master + + + + + + +
+
+
+ Choose a head ref + +
+ + +
+ +
+ + +
+ + +
+ +
+ + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ +
+ + +
+
    +
  • + + + 11 + + + commits +
  • + +
  • + + + 51 + + + files changed +
  • + +
  • + + + 8 + + + contributors +
  • + +
+
+ +
+
+ +
+

Commits on Oct 14, 2025

+
    +
  1. +
    +

    + Bump go-github from v75 to v76 in /scrape (#3783) + +

    + + +
    + +
    +
    + + @gmlewis +
    +
    + +
    + gmlewis + + authored + Oct 14, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + b6248e6 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
+
+
+ +
+

Commits on Oct 17, 2025

+
    +
  1. +
    +

    + Add custom jsonfieldname linter to ensure Go field name matches JSON … + + + +

    + +
    …tag name (#3757)
    + +
    + +
    +
    + + @gmlewis +
    +
    + +
    + gmlewis + + authored + Oct 17, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + 036aeb4 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
+
+
+ +
+

Commits on Oct 22, 2025

+
    +
  1. +
    +

    + chore: Fix typo in comment (#3786) + +

    + + +
    + +
    +
    + + @alexandear +
    +
    + +
    + alexandear + + authored + Oct 22, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + 98a62fd + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
+
+
+ +
+

Commits on Oct 23, 2025

+
    +
  1. +
    +

    + feat: Add support for private registries endpoints (#3785) + +

    + + +
    + +
    +
    + + @acouvreur +
    +
    + +
    + acouvreur + + authored + Oct 23, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + 12cbac6 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
  3. +
    +

    + Only set Authorization when token is available (#3789) + +

    + + +
    + +
    +
    + + @jsoref +
    +
    + +
    + jsoref + + authored + Oct 23, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + b755d64 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  4. + +
+
+
+ +
+

Commits on Oct 24, 2025

+
    +
  1. +
    +

    + test: Ensure Authorization is not set with empty token (#3790) + +

    + + +
    + +
    +
    + + @alexandear +
    +
    + +
    + alexandear + + authored + Oct 24, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + ab86053 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
+
+
+ +
+

Commits on Oct 27, 2025

+
    +
  1. +
    +

    + Fix spelling issues (#3792) + +

    + + +
    + +
    +
    + + @jsoref +
    +
    + +
    + jsoref + + authored + Oct 27, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + 22f7fe3 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
+
+
+ +
+

Commits on Oct 28, 2025

+
    +
  1. +
    +

    + refactor!: Remove pointer from required field of CreateStatus API (#3794 + + + +

    + +
    )
    +
    +BREAKING CHANGE: `RepositoriesService.CreateStatus` now takes value for `status`, not pointer.
    + +
    + +
    +
    + + @alkak95 +
    +
    + +
    + alkak95 + + authored + Oct 28, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + 53d0e6a + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
+
+
+ +
+

Commits on Nov 2, 2025

+
    +
  1. +
    +

    + Add test cases for JSON resource marshaling - SCIM (#3798) + +

    + + +
    + +
    +
    + + @elminster-aom +
    +
    + +
    + elminster-aom + + authored + Nov 2, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + f271152 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
+
+
+ +
+

Commits on Nov 3, 2025

+
    +
  1. +
    +

    + fix: Org/Enterprise UpdateRepositoryRulesetClearBypassActor sends emp… + + + +

    + +
    …ty array (#3796)
    + +
    + +
    +
    + + @dblinkhorn +
    +
    + +
    + dblinkhorn + + authored + Nov 3, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + e7abb9f + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  2. + +
  3. +
    +

    + feat!: Add support for project items CRUD and project fields read ope… + + + +

    + +
    …rations (#3793)
    + +
    + +
    +
    + + @stephenotalora +
    +
    + +
    + stephenotalora + + authored + Nov 3, 2025 + +
    +
    + + + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + Configuration menu + + + +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + + + + +
    +
    Copy the full SHA + +
    +
    + + 2b239f2 + +View commit details + +
    +
    +
    +
    + +Browse the repository at this point in the history + +
    +
    +
  4. + +
+
+
+ +
+ +
+ + +
+ + Loading + +
+ + + +
+
+ + +
+ +
+ + +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2025 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + diff --git a/tools/gen-release-notes/testdata/release-notes-v77.txt b/tools/gen-release-notes/testdata/release-notes-v77.txt new file mode 100644 index 00000000000..5e0f2dff18c --- /dev/null +++ b/tools/gen-release-notes/testdata/release-notes-v77.txt @@ -0,0 +1,37 @@ +This release contains the following breaking API changes: + +* refactor!: Remove pointer from required field of CreateStatus API (#3794) + BREAKING CHANGE: `RepositoriesService.CreateStatus` now takes value for `status`, not pointer. +* feat!: Add support for project items CRUD and project fields read operations (#3793) + +...and the following additional changes: + +* Bump go-github from v75 to v76 in /scrape (#3783) +* Add custom jsonfieldname linter to ensure Go field name matches JSON tag name (#3757) +* chore: Fix typo in comment (#3786) +* feat: Add support for private registries endpoints (#3785) +* Only set `Authorization` when `token` is available (#3789) +* test: Ensure Authorization is not set with empty token (#3790) +* Fix spelling issues (#3792) +* Add test cases for JSON resource marshaling - SCIM (#3798) +* fix: Org/Enterprise UpdateRepositoryRulesetClearBypassActor sends empty array (#3796) + +&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + +This release contains the following breaking API changes: + +* #3794 + BREAKING CHANGE: `RepositoriesService.CreateStatus` now takes value for `status`, not pointer. +* #3793 + +...and the following additional changes: + +* #3783 +* #3757 +* #3786 +* #3785 +* #3789 +* #3790 +* #3792 +* #3798 +* #3796 diff --git a/tools/go.mod b/tools/go.mod index 3f5f3f04afc..48788a95621 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v1.12.1 github.com/getkin/kin-openapi v0.133.0 github.com/google/go-cmp v0.7.0 - github.com/google/go-github/v76 v76.0.0 + github.com/google/go-github/v77 v77.0.0 golang.org/x/sync v0.17.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -26,4 +26,4 @@ require ( ) // Use version at HEAD, not the latest published. -replace github.com/google/go-github/v76 => ../ +replace github.com/google/go-github/v77 => ../ diff --git a/tools/metadata/main.go b/tools/metadata/main.go index 9db65e4c89a..ef6db27e3ff 100644 --- a/tools/metadata/main.go +++ b/tools/metadata/main.go @@ -16,7 +16,7 @@ import ( "path/filepath" "github.com/alecthomas/kong" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) var helpVars = kong.Vars{ diff --git a/tools/metadata/main_test.go b/tools/metadata/main_test.go index 708bde735c3..f6342b54c01 100644 --- a/tools/metadata/main_test.go +++ b/tools/metadata/main_test.go @@ -23,7 +23,7 @@ import ( "github.com/alecthomas/kong" "github.com/getkin/kin-openapi/openapi3" "github.com/google/go-cmp/cmp" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func TestUpdateGo(t *testing.T) { diff --git a/tools/metadata/metadata.go b/tools/metadata/metadata.go index bd397e74322..512b3f1add3 100644 --- a/tools/metadata/metadata.go +++ b/tools/metadata/metadata.go @@ -24,7 +24,7 @@ import ( "strings" "sync" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "gopkg.in/yaml.v3" ) diff --git a/tools/metadata/openapi.go b/tools/metadata/openapi.go index 10746d0e9bd..f609aeee9e0 100644 --- a/tools/metadata/openapi.go +++ b/tools/metadata/openapi.go @@ -14,7 +14,7 @@ import ( "strconv" "github.com/getkin/kin-openapi/openapi3" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" "golang.org/x/sync/errgroup" ) From c343d93baeee4a41ad61de77f960905f9b296765 Mon Sep 17 00:00:00 2001 From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:46:16 -0500 Subject: [PATCH 13/16] Bump go-github from v76 to v77 in /scrape (#3801) --- scrape/apps.go | 2 +- scrape/apps_test.go | 2 +- scrape/go.mod | 2 +- scrape/go.sum | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scrape/apps.go b/scrape/apps.go index 6fea3e38585..2ff6f331803 100644 --- a/scrape/apps.go +++ b/scrape/apps.go @@ -18,7 +18,7 @@ import ( "strings" "github.com/PuerkitoBio/goquery" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) // AppRestrictionsEnabled returns whether the specified organization has diff --git a/scrape/apps_test.go b/scrape/apps_test.go index 25d10c010ba..d3ecfdb4d8e 100644 --- a/scrape/apps_test.go +++ b/scrape/apps_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/google/go-github/v76/github" + "github.com/google/go-github/v77/github" ) func Test_AppRestrictionsEnabled(t *testing.T) { diff --git a/scrape/go.mod b/scrape/go.mod index 62e9c1cd792..ad144142df0 100644 --- a/scrape/go.mod +++ b/scrape/go.mod @@ -5,7 +5,7 @@ go 1.24.0 require ( github.com/PuerkitoBio/goquery v1.10.3 github.com/google/go-cmp v0.7.0 - github.com/google/go-github/v76 v76.0.0 + github.com/google/go-github/v77 v77.0.0 github.com/xlzd/gotp v0.1.0 golang.org/x/net v0.46.0 ) diff --git a/scrape/go.sum b/scrape/go.sum index 81fcdc21ec3..43bb572e496 100644 --- a/scrape/go.sum +++ b/scrape/go.sum @@ -6,8 +6,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-github/v76 v76.0.0 h1:MCa9VQn+VG5GG7Y7BAkBvSRUN3o+QpaEOuZwFPJmdFA= -github.com/google/go-github/v76 v76.0.0/go.mod h1:38+d/8pYDO4fBLYfBhXF5EKO0wA3UkXBjfmQapFsNCQ= +github.com/google/go-github/v77 v77.0.0 h1:9DsKKbZqil5y/4Z9mNpZDQnpli6PJbqipSuuNdcbjwI= +github.com/google/go-github/v77 v77.0.0/go.mod h1:c8VmGXRUmaZUqbctUcGEDWYnMrtzZfJhDSylEf1wfmA= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/xlzd/gotp v0.1.0 h1:37blvlKCh38s+fkem+fFh7sMnceltoIEBYTVXyoa5Po= From 578f42edb5d00082c0f9c8372799d59d1c010042 Mon Sep 17 00:00:00 2001 From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Tue, 4 Nov 2025 13:22:30 -0500 Subject: [PATCH 14/16] chore: Update openapi_operations.yaml (#3802) --- github/admin.go | 4 +- github/admin_orgs.go | 6 +- github/admin_stats.go | 2 +- github/admin_users.go | 8 +- github/authorizations.go | 4 +- github/enterprise_manage_ghes.go | 8 +- github/enterprise_manage_ghes_config.go | 20 +- github/enterprise_manage_ghes_maintenance.go | 4 +- github/enterprise_manage_ghes_ssh.go | 6 +- github/repos_prereceive_hooks.go | 8 +- github/secret_scanning.go | 2 +- github/users_administration.go | 8 +- openapi_operations.yaml | 2515 ++++++++++-------- 13 files changed, 1412 insertions(+), 1183 deletions(-) diff --git a/github/admin.go b/github/admin.go index 021a12ad8c1..6a7cf918138 100644 --- a/github/admin.go +++ b/github/admin.go @@ -82,7 +82,7 @@ func (m Enterprise) String() string { // UpdateUserLDAPMapping updates the mapping between a GitHub user and an LDAP user. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user // //meta:operation PATCH /admin/ldap/users/{username}/mapping func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error) { @@ -103,7 +103,7 @@ func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, m // UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team // //meta:operation PATCH /admin/ldap/teams/{team_id}/mapping func (s *AdminService) UpdateTeamLDAPMapping(ctx context.Context, team int64, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) { diff --git a/github/admin_orgs.go b/github/admin_orgs.go index eb3f8d2dfea..f360a01f0e7 100644 --- a/github/admin_orgs.go +++ b/github/admin_orgs.go @@ -23,7 +23,7 @@ type createOrgRequest struct { // Note that only a subset of the org fields are used and org must // not be nil. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/orgs#create-an-organization +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#create-an-organization // //meta:operation POST /admin/organizations func (s *AdminService) CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error) { @@ -62,7 +62,7 @@ type RenameOrgResponse struct { // RenameOrg renames an organization in GitHub Enterprise. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/orgs#update-an-organization-name +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#update-an-organization-name // //meta:operation PATCH /admin/organizations/{org} func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName string) (*RenameOrgResponse, *Response, error) { @@ -78,7 +78,7 @@ func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName // RenameOrgByName renames an organization in GitHub Enterprise using its current name. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/orgs#update-an-organization-name +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#update-an-organization-name // //meta:operation PATCH /admin/organizations/{org} func (s *AdminService) RenameOrgByName(ctx context.Context, org, newName string) (*RenameOrgResponse, *Response, error) { diff --git a/github/admin_stats.go b/github/admin_stats.go index 07465b8d628..e2a8d9fd40c 100644 --- a/github/admin_stats.go +++ b/github/admin_stats.go @@ -152,7 +152,7 @@ func (s RepoStats) String() string { // Please note that this is only available to site administrators, // otherwise it will error with a 404 not found (instead of 401 or 403). // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-all-statistics +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-all-statistics // //meta:operation GET /enterprise/stats/all func (s *AdminService) GetAdminStats(ctx context.Context) (*AdminStats, *Response, error) { diff --git a/github/admin_users.go b/github/admin_users.go index e49a4b59dee..86166f7e922 100644 --- a/github/admin_users.go +++ b/github/admin_users.go @@ -20,7 +20,7 @@ type CreateUserRequest struct { // CreateUser creates a new user in GitHub Enterprise. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#create-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#create-a-user // //meta:operation POST /admin/users func (s *AdminService) CreateUser(ctx context.Context, userReq CreateUserRequest) (*User, *Response, error) { @@ -42,7 +42,7 @@ func (s *AdminService) CreateUser(ctx context.Context, userReq CreateUserRequest // DeleteUser deletes a user in GitHub Enterprise. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#delete-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-a-user // //meta:operation DELETE /admin/users/{username} func (s *AdminService) DeleteUser(ctx context.Context, username string) (*Response, error) { @@ -95,7 +95,7 @@ type UserAuthorization struct { // CreateUserImpersonation creates an impersonation OAuth token. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#create-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#create-an-impersonation-oauth-token // //meta:operation POST /admin/users/{username}/authorizations func (s *AdminService) CreateUserImpersonation(ctx context.Context, username string, opts *ImpersonateUserOptions) (*UserAuthorization, *Response, error) { @@ -117,7 +117,7 @@ func (s *AdminService) CreateUserImpersonation(ctx context.Context, username str // DeleteUserImpersonation deletes an impersonation OAuth token. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#delete-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-an-impersonation-oauth-token // //meta:operation DELETE /admin/users/{username}/authorizations func (s *AdminService) DeleteUserImpersonation(ctx context.Context, username string) (*Response, error) { diff --git a/github/authorizations.go b/github/authorizations.go index 6f22e40a16a..52f19c0f756 100644 --- a/github/authorizations.go +++ b/github/authorizations.go @@ -257,7 +257,7 @@ func (s *AuthorizationsService) DeleteGrant(ctx context.Context, clientID, acces // you can e.g. create or delete a user's public SSH key. NOTE: creating a // new token automatically revokes an existing one. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#create-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#create-an-impersonation-oauth-token // //meta:operation POST /admin/users/{username}/authorizations func (s *AuthorizationsService) CreateImpersonation(ctx context.Context, username string, authReq *AuthorizationRequest) (*Authorization, *Response, error) { @@ -279,7 +279,7 @@ func (s *AuthorizationsService) CreateImpersonation(ctx context.Context, usernam // // NOTE: there can be only one at a time. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#delete-an-impersonation-oauth-token +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-an-impersonation-oauth-token // //meta:operation DELETE /admin/users/{username}/authorizations func (s *AuthorizationsService) DeleteImpersonation(ctx context.Context, username string) (*Response, error) { diff --git a/github/enterprise_manage_ghes.go b/github/enterprise_manage_ghes.go index c5e38386a1f..f9ffd03f6f4 100644 --- a/github/enterprise_manage_ghes.go +++ b/github/enterprise_manage_ghes.go @@ -74,7 +74,7 @@ type ReleaseVersion struct { // CheckSystemRequirements checks if GHES system nodes meet the system requirements. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-system-requirement-check-results-for-configured-cluster-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-system-requirement-check-results-for-configured-cluster-nodes // //meta:operation GET /manage/v1/checks/system-requirements func (s *EnterpriseService) CheckSystemRequirements(ctx context.Context) (*SystemRequirements, *Response, error) { @@ -95,7 +95,7 @@ func (s *EnterpriseService) CheckSystemRequirements(ctx context.Context) (*Syste // ClusterStatus gets the status of all services running on each cluster node. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-cluster-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-cluster-nodes // //meta:operation GET /manage/v1/cluster/status func (s *EnterpriseService) ClusterStatus(ctx context.Context) (*ClusterStatus, *Response, error) { @@ -116,7 +116,7 @@ func (s *EnterpriseService) ClusterStatus(ctx context.Context) (*ClusterStatus, // ReplicationStatus gets the status of all services running on each replica node. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-replica-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-replica-nodes // //meta:operation GET /manage/v1/replication/status func (s *EnterpriseService) ReplicationStatus(ctx context.Context, opts *NodeQueryOptions) (*ClusterStatus, *Response, error) { @@ -140,7 +140,7 @@ func (s *EnterpriseService) ReplicationStatus(ctx context.Context, opts *NodeQue // GetNodeReleaseVersions gets the version information deployed to each node. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-all-ghes-release-versions-for-all-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-all-ghes-release-versions-for-all-nodes // //meta:operation GET /manage/v1/version func (s *EnterpriseService) GetNodeReleaseVersions(ctx context.Context, opts *NodeQueryOptions) ([]*NodeReleaseVersion, *Response, error) { diff --git a/github/enterprise_manage_ghes_config.go b/github/enterprise_manage_ghes_config.go index b13d035e256..512eabe7f02 100644 --- a/github/enterprise_manage_ghes_config.go +++ b/github/enterprise_manage_ghes_config.go @@ -305,7 +305,7 @@ type NodeDetails struct { // ConfigApplyEvents gets events from the command ghe-config-apply. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#list-events-from-ghe-config-apply +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#list-events-from-ghe-config-apply // //meta:operation GET /manage/v1/config/apply/events func (s *EnterpriseService) ConfigApplyEvents(ctx context.Context, opts *ConfigApplyEventsOptions) (*ConfigApplyEvents, *Response, error) { @@ -330,7 +330,7 @@ func (s *EnterpriseService) ConfigApplyEvents(ctx context.Context, opts *ConfigA // InitialConfig initializes the GitHub Enterprise instance with a license and password. // After initializing the instance, you need to run an apply to apply the configuration. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password // //meta:operation POST /manage/v1/config/init func (s *EnterpriseService) InitialConfig(ctx context.Context, license, password string) (*Response, error) { @@ -351,7 +351,7 @@ func (s *EnterpriseService) InitialConfig(ctx context.Context, license, password // License gets the current license information for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-enterprise-license-information +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-enterprise-license-information // //meta:operation GET /manage/v1/config/license func (s *EnterpriseService) License(ctx context.Context) ([]*LicenseStatus, *Response, error) { @@ -372,7 +372,7 @@ func (s *EnterpriseService) License(ctx context.Context) ([]*LicenseStatus, *Res // UploadLicense uploads a new license to the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license // //meta:operation PUT /manage/v1/config/license func (s *EnterpriseService) UploadLicense(ctx context.Context, license string) (*Response, error) { @@ -390,7 +390,7 @@ func (s *EnterpriseService) UploadLicense(ctx context.Context, license string) ( // LicenseStatus gets the current license status for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#check-a-license +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#check-a-license // //meta:operation GET /manage/v1/config/license/check func (s *EnterpriseService) LicenseStatus(ctx context.Context) ([]*LicenseCheck, *Response, error) { @@ -412,7 +412,7 @@ func (s *EnterpriseService) LicenseStatus(ctx context.Context) ([]*LicenseCheck, // NodeMetadata gets the metadata for all nodes in the GitHub Enterprise instance. // This is required for clustered setups. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-ghes-node-metadata-for-all-nodes +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-ghes-node-metadata-for-all-nodes // //meta:operation GET /manage/v1/config/nodes func (s *EnterpriseService) NodeMetadata(ctx context.Context, opts *NodeQueryOptions) (*NodeMetadataStatus, *Response, error) { @@ -436,7 +436,7 @@ func (s *EnterpriseService) NodeMetadata(ctx context.Context, opts *NodeQueryOpt // Settings gets the current configuration settings for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-ghes-settings +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-ghes-settings // //meta:operation GET /manage/v1/config/settings func (s *EnterpriseService) Settings(ctx context.Context) (*ConfigSettings, *Response, error) { @@ -457,7 +457,7 @@ func (s *EnterpriseService) Settings(ctx context.Context) (*ConfigSettings, *Res // UpdateSettings updates the configuration settings for the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#set-settings +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#set-settings // //meta:operation PUT /manage/v1/config/settings func (s *EnterpriseService) UpdateSettings(ctx context.Context, opts *ConfigSettings) (*Response, error) { @@ -476,7 +476,7 @@ func (s *EnterpriseService) UpdateSettings(ctx context.Context, opts *ConfigSett // ConfigApply triggers a configuration apply run on the GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run // //meta:operation POST /manage/v1/config/apply func (s *EnterpriseService) ConfigApply(ctx context.Context, opts *ConfigApplyOptions) (*ConfigApplyOptions, *Response, error) { @@ -497,7 +497,7 @@ func (s *EnterpriseService) ConfigApply(ctx context.Context, opts *ConfigApplyOp // ConfigApplyStatus gets the status of a ghe-config-apply run on the GitHub Enterprise instance. // You can request lat one or specific id one. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-a-ghe-config-apply-run +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-a-ghe-config-apply-run // //meta:operation GET /manage/v1/config/apply func (s *EnterpriseService) ConfigApplyStatus(ctx context.Context, opts *ConfigApplyOptions) (*ConfigApplyStatus, *Response, error) { diff --git a/github/enterprise_manage_ghes_maintenance.go b/github/enterprise_manage_ghes_maintenance.go index 8b27b32a4a4..13bf0f9fe60 100644 --- a/github/enterprise_manage_ghes_maintenance.go +++ b/github/enterprise_manage_ghes_maintenance.go @@ -46,7 +46,7 @@ type MaintenanceOptions struct { // GetMaintenanceStatus gets the status of maintenance mode for all nodes. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-maintenance-mode +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-maintenance-mode // //meta:operation GET /manage/v1/maintenance func (s *EnterpriseService) GetMaintenanceStatus(ctx context.Context, opts *NodeQueryOptions) ([]*MaintenanceStatus, *Response, error) { @@ -71,7 +71,7 @@ func (s *EnterpriseService) GetMaintenanceStatus(ctx context.Context, opts *Node // CreateMaintenance sets the maintenance mode for the instance. // With the enable parameter we can control to put instance into maintenance mode or not. With false we can disable the maintenance mode. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#set-the-status-of-maintenance-mode +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#set-the-status-of-maintenance-mode // //meta:operation POST /manage/v1/maintenance func (s *EnterpriseService) CreateMaintenance(ctx context.Context, enable bool, opts *MaintenanceOptions) ([]*MaintenanceOperationStatus, *Response, error) { diff --git a/github/enterprise_manage_ghes_ssh.go b/github/enterprise_manage_ghes_ssh.go index d60f8977939..9f582d60594 100644 --- a/github/enterprise_manage_ghes_ssh.go +++ b/github/enterprise_manage_ghes_ssh.go @@ -31,7 +31,7 @@ type ClusterSSHKey struct { // DeleteSSHKey deletes the SSH key from the instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#delete-a-ssh-key +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#delete-a-ssh-key // //meta:operation DELETE /manage/v1/access/ssh func (s *EnterpriseService) DeleteSSHKey(ctx context.Context, key string) ([]*SSHKeyStatus, *Response, error) { @@ -55,7 +55,7 @@ func (s *EnterpriseService) DeleteSSHKey(ctx context.Context, key string) ([]*SS // GetSSHKey gets the SSH keys configured for the instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-configured-ssh-keys +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-configured-ssh-keys // //meta:operation GET /manage/v1/access/ssh func (s *EnterpriseService) GetSSHKey(ctx context.Context) ([]*ClusterSSHKey, *Response, error) { @@ -76,7 +76,7 @@ func (s *EnterpriseService) GetSSHKey(ctx context.Context) ([]*ClusterSSHKey, *R // CreateSSHKey adds a new SSH key to the instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#set-a-new-ssh-key +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#set-a-new-ssh-key // //meta:operation POST /manage/v1/access/ssh func (s *EnterpriseService) CreateSSHKey(ctx context.Context, key string) ([]*SSHKeyStatus, *Response, error) { diff --git a/github/repos_prereceive_hooks.go b/github/repos_prereceive_hooks.go index 02f5ff5dedd..61373b4a9b1 100644 --- a/github/repos_prereceive_hooks.go +++ b/github/repos_prereceive_hooks.go @@ -24,7 +24,7 @@ func (p PreReceiveHook) String() string { // ListPreReceiveHooks lists all pre-receive hooks for the specified repository. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository // //meta:operation GET /repos/{owner}/{repo}/pre-receive-hooks func (s *RepositoriesService) ListPreReceiveHooks(ctx context.Context, owner, repo string, opts *ListOptions) ([]*PreReceiveHook, *Response, error) { @@ -53,7 +53,7 @@ func (s *RepositoriesService) ListPreReceiveHooks(ctx context.Context, owner, re // GetPreReceiveHook returns a single specified pre-receive hook. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#get-a-pre-receive-hook-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#get-a-pre-receive-hook-for-a-repository // //meta:operation GET /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} func (s *RepositoriesService) GetPreReceiveHook(ctx context.Context, owner, repo string, id int64) (*PreReceiveHook, *Response, error) { @@ -77,7 +77,7 @@ func (s *RepositoriesService) GetPreReceiveHook(ctx context.Context, owner, repo // UpdatePreReceiveHook updates a specified pre-receive hook. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#update-pre-receive-hook-enforcement-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#update-pre-receive-hook-enforcement-for-a-repository // //meta:operation PATCH /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} func (s *RepositoriesService) UpdatePreReceiveHook(ctx context.Context, owner, repo string, id int64, hook *PreReceiveHook) (*PreReceiveHook, *Response, error) { @@ -101,7 +101,7 @@ func (s *RepositoriesService) UpdatePreReceiveHook(ctx context.Context, owner, r // DeletePreReceiveHook deletes a specified pre-receive hook. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-a-repository +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-a-repository // //meta:operation DELETE /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} func (s *RepositoriesService) DeletePreReceiveHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { diff --git a/github/secret_scanning.go b/github/secret_scanning.go index 2cedb5a4c80..248abadc695 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -172,7 +172,7 @@ type SecretScanningScanHistory struct { // To use this endpoint, you must be a member of the enterprise, and you must use an access token with the repo scope or // security_events scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. // -// GitHub API docs: https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise // //meta:operation GET /enterprises/{enterprise}/secret-scanning/alerts func (s *SecretScanningService) ListAlertsForEnterprise(ctx context.Context, enterprise string, opts *SecretScanningAlertListOptions) ([]*SecretScanningAlert, *Response, error) { diff --git a/github/users_administration.go b/github/users_administration.go index 69d23cb2381..ce87101f724 100644 --- a/github/users_administration.go +++ b/github/users_administration.go @@ -12,7 +12,7 @@ import ( // PromoteSiteAdmin promotes a user to a site administrator of a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator // //meta:operation PUT /users/{username}/site_admin func (s *UsersService) PromoteSiteAdmin(ctx context.Context, user string) (*Response, error) { @@ -28,7 +28,7 @@ func (s *UsersService) PromoteSiteAdmin(ctx context.Context, user string) (*Resp // DemoteSiteAdmin demotes a user from site administrator of a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#demote-a-site-administrator +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#demote-a-site-administrator // //meta:operation DELETE /users/{username}/site_admin func (s *UsersService) DemoteSiteAdmin(ctx context.Context, user string) (*Response, error) { @@ -49,7 +49,7 @@ type UserSuspendOptions struct { // Suspend a user on a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#suspend-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#suspend-a-user // //meta:operation PUT /users/{username}/suspended func (s *UsersService) Suspend(ctx context.Context, user string, opts *UserSuspendOptions) (*Response, error) { @@ -65,7 +65,7 @@ func (s *UsersService) Suspend(ctx context.Context, user string, opts *UserSuspe // Unsuspend a user on a GitHub Enterprise instance. // -// GitHub API docs: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#unsuspend-a-user +// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#unsuspend-a-user // //meta:operation DELETE /users/{username}/suspended func (s *UsersService) Unsuspend(ctx context.Context, user string) (*Response, error) { diff --git a/openapi_operations.yaml b/openapi_operations.yaml index 21db61d04b4..f521f4209bc 100644 --- a/openapi_operations.yaml +++ b/openapi_operations.yaml @@ -27,260 +27,260 @@ operation_overrides: documentation_url: https://docs.github.com/rest/pages/pages#request-a-github-pages-build - name: GET /repos/{owner}/{repo}/pages/builds/{build_id} documentation_url: https://docs.github.com/rest/pages/pages#get-github-pages-build -openapi_commit: dee4dc2b1ab40c75c2ae562e4300503b632f4424 +openapi_commit: b972b823e3572c9e6b64c3341401184e4eb0a474 openapi_operations: - name: GET / documentation_url: https://docs.github.com/rest/meta/meta#github-api-root openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/hooks - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/global-webhooks#list-global-webhooks + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/global-webhooks#list-global-webhooks openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/hooks - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/global-webhooks#create-a-global-webhook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/global-webhooks#create-a-global-webhook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /admin/hooks/{hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/global-webhooks#delete-a-global-webhook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/global-webhooks#delete-a-global-webhook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/hooks/{hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/global-webhooks#get-a-global-webhook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/global-webhooks#get-a-global-webhook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /admin/hooks/{hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/global-webhooks#update-a-global-webhook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/global-webhooks#update-a-global-webhook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/hooks/{hook_id}/pings - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/global-webhooks#ping-a-global-webhook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/global-webhooks#ping-a-global-webhook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/keys - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#list-public-keys + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#list-public-keys openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /admin/keys/{key_ids} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#delete-a-public-key + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-a-public-key openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /admin/ldap/teams/{team_id}/mapping - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/ldap/teams/{team_id}/sync - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/ldap#sync-ldap-mapping-for-a-team + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/ldap#sync-ldap-mapping-for-a-team openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /admin/ldap/users/{username}/mapping - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/ldap/users/{username}/sync - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/ldap#sync-ldap-mapping-for-a-user + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/ldap#sync-ldap-mapping-for-a-user openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/organizations - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/orgs#create-an-organization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#create-an-organization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /admin/organizations/{org} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/orgs#update-an-organization-name + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#update-an-organization-name openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/pre-receive-environments - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-environments#list-pre-receive-environments + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-environments#list-pre-receive-environments openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/pre-receive-environments - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-environments#create-a-pre-receive-environment + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-environments#create-a-pre-receive-environment openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /admin/pre-receive-environments/{pre_receive_environment_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-environments#delete-a-pre-receive-environment + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-environments#delete-a-pre-receive-environment openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/pre-receive-environments/{pre_receive_environment_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-environments#get-a-pre-receive-environment + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-environments#get-a-pre-receive-environment openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /admin/pre-receive-environments/{pre_receive_environment_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-environments#update-a-pre-receive-environment + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-environments#update-a-pre-receive-environment openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/pre-receive-environments/{pre_receive_environment_id}/downloads - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-environments#start-a-pre-receive-environment-download + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-environments#start-a-pre-receive-environment-download openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-environments#get-the-download-status-for-a-pre-receive-environment + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-environments#get-the-download-status-for-a-pre-receive-environment openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/pre-receive-hooks - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-hooks#list-pre-receive-hooks + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-hooks#list-pre-receive-hooks openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/pre-receive-hooks - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-hooks#create-a-pre-receive-hook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-hooks#create-a-pre-receive-hook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /admin/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-hooks#delete-a-pre-receive-hook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-hooks#delete-a-pre-receive-hook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-hooks#get-a-pre-receive-hook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-hooks#get-a-pre-receive-hook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /admin/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/pre-receive-hooks#update-a-pre-receive-hook + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/pre-receive-hooks#update-a-pre-receive-hook openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /admin/tokens - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#list-personal-access-tokens + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#list-personal-access-tokens openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /admin/tokens/{token_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#delete-a-personal-access-token + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-a-personal-access-token openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/users - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#create-a-user + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#create-a-user openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /admin/users/{username} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#delete-a-user + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-a-user openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /admin/users/{username} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#update-the-username-for-a-user + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#update-the-username-for-a-user openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /admin/users/{username}/authorizations - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#delete-an-impersonation-oauth-token + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-an-impersonation-oauth-token openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /admin/users/{username}/authorizations - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#create-an-impersonation-oauth-token + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#create-an-impersonation-oauth-token openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /advisories documentation_url: https://docs.github.com/rest/security-advisories/global-advisories#list-global-security-advisories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /advisories/{ghsa_id} documentation_url: https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /app documentation_url: https://docs.github.com/rest/apps/apps#get-the-authenticated-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /app-manifests/{code}/conversions documentation_url: https://docs.github.com/rest/apps/apps#create-a-github-app-from-a-manifest openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /app/hook/config documentation_url: https://docs.github.com/rest/apps/webhooks#get-a-webhook-configuration-for-an-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /app/hook/config documentation_url: https://docs.github.com/rest/apps/webhooks#update-a-webhook-configuration-for-an-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /app/hook/deliveries documentation_url: https://docs.github.com/rest/apps/webhooks#list-deliveries-for-an-app-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /app/hook/deliveries/{delivery_id} documentation_url: https://docs.github.com/rest/apps/webhooks#get-a-delivery-for-an-app-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /app/hook/deliveries/{delivery_id}/attempts documentation_url: https://docs.github.com/rest/apps/webhooks#redeliver-a-delivery-for-an-app-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /app/installation-requests documentation_url: https://docs.github.com/rest/apps/apps#list-installation-requests-for-the-authenticated-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /app/installations documentation_url: https://docs.github.com/rest/apps/apps#list-installations-for-the-authenticated-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /app/installations/{installation_id} documentation_url: https://docs.github.com/rest/apps/apps#delete-an-installation-for-the-authenticated-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /app/installations/{installation_id} documentation_url: https://docs.github.com/rest/apps/apps#get-an-installation-for-the-authenticated-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /app/installations/{installation_id}/access_tokens documentation_url: https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /app/installations/{installation_id}/suspended documentation_url: https://docs.github.com/rest/apps/apps#unsuspend-an-app-installation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /app/installations/{installation_id}/suspended documentation_url: https://docs.github.com/rest/apps/apps#suspend-an-app-installation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /applications/grants - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#list-your-grants + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#list-your-grants openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /applications/grants/{grant_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#delete-a-grant + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#delete-a-grant openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /applications/grants/{grant_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#get-a-single-grant + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#get-a-single-grant openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /applications/{client_id}/grant documentation_url: https://docs.github.com/rest/apps/oauth-applications#delete-an-app-authorization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /applications/{client_id}/grants/{access_token} documentation_url: https://docs.github.com/enterprise-server@3.3/rest/reference/apps#revoke-a-grant-for-an-application openapi_files: @@ -290,25 +290,25 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /applications/{client_id}/token documentation_url: https://docs.github.com/rest/apps/oauth-applications#reset-a-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /applications/{client_id}/token documentation_url: https://docs.github.com/rest/apps/oauth-applications#check-a-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /applications/{client_id}/token/scoped documentation_url: https://docs.github.com/rest/apps/apps#create-a-scoped-access-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /applications/{client_id}/tokens/{access_token} documentation_url: https://docs.github.com/enterprise-server@3.3/rest/reference/apps#revoke-an-authorization-for-an-application openapi_files: @@ -326,7 +326,7 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /assignments/{assignment_id} documentation_url: https://docs.github.com/rest/classroom/classroom#get-an-assignment openapi_files: @@ -343,33 +343,33 @@ openapi_operations: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - name: GET /authorizations - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#list-your-authorizations + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#list-your-authorizations openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /authorizations - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#create-a-new-authorization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#create-a-new-authorization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /authorizations/clients/{client_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /authorizations/clients/{client_id}/{fingerprint} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /authorizations/{authorization_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#delete-an-authorization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#delete-an-authorization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /authorizations/{authorization_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#get-a-single-authorization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#get-a-single-authorization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /authorizations/{authorization_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/oauth-authorizations/oauth-authorizations#update-an-existing-authorization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/oauth-authorizations/oauth-authorizations#update-an-existing-authorization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /classrooms documentation_url: https://docs.github.com/rest/classroom/classroom#list-classrooms openapi_files: @@ -390,92 +390,93 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /codes_of_conduct/{key} documentation_url: https://docs.github.com/rest/codes-of-conduct/codes-of-conduct#get-a-code-of-conduct openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /credentials/revoke documentation_url: https://docs.github.com/rest/credentials/revoke#revoke-a-list-of-credentials openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /emojis documentation_url: https://docs.github.com/rest/emojis/emojis#get-emojis openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise-installation/{enterprise_or_org}/server-statistics documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/admin-stats#get-github-enterprise-server-statistics openapi_files: - descriptions/ghec/ghec.json - name: DELETE /enterprise/announcement - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/announcement#remove-the-global-announcement-banner + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/announcement#remove-the-global-announcement-banner openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/announcement - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/announcement#get-the-global-announcement-banner + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/announcement#get-the-global-announcement-banner openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /enterprise/announcement - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/announcement#set-the-global-announcement-banner + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/announcement#set-the-global-announcement-banner openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/settings/license - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/license#get-license-information + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/license#get-license-information openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/all - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-all-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-all-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/comments - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-comment-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-comment-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/gists - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-gist-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-gist-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/hooks - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-hooks-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-hooks-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/issues - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-issue-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-issue-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/milestones - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-milestone-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-milestone-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/orgs - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-organization-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-organization-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/pages - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-pages-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-pages-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/pulls - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-pull-request-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-pull-request-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/repos - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-repository-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-repository-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/security-products - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-security-products-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-security-products-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprise/stats/users - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/admin-stats#get-users-statistics + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/admin-stats#get-users-statistics openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/access-restrictions/disable documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprises#disable-access-restrictions-for-an-enterprise openapi_files: @@ -488,15 +489,15 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/cache#get-github-actions-cache-usage-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/cache/usage-policy - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/actions/cache#get-github-actions-cache-usage-policy-for-an-enterprise + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/actions/cache#get-github-actions-cache-usage-policy-for-an-enterprise openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /enterprises/{enterprise}/actions/cache/usage-policy - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/actions/cache#set-github-actions-cache-usage-policy-for-an-enterprise + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/actions/cache#set-github-actions-cache-usage-policy-for-an-enterprise openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/hosted-runners documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#list-github-hosted-runners-for-an-enterprise openapi_files: @@ -505,6 +506,30 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#create-a-github-hosted-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/actions/hosted-runners/images/custom + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#list-custom-images-for-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/actions/hosted-runners/images/custom/{image_definition_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#delete-a-custom-image-from-the-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/actions/hosted-runners/images/custom/{image_definition_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#get-an-enterprise-custom-image-definition-for-github-actions-hosted-runners + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/actions/hosted-runners/images/custom/{image_definition_id}/versions + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#list-image-versions-of-a-custom-image-for-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#delete-an-image-version-of-custom-image-from-the-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#get-an-image-version-of-an-enterprise-custom-image-for-github-actions-hosted-runners + openapi_files: + - descriptions/ghec/ghec.json - name: GET /enterprises/{enterprise}/actions/hosted-runners/images/github-owned documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/hosted-runners#get-github-owned-images-for-github-hosted-runners-in-an-enterprise openapi_files: @@ -545,12 +570,12 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-github-actions-permissions-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/permissions documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-github-actions-permissions-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/permissions/artifact-and-log-retention documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-enterprise openapi_files: @@ -579,32 +604,32 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/permissions/organizations documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#disable-a-selected-organization-for-github-actions-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#enable-a-selected-organization-for-github-actions-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/permissions/selected-actions documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/permissions/selected-actions documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/permissions/self-hosted-runners documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-self-hosted-runners-permissions-for-an-enterprise openapi_files: @@ -617,137 +642,137 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#get-default-workflow-permissions-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/permissions/workflow documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/permissions#set-default-workflow-permissions-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runner-groups documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/actions/runner-groups documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-organization-access-to-a-self-hosted-runner-group-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#set-organization-access-for-a-self-hosted-runner-group-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runners documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runners/downloads documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-runner-applications-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/actions/runners/generate-jitconfig documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/actions/runners/registration-token documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-registration-token-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/actions/runners/remove-token documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#create-a-remove-token-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/actions/runners/{runner_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runners/{runner_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/announcement documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/enterprises#remove-announcement-banner-from-enterprise openapi_files: @@ -800,37 +825,37 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#get-the-audit-log-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/audit-log/stream-key documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#get-the-audit-log-stream-key-for-encrypting-secrets openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/audit-log/streams documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#list-audit-log-stream-configurations-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/audit-log/streams documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#create-an-audit-log-streaming-configuration-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/audit-log/streams/{stream_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#delete-an-audit-log-streaming-configuration-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/audit-log/streams/{stream_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#list-one-audit-log-streaming-configuration-via-a-stream-id openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/audit-log/streams/{stream_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#update-an-existing-audit-log-stream-configuration openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/bypass-requests/push-rules documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/bypass-requests#list-push-rule-bypass-requests-within-an-enterprise openapi_files: @@ -843,71 +868,71 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/code-security/configurations documentation_url: https://docs.github.com/rest/code-security/configurations#get-code-security-configurations-for-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/code-security/configurations documentation_url: https://docs.github.com/rest/code-security/configurations#create-a-code-security-configuration-for-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/code-security/configurations/defaults documentation_url: https://docs.github.com/rest/code-security/configurations#get-default-code-security-configurations-for-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id} documentation_url: https://docs.github.com/rest/code-security/configurations#delete-a-code-security-configuration-for-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/code-security/configurations/{configuration_id} documentation_url: https://docs.github.com/rest/code-security/configurations#retrieve-a-code-security-configuration-of-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id} documentation_url: https://docs.github.com/rest/code-security/configurations#update-a-custom-code-security-configuration-for-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach documentation_url: https://docs.github.com/rest/code-security/configurations#attach-an-enterprise-configuration-to-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults documentation_url: https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories documentation_url: https://docs.github.com/rest/code-security/configurations#get-repositories-associated-with-an-enterprise-code-security-configuration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/code_security_and_analysis documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/code-security-and-analysis#get-code-security-and-analysis-features-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /enterprises/{enterprise}/code_security_and_analysis documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/code-security-and-analysis#update-code-security-and-analysis-features-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/consumed-licenses documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/license#list-enterprise-consumed-licenses openapi_files: @@ -936,12 +961,68 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-metrics#get-copilot-metrics-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/copilot/metrics/reports/enterprise-1-day + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-metrics#get-copilot-enterprise-usage-metrics-for-a-specific-day + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/copilot/metrics/reports/enterprise-28-day/latest + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-metrics#get-copilot-enterprise-usage-metrics + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/copilot/metrics/reports/users-1-day + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-metrics#get-copilot-users-usage-metrics-for-a-specific-day + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/copilot/metrics/reports/users-28-day/latest + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-metrics#get-copilot-users-usage-metrics + openapi_files: + - descriptions/ghec/ghec.json - name: GET /enterprises/{enterprise}/dependabot/alerts documentation_url: https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json + - name: GET /enterprises/{enterprise}/enterprise-roles + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#get-all-enterprise-roles-for-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/enterprise-roles/teams/{team_slug} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#remove-all-enterprise-roles-from-a-team + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/enterprise-roles/teams/{team_slug}/{role_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#remove-an-enterprise-role-from-a-team + openapi_files: + - descriptions/ghec/ghec.json + - name: PUT /enterprises/{enterprise}/enterprise-roles/teams/{team_slug}/{role_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#assign-an-enterprise-role-to-a-team + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/enterprise-roles/users/{username} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#remove-all-enterprise-roles-from-a-user + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/enterprise-roles/users/{username}/{role_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#remove-enterprise-user-role-assignment + openapi_files: + - descriptions/ghec/ghec.json + - name: PUT /enterprises/{enterprise}/enterprise-roles/users/{username}/{role_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#assign-an-enterprise-role-to-an-enterprise-user + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/enterprise-roles/{role_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#get-an-enterprise-role + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/enterprise-roles/{role_id}/teams + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#list-teams-that-are-assigned-to-an-enterprise-role + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/enterprise-roles/{role_id}/users + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/enterprise-roles#list-users-that-are-assigned-to-an-enterprise-role + openapi_files: + - descriptions/ghec/ghec.json - name: GET /enterprises/{enterprise}/license-sync-status documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/license#get-a-license-sync-status openapi_files: @@ -974,30 +1055,64 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/network-configurations#get-a-hosted-compute-network-settings-resource-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/org-properties/schema + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties-for-orgs#get-organization-custom-properties-schema-for-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: PATCH /enterprises/{enterprise}/org-properties/schema + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties-for-orgs#create-or-update-organization-custom-property-definitions-on-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/org-properties/schema/{custom_property_name} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties-for-orgs#remove-an-organization-custom-property-definition-from-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/org-properties/schema/{custom_property_name} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties-for-orgs#get-an-organization-custom-property-definition-from-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: PUT /enterprises/{enterprise}/org-properties/schema/{custom_property_name} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties-for-orgs#create-or-update-an-organization-custom-property-definition-on-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/org-properties/values + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties-for-orgs#list-custom-property-values-for-organizations-in-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json + - name: PATCH /enterprises/{enterprise}/org-properties/values + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties-for-orgs#create-or-update-custom-property-values-for-organizations-in-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json - name: GET /enterprises/{enterprise}/properties/schema documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties#get-custom-properties-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /enterprises/{enterprise}/properties/schema documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties#create-or-update-custom-properties-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/properties/schema/organizations/{org}/{custom_property_name}/promote documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties#promote-a-custom-property-to-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /enterprises/{enterprise}/properties/schema/{custom_property_name} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties#remove-a-custom-property-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/properties/schema/{custom_property_name} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties#get-a-custom-property-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /enterprises/{enterprise}/properties/schema/{custom_property_name} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/custom-properties#create-or-update-a-custom-property-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /enterprises/{enterprise}/rulesets documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/rules#create-an-enterprise-repository-ruleset openapi_files: @@ -1023,11 +1138,10 @@ openapi_operations: openapi_files: - descriptions/ghec/ghec.json - name: GET /enterprises/{enterprise}/secret-scanning/alerts - documentation_url: https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise openapi_files: - - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /enterprises/{enterprise}/secret-scanning/pattern-configurations documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/push-protection#list-enterprise-pattern-configurations openapi_files: @@ -1044,7 +1158,27 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-github-advanced-security-active-committers-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json + - name: GET /enterprises/{enterprise}/settings/billing/budgets + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/billing/enhanced-billing#get-all-budgets + openapi_files: + - descriptions/ghec/ghec.json + - name: POST /enterprises/{enterprise}/settings/billing/budgets + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/billing/enhanced-billing#create-a-budget + openapi_files: + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/settings/billing/budgets/{budget_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/billing/enhanced-billing#delete-a-budget + openapi_files: + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/settings/billing/budgets/{budget_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/billing/enhanced-billing#get-a-budget-by-id + openapi_files: + - descriptions/ghec/ghec.json + - name: PATCH /enterprises/{enterprise}/settings/billing/budgets/{budget_id} + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/billing/enhanced-billing#update-a-budget + openapi_files: + - descriptions/ghec/ghec.json - name: GET /enterprises/{enterprise}/settings/billing/cost-centers documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-all-cost-centers-for-an-enterprise openapi_files: @@ -1089,6 +1223,10 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-billing-usage-report-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/settings/billing/usage/summary + documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#get-billing-usage-summary-for-an-enterprise + openapi_files: + - descriptions/ghec/ghec.json - name: GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/copilot/copilot-metrics#get-copilot-metrics-for-an-enterprise-team openapi_files: @@ -1133,6 +1271,36 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations + documentation_url: https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#get-organization-assignments + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add + documentation_url: https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove + documentation_url: https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#remove-organization-assignments + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org} + documentation_url: https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#delete-an-organization-assignment + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org} + documentation_url: https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#get-organization-assignment + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org} + documentation_url: https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-an-organization-assignment + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json - name: DELETE /enterprises/{enterprise}/teams/{team_slug} documentation_url: https://docs.github.com/rest/enterprise-teams/enterprise-teams#delete-an-enterprise-team openapi_files: @@ -1152,263 +1320,263 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/code-security-and-analysis#enable-or-disable-a-security-feature openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /events documentation_url: https://docs.github.com/rest/activity/events#list-public-events openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /feeds documentation_url: https://docs.github.com/rest/activity/feeds#get-feeds openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists documentation_url: https://docs.github.com/rest/gists/gists#list-gists-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /gists documentation_url: https://docs.github.com/rest/gists/gists#create-a-gist openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/public documentation_url: https://docs.github.com/rest/gists/gists#list-public-gists openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/starred documentation_url: https://docs.github.com/rest/gists/gists#list-starred-gists openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /gists/{gist_id} documentation_url: https://docs.github.com/rest/gists/gists#delete-a-gist openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/{gist_id} documentation_url: https://docs.github.com/rest/gists/gists#get-a-gist openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /gists/{gist_id} documentation_url: https://docs.github.com/rest/gists/gists#update-a-gist openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/{gist_id}/comments documentation_url: https://docs.github.com/rest/gists/comments#list-gist-comments openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /gists/{gist_id}/comments documentation_url: https://docs.github.com/rest/gists/comments#create-a-gist-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /gists/{gist_id}/comments/{comment_id} documentation_url: https://docs.github.com/rest/gists/comments#delete-a-gist-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/{gist_id}/comments/{comment_id} documentation_url: https://docs.github.com/rest/gists/comments#get-a-gist-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /gists/{gist_id}/comments/{comment_id} documentation_url: https://docs.github.com/rest/gists/comments#update-a-gist-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/{gist_id}/commits documentation_url: https://docs.github.com/rest/gists/gists#list-gist-commits openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/{gist_id}/forks documentation_url: https://docs.github.com/rest/gists/gists#list-gist-forks openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /gists/{gist_id}/forks documentation_url: https://docs.github.com/rest/gists/gists#fork-a-gist openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /gists/{gist_id}/star documentation_url: https://docs.github.com/rest/gists/gists#unstar-a-gist openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/{gist_id}/star documentation_url: https://docs.github.com/rest/gists/gists#check-if-a-gist-is-starred openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /gists/{gist_id}/star documentation_url: https://docs.github.com/rest/gists/gists#star-a-gist openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gists/{gist_id}/{sha} documentation_url: https://docs.github.com/rest/gists/gists#get-a-gist-revision openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gitignore/templates documentation_url: https://docs.github.com/rest/gitignore/gitignore#get-all-gitignore-templates openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /gitignore/templates/{name} documentation_url: https://docs.github.com/rest/gitignore/gitignore#get-a-gitignore-template openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /installation/repositories documentation_url: https://docs.github.com/rest/apps/installations#list-repositories-accessible-to-the-app-installation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /installation/token documentation_url: https://docs.github.com/rest/apps/installations#revoke-an-installation-access-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /issues documentation_url: https://docs.github.com/rest/issues/issues#list-issues-assigned-to-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /licenses documentation_url: https://docs.github.com/rest/licenses/licenses#get-all-commonly-used-licenses openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /licenses/{license} documentation_url: https://docs.github.com/rest/licenses/licenses#get-a-license openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /manage/v1/access/ssh - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#delete-a-ssh-key + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#delete-a-ssh-key openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/access/ssh - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-configured-ssh-keys + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-configured-ssh-keys openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /manage/v1/access/ssh - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#set-a-new-ssh-key + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#set-a-new-ssh-key openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/checks/system-requirements - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-system-requirement-check-results-for-configured-cluster-nodes + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-system-requirement-check-results-for-configured-cluster-nodes openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/cluster/status - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-cluster-nodes + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-cluster-nodes openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/config/apply - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-a-ghe-config-apply-run + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-a-ghe-config-apply-run openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /manage/v1/config/apply - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/config/apply/events - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#list-events-from-ghe-config-apply + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#list-events-from-ghe-config-apply openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /manage/v1/config/init - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/config/license - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-enterprise-license-information + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-enterprise-license-information openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /manage/v1/config/license - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/config/license/check - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#check-a-license + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#check-a-license openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/config/nodes - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-ghes-node-metadata-for-all-nodes + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-ghes-node-metadata-for-all-nodes openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/config/settings - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-ghes-settings + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-ghes-settings openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /manage/v1/config/settings - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#set-settings + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#set-settings openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/maintenance - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-maintenance-mode + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-maintenance-mode openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /manage/v1/maintenance - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#set-the-status-of-maintenance-mode + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#set-the-status-of-maintenance-mode openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/replication/status - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-replica-nodes + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-replica-nodes openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /manage/v1/version - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/manage-ghes#get-all-ghes-release-versions-for-all-nodes + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/manage-ghes#get-all-ghes-release-versions-for-all-nodes openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /markdown documentation_url: https://docs.github.com/rest/markdown/markdown#render-a-markdown-document openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /markdown/raw documentation_url: https://docs.github.com/rest/markdown/markdown#render-a-markdown-document-in-raw-mode openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /marketplace_listing/accounts/{account_id} documentation_url: https://docs.github.com/rest/apps/marketplace#get-a-subscription-plan-for-an-account openapi_files: @@ -1444,90 +1612,123 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /networks/{owner}/{repo}/events documentation_url: https://docs.github.com/rest/activity/events#list-public-events-for-a-network-of-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /notifications documentation_url: https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /notifications documentation_url: https://docs.github.com/rest/activity/notifications#mark-notifications-as-read openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /notifications/threads/{thread_id} documentation_url: https://docs.github.com/rest/activity/notifications#mark-a-thread-as-done openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /notifications/threads/{thread_id} documentation_url: https://docs.github.com/rest/activity/notifications#get-a-thread openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /notifications/threads/{thread_id} documentation_url: https://docs.github.com/rest/activity/notifications#mark-a-thread-as-read openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /notifications/threads/{thread_id}/subscription documentation_url: https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /notifications/threads/{thread_id}/subscription documentation_url: https://docs.github.com/rest/activity/notifications#get-a-thread-subscription-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /notifications/threads/{thread_id}/subscription documentation_url: https://docs.github.com/rest/activity/notifications#set-a-thread-subscription openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /octocat documentation_url: https://docs.github.com/rest/meta/meta#get-octocat openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /organizations documentation_url: https://docs.github.com/rest/orgs/orgs#list-organizations openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /organizations/{organization_id}/custom_roles documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#closing-down---list-custom-repository-roles-in-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /organizations/{org}/dependabot/repository-access documentation_url: https://docs.github.com/rest/dependabot/repository-access#lists-the-repositories-dependabot-can-access-in-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /organizations/{org}/dependabot/repository-access documentation_url: https://docs.github.com/rest/dependabot/repository-access#updates-dependabots-repository-access-list-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /organizations/{org}/dependabot/repository-access/default-level documentation_url: https://docs.github.com/rest/dependabot/repository-access#set-the-default-repository-access-level-for-dependabot + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json + - name: GET /organizations/{org}/org-properties/values + documentation_url: https://docs.github.com/rest/orgs/custom-properties-for-orgs#get-all-custom-property-values-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PATCH /organizations/{org}/org-properties/values + documentation_url: https://docs.github.com/rest/orgs/custom-properties-for-orgs#create-or-update-custom-property-values-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /organizations/{org}/settings/billing/budgets + documentation_url: https://docs.github.com/rest/billing/enhanced-billing#get-all-budgets-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: DELETE /organizations/{org}/settings/billing/budgets/{budget_id} + documentation_url: https://docs.github.com/rest/billing/enhanced-billing#delete-a-budget-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /organizations/{org}/settings/billing/budgets/{budget_id} + documentation_url: https://docs.github.com/rest/billing/enhanced-billing#get-a-budget-by-id-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PATCH /organizations/{org}/settings/billing/budgets/{budget_id} + documentation_url: https://docs.github.com/rest/billing/enhanced-billing#update-a-budget-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json @@ -1541,36 +1742,41 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - name: GET /organizations/{org}/settings/billing/usage/summary + documentation_url: https://docs.github.com/rest/billing/enhanced-billing#get-billing-usage-summary-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json - name: DELETE /orgs/{org} documentation_url: https://docs.github.com/rest/orgs/orgs#delete-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org} documentation_url: https://docs.github.com/rest/orgs/orgs#get-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org} documentation_url: https://docs.github.com/rest/orgs/orgs#update-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/cache/usage documentation_url: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/cache/usage-by-repository documentation_url: https://docs.github.com/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/hosted-runners documentation_url: https://docs.github.com/rest/actions/hosted-runners#list-github-hosted-runners-for-an-organization openapi_files: @@ -1581,6 +1787,36 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/actions/hosted-runners/images/custom + documentation_url: https://docs.github.com/rest/actions/hosted-runners#list-custom-images-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id} + documentation_url: https://docs.github.com/rest/actions/hosted-runners#delete-a-custom-image-from-the-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id} + documentation_url: https://docs.github.com/rest/actions/hosted-runners#get-a-custom-image-definition-for-github-actions-hosted-runners + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions + documentation_url: https://docs.github.com/rest/actions/hosted-runners#list-image-versions-of-a-custom-image-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version} + documentation_url: https://docs.github.com/rest/actions/hosted-runners#delete-an-image-version-of-custom-image-from-the-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version} + documentation_url: https://docs.github.com/rest/actions/hosted-runners#get-an-image-version-of-a-custom-image-for-github-actions-hosted-runners + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json - name: GET /orgs/{org}/actions/hosted-runners/images/github-owned documentation_url: https://docs.github.com/rest/actions/hosted-runners#get-github-owned-images-for-github-hosted-runners-in-an-organization openapi_files: @@ -1626,25 +1862,25 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/oidc/customization/sub documentation_url: https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/permissions documentation_url: https://docs.github.com/rest/actions/permissions#get-github-actions-permissions-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/permissions documentation_url: https://docs.github.com/rest/actions/permissions#set-github-actions-permissions-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/permissions/artifact-and-log-retention documentation_url: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-organization openapi_files: @@ -1680,37 +1916,37 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/permissions/repositories documentation_url: https://docs.github.com/rest/actions/permissions#set-selected-repositories-enabled-for-github-actions-in-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/permissions/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/permissions#disable-a-selected-repository-for-github-actions-in-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/permissions/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/permissions#enable-a-selected-repository-for-github-actions-in-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/permissions/selected-actions documentation_url: https://docs.github.com/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/permissions/selected-actions documentation_url: https://docs.github.com/rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/permissions/self-hosted-runners documentation_url: https://docs.github.com/rest/actions/permissions#get-self-hosted-runners-settings-for-an-organization openapi_files: @@ -1746,43 +1982,43 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/permissions/workflow documentation_url: https://docs.github.com/rest/actions/permissions#set-default-workflow-permissions-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runner-groups documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/actions/runner-groups documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/runner-groups/{runner_group_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runner-groups/{runner_group_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/actions/runner-groups/{runner_group_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-github-hosted-runners-in-a-group-for-an-organization openapi_files: @@ -1793,244 +2029,244 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#set-repository-access-for-a-self-hosted-runner-group-in-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#add-repository-access-to-a-self-hosted-runner-group-in-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runners documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runners/downloads documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#list-runner-applications-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/actions/runners/generate-jitconfig documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/actions/runners/registration-token documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#create-a-registration-token-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/actions/runners/remove-token documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#create-a-remove-token-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/runners/{runner_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runners/{runner_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name} documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/secrets documentation_url: https://docs.github.com/rest/actions/secrets#list-organization-secrets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/secrets/public-key documentation_url: https://docs.github.com/rest/actions/secrets#get-an-organization-public-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#delete-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#get-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/secrets/{secret_name}/repositories documentation_url: https://docs.github.com/rest/actions/secrets#list-selected-repositories-for-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/secrets/{secret_name}/repositories documentation_url: https://docs.github.com/rest/actions/secrets#set-selected-repositories-for-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/secrets#remove-selected-repository-from-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/variables documentation_url: https://docs.github.com/rest/actions/variables#list-organization-variables openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/actions/variables documentation_url: https://docs.github.com/rest/actions/variables#create-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#delete-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#get-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/actions/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#update-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/actions/variables/{name}/repositories documentation_url: https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/variables/{name}/repositories documentation_url: https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/announcement documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/organizations#remove-announcement-banner-from-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/announcement documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/organizations#get-announcement-banner-for-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/announcement documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/announcement-banners/organizations#set-announcement-banner-for-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/artifacts/metadata/storage-record documentation_url: https://docs.github.com/rest/orgs/artifact-metadata#create-artifact-metadata-storage-record openapi_files: @@ -2056,6 +2292,11 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/attestations/repositories + documentation_url: https://docs.github.com/rest/orgs/attestations#list-attestation-repositories + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json - name: DELETE /orgs/{org}/attestations/{attestation_id} documentation_url: https://docs.github.com/rest/orgs/attestations#delete-attestations-by-id openapi_files: @@ -2070,7 +2311,7 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/orgs#get-the-audit-log-for-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/blocks documentation_url: https://docs.github.com/rest/orgs/blocking#list-users-blocked-by-an-organization openapi_files: @@ -2095,12 +2336,12 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/bypass-requests#list-push-rule-bypass-requests-within-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/bypass-requests/secret-scanning documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/delegated-bypass#list-bypass-requests-for-secret-scanning-for-an-org openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/campaigns documentation_url: https://docs.github.com/rest/campaigns/campaigns#list-campaigns-for-an-organization openapi_files: @@ -2131,67 +2372,67 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/code-security/configurations documentation_url: https://docs.github.com/rest/code-security/configurations#get-code-security-configurations-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/code-security/configurations documentation_url: https://docs.github.com/rest/code-security/configurations#create-a-code-security-configuration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/code-security/configurations/defaults documentation_url: https://docs.github.com/rest/code-security/configurations#get-default-code-security-configurations openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/code-security/configurations/detach documentation_url: https://docs.github.com/rest/code-security/configurations#detach-configurations-from-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/code-security/configurations/{configuration_id} documentation_url: https://docs.github.com/rest/code-security/configurations#delete-a-code-security-configuration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/code-security/configurations/{configuration_id} documentation_url: https://docs.github.com/rest/code-security/configurations#get-a-code-security-configuration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/code-security/configurations/{configuration_id} documentation_url: https://docs.github.com/rest/code-security/configurations#update-a-code-security-configuration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/code-security/configurations/{configuration_id}/attach documentation_url: https://docs.github.com/rest/code-security/configurations#attach-a-configuration-to-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults documentation_url: https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories documentation_url: https://docs.github.com/rest/code-security/configurations#get-repositories-associated-with-a-code-security-configuration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/codespaces documentation_url: https://docs.github.com/rest/codespaces/organizations#list-codespaces-for-the-organization openapi_files: @@ -2304,27 +2545,27 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/custom-repository-roles documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#create-a-custom-repository-role openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/custom-repository-roles/{role_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#delete-a-custom-repository-role openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/custom-repository-roles/{role_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#get-a-custom-repository-role openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/custom-repository-roles/{role_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#update-a-custom-repository-role openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/custom_roles documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#closing-down---create-a-custom-role openapi_files: @@ -2346,61 +2587,61 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/dependabot/secrets documentation_url: https://docs.github.com/rest/dependabot/secrets#list-organization-secrets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/dependabot/secrets/public-key documentation_url: https://docs.github.com/rest/dependabot/secrets#get-an-organization-public-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/dependabot/secrets/{secret_name} documentation_url: https://docs.github.com/rest/dependabot/secrets#delete-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/dependabot/secrets/{secret_name} documentation_url: https://docs.github.com/rest/dependabot/secrets#get-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/dependabot/secrets/{secret_name} documentation_url: https://docs.github.com/rest/dependabot/secrets#create-or-update-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories documentation_url: https://docs.github.com/rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories documentation_url: https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/dependabot/secrets#add-selected-repository-to-an-organization-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/dismissal-requests/code-scanning documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/alert-dismissal-requests#list-dismissal-requests-for-code-scanning-alerts-for-an-organization openapi_files: @@ -2409,28 +2650,29 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/alert-dismissal-requests#list-alert-dismissal-requests-for-secret-scanning-for-an-org openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/docker/conflicts documentation_url: https://docs.github.com/rest/packages/packages#get-list-of-conflicting-packages-during-docker-migration-for-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/events documentation_url: https://docs.github.com/rest/activity/events#list-public-organization-events openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/external-group/{group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#get-an-external-group openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/external-groups documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#list-external-groups-available-to-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/failed_invitations documentation_url: https://docs.github.com/rest/orgs/members#list-failed-organization-invitations openapi_files: @@ -2445,67 +2687,67 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/hooks documentation_url: https://docs.github.com/rest/orgs/webhooks#create-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/hooks/{hook_id} documentation_url: https://docs.github.com/rest/orgs/webhooks#delete-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/hooks/{hook_id} documentation_url: https://docs.github.com/rest/orgs/webhooks#get-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/hooks/{hook_id} documentation_url: https://docs.github.com/rest/orgs/webhooks#update-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/hooks/{hook_id}/config documentation_url: https://docs.github.com/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/hooks/{hook_id}/config documentation_url: https://docs.github.com/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/hooks/{hook_id}/deliveries documentation_url: https://docs.github.com/rest/orgs/webhooks#list-deliveries-for-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id} documentation_url: https://docs.github.com/rest/orgs/webhooks#get-a-webhook-delivery-for-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts documentation_url: https://docs.github.com/rest/orgs/webhooks#redeliver-a-delivery-for-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/hooks/{hook_id}/pings documentation_url: https://docs.github.com/rest/orgs/webhooks#ping-an-organization-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id} documentation_url: https://docs.github.com/rest/orgs/api-insights#get-route-stats-by-actor openapi_files: @@ -2556,13 +2798,13 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/installations documentation_url: https://docs.github.com/rest/orgs/orgs#list-app-installations-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/interaction-limits documentation_url: https://docs.github.com/rest/interactions/orgs#remove-interaction-restrictions-for-an-organization openapi_files: @@ -2623,25 +2865,25 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/members documentation_url: https://docs.github.com/rest/orgs/members#list-organization-members openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/members/{username} documentation_url: https://docs.github.com/rest/orgs/members#remove-an-organization-member openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/members/{username} documentation_url: https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/members/{username}/codespaces documentation_url: https://docs.github.com/rest/codespaces/organizations#list-codespaces-for-a-user-in-organization openapi_files: @@ -2667,318 +2909,315 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/memberships/{username} documentation_url: https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/memberships/{username} documentation_url: https://docs.github.com/rest/orgs/members#set-organization-membership-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/migrations documentation_url: https://docs.github.com/rest/migrations/orgs#list-organization-migrations openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/migrations documentation_url: https://docs.github.com/rest/migrations/orgs#start-an-organization-migration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/migrations/{migration_id} documentation_url: https://docs.github.com/rest/migrations/orgs#get-an-organization-migration-status openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/migrations/{migration_id}/archive documentation_url: https://docs.github.com/rest/migrations/orgs#delete-an-organization-migration-archive openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/migrations/{migration_id}/archive documentation_url: https://docs.github.com/rest/migrations/orgs#download-an-organization-migration-archive openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock documentation_url: https://docs.github.com/rest/migrations/orgs#unlock-an-organization-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/migrations/{migration_id}/repositories documentation_url: https://docs.github.com/rest/migrations/orgs#list-repositories-in-an-organization-migration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/organization-fine-grained-permissions documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/organization-roles documentation_url: https://docs.github.com/rest/orgs/organization-roles#get-all-organization-roles-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/organization-roles documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#create-a-custom-organization-role openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/organization-roles/teams/{team_slug} documentation_url: https://docs.github.com/rest/orgs/organization-roles#remove-all-organization-roles-for-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id} documentation_url: https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id} documentation_url: https://docs.github.com/rest/orgs/organization-roles#assign-an-organization-role-to-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/organization-roles/users/{username} documentation_url: https://docs.github.com/rest/orgs/organization-roles#remove-all-organization-roles-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/organization-roles/users/{username}/{role_id} documentation_url: https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/organization-roles/users/{username}/{role_id} documentation_url: https://docs.github.com/rest/orgs/organization-roles#assign-an-organization-role-to-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/organization-roles/{role_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#delete-a-custom-organization-role openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/organization-roles/{role_id} documentation_url: https://docs.github.com/rest/orgs/organization-roles#get-an-organization-role openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/organization-roles/{role_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles#update-a-custom-organization-role openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/organization-roles/{role_id}/teams documentation_url: https://docs.github.com/rest/orgs/organization-roles#list-teams-that-are-assigned-to-an-organization-role openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/organization-roles/{role_id}/users documentation_url: https://docs.github.com/rest/orgs/organization-roles#list-users-that-are-assigned-to-an-organization-role openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/outside_collaborators documentation_url: https://docs.github.com/rest/orgs/outside-collaborators#list-outside-collaborators-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/outside_collaborators/{username} documentation_url: https://docs.github.com/rest/orgs/outside-collaborators#remove-outside-collaborator-from-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/outside_collaborators/{username} documentation_url: https://docs.github.com/rest/orgs/outside-collaborators#convert-an-organization-member-to-outside-collaborator openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/packages documentation_url: https://docs.github.com/rest/packages/packages#list-packages-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/packages/{package_type}/{package_name} documentation_url: https://docs.github.com/rest/packages/packages#delete-a-package-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/packages/{package_type}/{package_name} documentation_url: https://docs.github.com/rest/packages/packages#get-a-package-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/packages/{package_type}/{package_name}/restore documentation_url: https://docs.github.com/rest/packages/packages#restore-a-package-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/packages/{package_type}/{package_name}/versions documentation_url: https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id} documentation_url: https://docs.github.com/rest/packages/packages#delete-package-version-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id} documentation_url: https://docs.github.com/rest/packages/packages#get-a-package-version-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore documentation_url: https://docs.github.com/rest/packages/packages#restore-package-version-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/personal-access-token-requests documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/personal-access-token-requests documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#review-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/personal-access-token-requests/{pat_request_id} documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#review-a-request-to-access-organization-resources-with-a-fine-grained-personal-access-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#list-repositories-requested-to-be-accessed-by-a-fine-grained-personal-access-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/personal-access-tokens documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#list-fine-grained-personal-access-tokens-with-access-to-organization-resources openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/personal-access-tokens documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#update-the-access-to-organization-resources-via-fine-grained-personal-access-tokens openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/personal-access-tokens/{pat_id} documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#update-the-access-a-fine-grained-personal-access-token-has-to-organization-resources openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories documentation_url: https://docs.github.com/rest/orgs/personal-access-tokens#list-repositories-a-fine-grained-personal-access-token-has-access-to openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/pre-receive-hooks - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/org-pre-receive-hooks#list-pre-receive-hooks-for-an-organization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/org-pre-receive-hooks#list-pre-receive-hooks-for-an-organization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/org-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-an-organization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/org-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-an-organization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/org-pre-receive-hooks#get-a-pre-receive-hook-for-an-organization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/org-pre-receive-hooks#get-a-pre-receive-hook-for-an-organization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/org-pre-receive-hooks#update-pre-receive-hook-enforcement-for-an-organization + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/org-pre-receive-hooks#update-pre-receive-hook-enforcement-for-an-organization openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/private-registries documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#list-private-registries-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/private-registries documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#create-a-private-registry-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/private-registries/public-key documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#get-private-registries-public-key-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/private-registries/{secret_name} documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#delete-a-private-registry-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/private-registries/{secret_name} documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#get-a-private-registry-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/private-registries/{secret_name} documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#update-a-private-registry-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/projects - documentation_url: https://docs.github.com/rest/projects-classic/projects#list-organization-projects + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#list-organization-projects openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: POST /orgs/{org}/projects - documentation_url: https://docs.github.com/rest/projects-classic/projects#create-an-organization-project + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#create-an-organization-project openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: GET /orgs/{org}/projectsV2 documentation_url: https://docs.github.com/rest/projects/projects#list-projects-for-organization openapi_files: @@ -3029,126 +3268,126 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/properties/schema documentation_url: https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/properties/schema/{custom_property_name} documentation_url: https://docs.github.com/rest/orgs/custom-properties#remove-a-custom-property-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/properties/schema/{custom_property_name} documentation_url: https://docs.github.com/rest/orgs/custom-properties#get-a-custom-property-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/properties/schema/{custom_property_name} documentation_url: https://docs.github.com/rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/properties/values documentation_url: https://docs.github.com/rest/orgs/custom-properties#list-custom-property-values-for-organization-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/properties/values documentation_url: https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-property-values-for-organization-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/public_members documentation_url: https://docs.github.com/rest/orgs/members#list-public-organization-members openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/public_members/{username} documentation_url: https://docs.github.com/rest/orgs/members#remove-public-organization-membership-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/public_members/{username} documentation_url: https://docs.github.com/rest/orgs/members#check-public-organization-membership-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/public_members/{username} documentation_url: https://docs.github.com/rest/orgs/members#set-public-organization-membership-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/repos documentation_url: https://docs.github.com/rest/repos/repos#list-organization-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/repos documentation_url: https://docs.github.com/rest/repos/repos#create-an-organization-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/repository-fine-grained-permissions documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-repository-fine-grained-permissions-for-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/rulesets documentation_url: https://docs.github.com/rest/orgs/rules#get-all-organization-repository-rulesets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/rulesets documentation_url: https://docs.github.com/rest/orgs/rules#create-an-organization-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/rulesets/rule-suites documentation_url: https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id} documentation_url: https://docs.github.com/rest/orgs/rule-suites#get-an-organization-rule-suite openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/rulesets/{ruleset_id} documentation_url: https://docs.github.com/rest/orgs/rules#delete-an-organization-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/rulesets/{ruleset_id} documentation_url: https://docs.github.com/rest/orgs/rules#get-an-organization-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/rulesets/{ruleset_id} documentation_url: https://docs.github.com/rest/orgs/rules#update-an-organization-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/rulesets/{ruleset_id}/history documentation_url: https://docs.github.com/rest/orgs/rules#get-organization-ruleset-history openapi_files: @@ -3164,7 +3403,7 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/secret-scanning/pattern-configurations documentation_url: https://docs.github.com/rest/secret-scanning/push-protection#list-organization-pattern-configurations openapi_files: @@ -3185,19 +3424,19 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/security-managers/teams/{team_slug} documentation_url: https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/security-managers/teams/{team_slug} documentation_url: https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/settings/billing/actions documentation_url: https://docs.github.com/rest/billing/billing#get-github-actions-billing-for-an-organization openapi_files: @@ -3207,7 +3446,7 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/billing/billing#get-github-advanced-security-active-committers-for-an-organization openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/settings/billing/packages documentation_url: https://docs.github.com/rest/billing/billing#get-github-packages-billing-for-an-organization openapi_files: @@ -3292,142 +3531,142 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/teams documentation_url: https://docs.github.com/rest/teams/teams#create-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug} documentation_url: https://docs.github.com/rest/teams/teams#delete-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug} documentation_url: https://docs.github.com/rest/teams/teams#get-a-team-by-name openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/teams/{team_slug} documentation_url: https://docs.github.com/rest/teams/teams#update-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/discussions documentation_url: https://docs.github.com/rest/teams/discussions#list-discussions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/teams/{team_slug}/discussions documentation_url: https://docs.github.com/rest/teams/discussions#create-a-discussion openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} documentation_url: https://docs.github.com/rest/teams/discussions#delete-a-discussion openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} documentation_url: https://docs.github.com/rest/teams/discussions#get-a-discussion openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number} documentation_url: https://docs.github.com/rest/teams/discussions#update-a-discussion openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments documentation_url: https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments documentation_url: https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number} documentation_url: https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number} documentation_url: https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number} documentation_url: https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id} documentation_url: https://docs.github.com/rest/reactions/reactions#delete-team-discussion-comment-reaction openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id} documentation_url: https://docs.github.com/rest/reactions/reactions#delete-team-discussion-reaction openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/external-groups documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#remove-the-connection-between-an-external-group-and-a-team openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/external-groups documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#list-a-connection-between-an-external-group-and-a-team openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /orgs/{org}/teams/{team_slug}/external-groups documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/teams/external-groups#update-the-connection-between-an-external-group-and-a-team openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/invitations documentation_url: https://docs.github.com/rest/teams/members#list-pending-team-invitations openapi_files: @@ -3438,73 +3677,73 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/memberships/{username} documentation_url: https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/memberships/{username} documentation_url: https://docs.github.com/rest/teams/members#get-team-membership-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/teams/{team_slug}/memberships/{username} documentation_url: https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/projects documentation_url: https://docs.github.com/rest/teams/teams#list-team-projects openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id} documentation_url: https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/projects/{project_id} documentation_url: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/teams/{team_slug}/projects/{project_id} documentation_url: https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/repos documentation_url: https://docs.github.com/rest/teams/teams#list-team-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#list-idp-groups-for-a-team openapi_files: @@ -3518,13 +3757,13 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /orgs/{org}/{security_product}/{enablement} documentation_url: https://docs.github.com/rest/orgs/orgs#enable-or-disable-a-security-feature-for-an-organization openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /projects/columns/cards/{card_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/projects-classic/cards#delete-a-project-card openapi_files: @@ -3550,19 +3789,19 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /projects/columns/{column_id} documentation_url: https://docs.github.com/rest/projects-classic/columns#get-a-project-column openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /projects/columns/{column_id} documentation_url: https://docs.github.com/rest/projects-classic/columns#update-an-existing-project-column openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /projects/columns/{column_id}/cards documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/projects-classic/cards#list-project-cards openapi_files: @@ -3578,67 +3817,57 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /projects/{project_id} - documentation_url: https://docs.github.com/rest/projects-classic/projects#delete-a-project + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#delete-a-project openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: GET /projects/{project_id} - documentation_url: https://docs.github.com/rest/projects-classic/projects#get-a-project + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#get-a-project openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: PATCH /projects/{project_id} - documentation_url: https://docs.github.com/rest/projects-classic/projects#update-a-project + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#update-a-project openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: GET /projects/{project_id}/collaborators documentation_url: https://docs.github.com/rest/projects-classic/collaborators#list-project-collaborators openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /projects/{project_id}/collaborators/{username} documentation_url: https://docs.github.com/rest/projects-classic/collaborators#remove-user-as-a-collaborator openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /projects/{project_id}/collaborators/{username} documentation_url: https://docs.github.com/rest/projects-classic/collaborators#add-project-collaborator openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /projects/{project_id}/collaborators/{username}/permission documentation_url: https://docs.github.com/rest/projects-classic/collaborators#get-project-permission-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /projects/{project_id}/columns - documentation_url: https://docs.github.com/rest/projects-classic/columns#list-project-columns + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/columns#list-project-columns openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: POST /projects/{project_id}/columns - documentation_url: https://docs.github.com/rest/projects-classic/columns#create-a-project-column + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/columns#create-a-project-column openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: GET /rate_limit documentation_url: https://docs.github.com/rest/rate-limit/rate-limit#get-rate-limit-status-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /reactions/{reaction_id} documentation_url: https://docs.github.com/enterprise-server@3.4/rest/reference/reactions/#delete-a-reaction-legacy openapi_files: @@ -3648,141 +3877,141 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/repos/repos#get-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/repos/repos#update-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/artifacts documentation_url: https://docs.github.com/rest/actions/artifacts#list-artifacts-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id} documentation_url: https://docs.github.com/rest/actions/artifacts#delete-an-artifact openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id} documentation_url: https://docs.github.com/rest/actions/artifacts#get-an-artifact openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format} documentation_url: https://docs.github.com/rest/actions/artifacts#download-an-artifact openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/cache/usage documentation_url: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/cache/usage-policy - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/actions/cache#get-github-actions-cache-usage-policy-for-a-repository + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/actions/cache#get-github-actions-cache-usage-policy-for-a-repository openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/actions/cache/usage-policy - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/actions/cache#set-github-actions-cache-usage-policy-for-a-repository + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/actions/cache#set-github-actions-cache-usage-policy-for-a-repository openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/caches documentation_url: https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/caches documentation_url: https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/caches/{cache_id} documentation_url: https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/jobs/{job_id} documentation_url: https://docs.github.com/rest/actions/workflow-jobs#get-a-job-for-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs documentation_url: https://docs.github.com/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun documentation_url: https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/oidc/customization/sub documentation_url: https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/oidc/customization/sub documentation_url: https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/organization-secrets documentation_url: https://docs.github.com/rest/actions/secrets#list-repository-organization-secrets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/organization-variables documentation_url: https://docs.github.com/rest/actions/variables#list-repository-organization-variables openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/permissions documentation_url: https://docs.github.com/rest/actions/permissions#get-github-actions-permissions-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/permissions documentation_url: https://docs.github.com/rest/actions/permissions#set-github-actions-permissions-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/permissions/access documentation_url: https://docs.github.com/rest/actions/permissions#get-the-level-of-access-for-workflows-outside-of-the-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/permissions/access documentation_url: https://docs.github.com/rest/actions/permissions#set-the-level-of-access-for-workflows-outside-of-the-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention documentation_url: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-a-repository openapi_files: @@ -3818,121 +4047,121 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/permissions/selected-actions documentation_url: https://docs.github.com/rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/permissions/workflow documentation_url: https://docs.github.com/rest/actions/permissions#get-default-workflow-permissions-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/permissions/workflow documentation_url: https://docs.github.com/rest/actions/permissions#set-default-workflow-permissions-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runners documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#list-self-hosted-runners-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runners/downloads documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#list-runner-applications-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runners/registration-token documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#create-a-registration-token-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runners/remove-token documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#create-a-remove-token-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/runners/{runner_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runners/{runner_id} documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name} documentation_url: https://docs.github.com/rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs documentation_url: https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/runs/{run_id} documentation_url: https://docs.github.com/rest/actions/workflow-runs#delete-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id} documentation_url: https://docs.github.com/rest/actions/workflow-runs#get-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals documentation_url: https://docs.github.com/rest/actions/workflow-runs#get-the-review-history-for-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve documentation_url: https://docs.github.com/rest/actions/workflow-runs#approve-a-workflow-run-for-a-fork-pull-request openapi_files: @@ -3943,85 +4172,85 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number} documentation_url: https://docs.github.com/rest/actions/workflow-runs#get-a-workflow-run-attempt openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs documentation_url: https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs documentation_url: https://docs.github.com/rest/actions/workflow-runs#download-workflow-run-attempt-logs openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel documentation_url: https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule documentation_url: https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel documentation_url: https://docs.github.com/rest/actions/workflow-runs#force-cancel-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs documentation_url: https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs documentation_url: https://docs.github.com/rest/actions/workflow-runs#delete-workflow-run-logs openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs documentation_url: https://docs.github.com/rest/actions/workflow-runs#download-workflow-run-logs openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments documentation_url: https://docs.github.com/rest/actions/workflow-runs#get-pending-deployments-for-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments documentation_url: https://docs.github.com/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun documentation_url: https://docs.github.com/rest/actions/workflow-runs#re-run-a-workflow openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs documentation_url: https://docs.github.com/rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing documentation_url: https://docs.github.com/rest/actions/workflow-runs#get-workflow-run-usage openapi_files: @@ -4032,97 +4261,97 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/secrets/public-key documentation_url: https://docs.github.com/rest/actions/secrets#get-a-repository-public-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#delete-a-repository-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#get-a-repository-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#create-or-update-a-repository-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/variables documentation_url: https://docs.github.com/rest/actions/variables#list-repository-variables openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/variables documentation_url: https://docs.github.com/rest/actions/variables#create-a-repository-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/actions/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#delete-a-repository-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#get-a-repository-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/actions/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#update-a-repository-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/workflows documentation_url: https://docs.github.com/rest/actions/workflows#list-repository-workflows openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/workflows/{workflow_id} documentation_url: https://docs.github.com/rest/actions/workflows#get-a-workflow openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable documentation_url: https://docs.github.com/rest/actions/workflows#disable-a-workflow openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches documentation_url: https://docs.github.com/rest/actions/workflows#create-a-workflow-dispatch-event openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable documentation_url: https://docs.github.com/rest/actions/workflows#enable-a-workflow openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs documentation_url: https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-workflow openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing documentation_url: https://docs.github.com/rest/actions/workflows#get-workflow-usage openapi_files: @@ -4133,19 +4362,19 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/assignees documentation_url: https://docs.github.com/rest/issues/assignees#list-assignees openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/assignees/{assignee} documentation_url: https://docs.github.com/rest/issues/assignees#check-if-a-user-can-be-assigned openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/attestations documentation_url: https://docs.github.com/rest/repos/repos#create-an-attestation openapi_files: @@ -4161,25 +4390,25 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/autolinks documentation_url: https://docs.github.com/rest/repos/autolinks#create-an-autolink-reference-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/autolinks/{autolink_id} documentation_url: https://docs.github.com/rest/repos/autolinks#delete-an-autolink-reference-from-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/autolinks/{autolink_id} documentation_url: https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/automated-security-fixes documentation_url: https://docs.github.com/rest/repos/repos#disable-dependabot-security-updates openapi_files: @@ -4190,7 +4419,7 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/automated-security-fixes documentation_url: https://docs.github.com/rest/repos/repos#enable-dependabot-security-updates openapi_files: @@ -4201,325 +4430,325 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch} documentation_url: https://docs.github.com/rest/branches/branches#get-a-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection documentation_url: https://docs.github.com/rest/branches/branch-protection#delete-branch-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection documentation_url: https://docs.github.com/rest/branches/branch-protection#get-branch-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/branches/{branch}/protection documentation_url: https://docs.github.com/rest/branches/branch-protection#update-branch-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins documentation_url: https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins documentation_url: https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins documentation_url: https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews documentation_url: https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews documentation_url: https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews documentation_url: https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures documentation_url: https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures documentation_url: https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures documentation_url: https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks documentation_url: https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks documentation_url: https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks documentation_url: https://docs.github.com/rest/branches/branch-protection#update-status-check-protection openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts documentation_url: https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts documentation_url: https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts documentation_url: https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts documentation_url: https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions documentation_url: https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions documentation_url: https://docs.github.com/rest/branches/branch-protection#get-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps documentation_url: https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps documentation_url: https://docs.github.com/rest/branches/branch-protection#get-apps-with-access-to-the-protected-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps documentation_url: https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps documentation_url: https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams documentation_url: https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams documentation_url: https://docs.github.com/rest/branches/branch-protection#get-teams-with-access-to-the-protected-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams documentation_url: https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams documentation_url: https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users documentation_url: https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users documentation_url: https://docs.github.com/rest/branches/branch-protection#get-users-with-access-to-the-protected-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users documentation_url: https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users documentation_url: https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/branches/{branch}/rename documentation_url: https://docs.github.com/rest/branches/branches#rename-a-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/bypass-requests/push-rules documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/repos/bypass-requests#list-repository-push-rule-bypass-requests openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/bypass-requests/push-rules/{bypass_request_number} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/repos/bypass-requests#get-a-repository-push-bypass-request openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/bypass-requests/secret-scanning documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/delegated-bypass#list-bypass-requests-for-secret-scanning-for-a-repository openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/bypass-requests/secret-scanning/{bypass_request_number} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/delegated-bypass#get-a-bypass-request-for-secret-scanning openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/bypass-requests/secret-scanning/{bypass_request_number} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/delegated-bypass#review-a-bypass-request-for-secret-scanning openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/bypass-responses/secret-scanning/{bypass_response_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/delegated-bypass#dismiss-a-response-on-a-bypass-request-for-secret-scanning openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/check-runs documentation_url: https://docs.github.com/rest/checks/runs#create-a-check-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/check-runs/{check_run_id} documentation_url: https://docs.github.com/rest/checks/runs#get-a-check-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/check-runs/{check_run_id} documentation_url: https://docs.github.com/rest/checks/runs#update-a-check-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations documentation_url: https://docs.github.com/rest/checks/runs#list-check-run-annotations openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest documentation_url: https://docs.github.com/rest/checks/runs#rerequest-a-check-run openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/check-suites documentation_url: https://docs.github.com/rest/checks/suites#create-a-check-suite openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/check-suites/preferences documentation_url: https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/check-suites/{check_suite_id} documentation_url: https://docs.github.com/rest/checks/suites#get-a-check-suite openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs documentation_url: https://docs.github.com/rest/checks/runs#list-check-runs-in-a-check-suite openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest documentation_url: https://docs.github.com/rest/checks/suites#rerequest-a-check-suite openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-scanning/alerts documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number} documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-alert openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number} documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#update-a-code-scanning-alert openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#get-the-status-of-an-autofix-for-a-code-scanning-alert openapi_files: @@ -4540,25 +4769,25 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-scanning/analyses documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id} documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#delete-a-code-scanning-analysis-from-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id} documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-scanning/codeql/databases documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#list-codeql-databases-for-a-repository openapi_files: @@ -4594,37 +4823,37 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/code-scanning/default-setup documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/code-scanning/sarifs documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#upload-an-analysis-as-sarif-data openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id} documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/code-security-configuration documentation_url: https://docs.github.com/rest/code-security/configurations#get-the-code-security-configuration-associated-with-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/codeowners/errors documentation_url: https://docs.github.com/rest/repos/repos#list-codeowners-errors openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/codespaces documentation_url: https://docs.github.com/rest/codespaces/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user openapi_files: @@ -4685,133 +4914,133 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/collaborators/{username} documentation_url: https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/collaborators/{username} documentation_url: https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/collaborators/{username} documentation_url: https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/collaborators/{username}/permission documentation_url: https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/comments documentation_url: https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/comments/{comment_id} documentation_url: https://docs.github.com/rest/commits/comments#delete-a-commit-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/comments/{comment_id} documentation_url: https://docs.github.com/rest/commits/comments#get-a-commit-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/comments/{comment_id} documentation_url: https://docs.github.com/rest/commits/comments#update-a-commit-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/comments/{comment_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-commit-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/comments/{comment_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-commit-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id} documentation_url: https://docs.github.com/rest/reactions/reactions#delete-a-commit-comment-reaction openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits documentation_url: https://docs.github.com/rest/commits/commits#list-commits openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head documentation_url: https://docs.github.com/rest/commits/commits#list-branches-for-head-commit openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{commit_sha}/comments documentation_url: https://docs.github.com/rest/commits/comments#list-commit-comments openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/commits/{commit_sha}/comments documentation_url: https://docs.github.com/rest/commits/comments#create-a-commit-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls documentation_url: https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{ref} documentation_url: https://docs.github.com/rest/commits/commits#get-a-commit openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{ref}/check-runs documentation_url: https://docs.github.com/rest/checks/runs#list-check-runs-for-a-git-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{ref}/check-suites documentation_url: https://docs.github.com/rest/checks/suites#list-check-suites-for-a-git-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{ref}/status documentation_url: https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/commits/{ref}/statuses documentation_url: https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/community/profile documentation_url: https://docs.github.com/rest/metrics/community#get-community-profile-metrics openapi_files: @@ -4822,7 +5051,7 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments documentation_url: https://docs.github.com/enterprise-server@3.3/rest/reference/apps#create-a-content-attachment openapi_files: @@ -4832,133 +5061,133 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/contents/{path} documentation_url: https://docs.github.com/rest/repos/contents#get-repository-content openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/contents/{path} documentation_url: https://docs.github.com/rest/repos/contents#create-or-update-file-contents openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/contributors documentation_url: https://docs.github.com/rest/repos/repos#list-repository-contributors openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dependabot/alerts documentation_url: https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number} documentation_url: https://docs.github.com/rest/dependabot/alerts#get-a-dependabot-alert openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number} documentation_url: https://docs.github.com/rest/dependabot/alerts#update-a-dependabot-alert openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dependabot/secrets documentation_url: https://docs.github.com/rest/dependabot/secrets#list-repository-secrets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dependabot/secrets/public-key documentation_url: https://docs.github.com/rest/dependabot/secrets#get-a-repository-public-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name} documentation_url: https://docs.github.com/rest/dependabot/secrets#delete-a-repository-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name} documentation_url: https://docs.github.com/rest/dependabot/secrets#get-a-repository-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name} documentation_url: https://docs.github.com/rest/dependabot/secrets#create-or-update-a-repository-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead} documentation_url: https://docs.github.com/rest/dependency-graph/dependency-review#get-a-diff-of-the-dependencies-between-commits openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dependency-graph/sbom documentation_url: https://docs.github.com/rest/dependency-graph/sboms#export-a-software-bill-of-materials-sbom-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/dependency-graph/snapshots documentation_url: https://docs.github.com/rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/deployments documentation_url: https://docs.github.com/rest/deployments/deployments#list-deployments openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/deployments documentation_url: https://docs.github.com/rest/deployments/deployments#create-a-deployment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/deployments/{deployment_id} documentation_url: https://docs.github.com/rest/deployments/deployments#delete-a-deployment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/deployments/{deployment_id} documentation_url: https://docs.github.com/rest/deployments/deployments#get-a-deployment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses documentation_url: https://docs.github.com/rest/deployments/statuses#list-deployment-statuses openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses documentation_url: https://docs.github.com/rest/deployments/statuses#create-a-deployment-status openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id} documentation_url: https://docs.github.com/rest/deployments/statuses#get-a-deployment-status openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dismissal-requests/code-scanning documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/alert-dismissal-requests#list-dismissal-requests-for-code-scanning-alerts-for-a-repository openapi_files: @@ -4975,332 +5204,335 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/alert-dismissal-requests#list-alert-dismissal-requests-for-secret-scanning-for-a-repository openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/dismissal-requests/secret-scanning/{alert_number} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/alert-dismissal-requests#get-an-alert-dismissal-request-for-secret-scanning openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/dismissal-requests/secret-scanning/{alert_number} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/secret-scanning/alert-dismissal-requests#review-an-alert-dismissal-request-for-secret-scanning openapi_files: - descriptions/ghec/ghec.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/dispatches documentation_url: https://docs.github.com/rest/repos/repos#create-a-repository-dispatch-event openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments documentation_url: https://docs.github.com/rest/deployments/environments#list-environments openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/environments/{environment_name} documentation_url: https://docs.github.com/rest/deployments/environments#delete-an-environment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name} documentation_url: https://docs.github.com/rest/deployments/environments#get-an-environment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/environments/{environment_name} documentation_url: https://docs.github.com/rest/deployments/environments#create-or-update-an-environment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies documentation_url: https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies documentation_url: https://docs.github.com/rest/deployments/branch-policies#create-a-deployment-branch-policy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id} documentation_url: https://docs.github.com/rest/deployments/branch-policies#delete-a-deployment-branch-policy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id} documentation_url: https://docs.github.com/rest/deployments/branch-policies#get-a-deployment-branch-policy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id} documentation_url: https://docs.github.com/rest/deployments/branch-policies#update-a-deployment-branch-policy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules documentation_url: https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules-for-an-environment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules documentation_url: https://docs.github.com/rest/deployments/protection-rules#create-a-custom-deployment-protection-rule-on-an-environment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps documentation_url: https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations-available-for-an-environment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id} documentation_url: https://docs.github.com/rest/deployments/protection-rules#disable-a-custom-protection-rule-for-an-environment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id} documentation_url: https://docs.github.com/rest/deployments/protection-rules#get-a-custom-deployment-protection-rule openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/secrets documentation_url: https://docs.github.com/rest/actions/secrets#list-environment-secrets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key documentation_url: https://docs.github.com/rest/actions/secrets#get-an-environment-public-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#delete-an-environment-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#get-an-environment-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name} documentation_url: https://docs.github.com/rest/actions/secrets#create-or-update-an-environment-secret openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/variables documentation_url: https://docs.github.com/rest/actions/variables#list-environment-variables openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/environments/{environment_name}/variables documentation_url: https://docs.github.com/rest/actions/variables#create-an-environment-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#delete-an-environment-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#get-an-environment-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name} documentation_url: https://docs.github.com/rest/actions/variables#update-an-environment-variable openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/events documentation_url: https://docs.github.com/rest/activity/events#list-repository-events openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/forks documentation_url: https://docs.github.com/rest/repos/forks#list-forks openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/forks documentation_url: https://docs.github.com/rest/repos/forks#create-a-fork openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/git/blobs documentation_url: https://docs.github.com/rest/git/blobs#create-a-blob openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/git/blobs/{file_sha} documentation_url: https://docs.github.com/rest/git/blobs#get-a-blob openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/git/commits documentation_url: https://docs.github.com/rest/git/commits#create-a-commit openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/git/commits/{commit_sha} documentation_url: https://docs.github.com/rest/git/commits#get-a-commit-object openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/git/matching-refs/{ref} documentation_url: https://docs.github.com/rest/git/refs#list-matching-references openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/git/ref/{ref} documentation_url: https://docs.github.com/rest/git/refs#get-a-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/git/refs documentation_url: https://docs.github.com/rest/git/refs#create-a-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/git/refs/{ref} documentation_url: https://docs.github.com/rest/git/refs#delete-a-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/git/refs/{ref} documentation_url: https://docs.github.com/rest/git/refs#update-a-reference openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/git/tags documentation_url: https://docs.github.com/rest/git/tags#create-a-tag-object openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/git/tags/{tag_sha} documentation_url: https://docs.github.com/rest/git/tags#get-a-tag openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/git/trees documentation_url: https://docs.github.com/rest/git/trees#create-a-tree openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/git/trees/{tree_sha} documentation_url: https://docs.github.com/rest/git/trees#get-a-tree openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/hooks documentation_url: https://docs.github.com/rest/repos/webhooks#list-repository-webhooks openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/hooks documentation_url: https://docs.github.com/rest/repos/webhooks#create-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/hooks/{hook_id} documentation_url: https://docs.github.com/rest/repos/webhooks#delete-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/hooks/{hook_id} documentation_url: https://docs.github.com/rest/repos/webhooks#get-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/hooks/{hook_id} documentation_url: https://docs.github.com/rest/repos/webhooks#update-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/hooks/{hook_id}/config documentation_url: https://docs.github.com/rest/repos/webhooks#get-a-webhook-configuration-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config documentation_url: https://docs.github.com/rest/repos/webhooks#update-a-webhook-configuration-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries documentation_url: https://docs.github.com/rest/repos/webhooks#list-deliveries-for-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id} documentation_url: https://docs.github.com/rest/repos/webhooks#get-a-delivery-for-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts documentation_url: https://docs.github.com/rest/repos/webhooks#redeliver-a-delivery-for-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/hooks/{hook_id}/pings documentation_url: https://docs.github.com/rest/repos/webhooks#ping-a-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/hooks/{hook_id}/tests documentation_url: https://docs.github.com/rest/repos/webhooks#test-the-push-repository-webhook openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/immutable-releases documentation_url: https://docs.github.com/rest/repos/repos#disable-immutable-releases openapi_files: @@ -5361,7 +5593,7 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/interaction-limits documentation_url: https://docs.github.com/rest/interactions/repos#remove-interaction-restrictions-for-a-repository openapi_files: @@ -5382,127 +5614,127 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/invitations/{invitation_id} documentation_url: https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/invitations/{invitation_id} documentation_url: https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues documentation_url: https://docs.github.com/rest/issues/issues#list-repository-issues openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/issues documentation_url: https://docs.github.com/rest/issues/issues#create-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/comments documentation_url: https://docs.github.com/rest/issues/comments#list-issue-comments-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/comments/{comment_id} documentation_url: https://docs.github.com/rest/issues/comments#delete-an-issue-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/comments/{comment_id} documentation_url: https://docs.github.com/rest/issues/comments#get-an-issue-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/issues/comments/{comment_id} documentation_url: https://docs.github.com/rest/issues/comments#update-an-issue-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-an-issue-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-an-issue-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id} documentation_url: https://docs.github.com/rest/reactions/reactions#delete-an-issue-comment-reaction openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/events documentation_url: https://docs.github.com/rest/issues/events#list-issue-events-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/events/{event_id} documentation_url: https://docs.github.com/rest/issues/events#get-an-issue-event openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/{issue_number} documentation_url: https://docs.github.com/rest/issues/issues#get-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/issues/{issue_number} documentation_url: https://docs.github.com/rest/issues/issues#update-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees documentation_url: https://docs.github.com/rest/issues/assignees#remove-assignees-from-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/issues/{issue_number}/assignees documentation_url: https://docs.github.com/rest/issues/assignees#add-assignees-to-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee} documentation_url: https://docs.github.com/rest/issues/assignees#check-if-a-user-can-be-assigned-to-a-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/{issue_number}/comments documentation_url: https://docs.github.com/rest/issues/comments#list-issue-comments openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/issues/{issue_number}/comments documentation_url: https://docs.github.com/rest/issues/comments#create-an-issue-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by documentation_url: https://docs.github.com/rest/issues/issue-dependencies#list-dependencies-an-issue-is-blocked-by openapi_files: @@ -5528,49 +5760,49 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels documentation_url: https://docs.github.com/rest/issues/labels#remove-all-labels-from-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/{issue_number}/labels documentation_url: https://docs.github.com/rest/issues/labels#list-labels-for-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/issues/{issue_number}/labels documentation_url: https://docs.github.com/rest/issues/labels#add-labels-to-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/issues/{issue_number}/labels documentation_url: https://docs.github.com/rest/issues/labels#set-labels-for-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name} documentation_url: https://docs.github.com/rest/issues/labels#remove-a-label-from-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock documentation_url: https://docs.github.com/rest/issues/issues#unlock-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/issues/{issue_number}/lock documentation_url: https://docs.github.com/rest/issues/issues#lock-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/issues/{issue_number}/parent documentation_url: https://docs.github.com/rest/issues/sub-issues#get-parent-issue openapi_files: @@ -5581,19 +5813,19 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/issues/{issue_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-an-issue openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id} documentation_url: https://docs.github.com/rest/reactions/reactions#delete-an-issue-reaction openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue documentation_url: https://docs.github.com/rest/issues/sub-issues#remove-sub-issue openapi_files: @@ -5619,191 +5851,191 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/keys documentation_url: https://docs.github.com/rest/deploy-keys/deploy-keys#list-deploy-keys openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/keys documentation_url: https://docs.github.com/rest/deploy-keys/deploy-keys#create-a-deploy-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/keys/{key_id} documentation_url: https://docs.github.com/rest/deploy-keys/deploy-keys#delete-a-deploy-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/keys/{key_id} documentation_url: https://docs.github.com/rest/deploy-keys/deploy-keys#get-a-deploy-key openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/labels documentation_url: https://docs.github.com/rest/issues/labels#list-labels-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/labels documentation_url: https://docs.github.com/rest/issues/labels#create-a-label openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/labels/{name} documentation_url: https://docs.github.com/rest/issues/labels#delete-a-label openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/labels/{name} documentation_url: https://docs.github.com/rest/issues/labels#get-a-label openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/labels/{name} documentation_url: https://docs.github.com/rest/issues/labels#update-a-label openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/languages documentation_url: https://docs.github.com/rest/repos/repos#list-repository-languages openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/lfs documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/repos/lfs#disable-git-lfs-for-a-repository openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/lfs documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/repos/lfs#enable-git-lfs-for-a-repository openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/license documentation_url: https://docs.github.com/rest/licenses/licenses#get-the-license-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/merge-upstream documentation_url: https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/merges documentation_url: https://docs.github.com/rest/branches/branches#merge-a-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/milestones documentation_url: https://docs.github.com/rest/issues/milestones#list-milestones openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/milestones documentation_url: https://docs.github.com/rest/issues/milestones#create-a-milestone openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/milestones/{milestone_number} documentation_url: https://docs.github.com/rest/issues/milestones#delete-a-milestone openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/milestones/{milestone_number} documentation_url: https://docs.github.com/rest/issues/milestones#get-a-milestone openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/milestones/{milestone_number} documentation_url: https://docs.github.com/rest/issues/milestones#update-a-milestone openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels documentation_url: https://docs.github.com/rest/issues/labels#list-labels-for-issues-in-a-milestone openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/notifications documentation_url: https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/notifications documentation_url: https://docs.github.com/rest/activity/notifications#mark-repository-notifications-as-read openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/pages documentation_url: https://docs.github.com/rest/pages/pages#delete-a-apiname-pages-site openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pages documentation_url: https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pages documentation_url: https://docs.github.com/rest/pages/pages#create-a-apiname-pages-site openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/pages documentation_url: https://docs.github.com/rest/pages/pages#update-information-about-a-apiname-pages-site openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pages/builds documentation_url: https://docs.github.com/rest/pages/pages#list-apiname-pages-builds openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pages/builds documentation_url: https://docs.github.com/rest/pages/pages#request-a-apiname-pages-build openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pages/builds/latest documentation_url: https://docs.github.com/rest/pages/pages#get-latest-pages-build openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pages/builds/{build_id} documentation_url: https://docs.github.com/rest/pages/pages#get-apiname-pages-build openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pages/deployment documentation_url: https://docs.github.com/enterprise-server@3.7/rest/pages/pages#create-a-github-pages-deployment openapi_files: @@ -5813,40 +6045,40 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id} documentation_url: https://docs.github.com/rest/pages/pages#get-the-status-of-a-github-pages-deployment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel documentation_url: https://docs.github.com/rest/pages/pages#cancel-a-github-pages-deployment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pages/health documentation_url: https://docs.github.com/rest/pages/pages#get-a-dns-health-check-for-github-pages openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - name: GET /repos/{owner}/{repo}/pre-receive-hooks - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-a-repository + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-a-repository openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#get-a-pre-receive-hook-for-a-repository + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#get-a-pre-receive-hook-for-a-repository openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/repo-pre-receive-hooks#update-pre-receive-hook-enforcement-for-a-repository + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/repo-pre-receive-hooks#update-pre-receive-hook-enforcement-for-a-repository openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/private-vulnerability-reporting documentation_url: https://docs.github.com/rest/repos/repos#disable-private-vulnerability-reporting-for-a-repository openapi_files: @@ -5863,95 +6095,91 @@ openapi_operations: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - name: GET /repos/{owner}/{repo}/projects - documentation_url: https://docs.github.com/rest/projects-classic/projects#list-repository-projects + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#list-repository-projects openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: POST /repos/{owner}/{repo}/projects - documentation_url: https://docs.github.com/rest/projects-classic/projects#create-a-repository-project + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#create-a-repository-project openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: GET /repos/{owner}/{repo}/properties/values documentation_url: https://docs.github.com/rest/repos/custom-properties#get-all-custom-property-values-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/properties/values documentation_url: https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls documentation_url: https://docs.github.com/rest/pulls/pulls#list-pull-requests openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls documentation_url: https://docs.github.com/rest/pulls/pulls#create-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/comments documentation_url: https://docs.github.com/rest/pulls/comments#list-review-comments-in-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id} documentation_url: https://docs.github.com/rest/pulls/comments#delete-a-review-comment-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/comments/{comment_id} documentation_url: https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id} documentation_url: https://docs.github.com/rest/pulls/comments#update-a-review-comment-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-pull-request-review-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-pull-request-review-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id} documentation_url: https://docs.github.com/rest/reactions/reactions#delete-a-pull-request-comment-reaction openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number} documentation_url: https://docs.github.com/rest/pulls/pulls#get-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/pulls/{pull_number} documentation_url: https://docs.github.com/rest/pulls/pulls#update-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces documentation_url: https://docs.github.com/rest/codespaces/codespaces#create-a-codespace-from-a-pull-request openapi_files: @@ -5962,275 +6190,275 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls/{pull_number}/comments documentation_url: https://docs.github.com/rest/pulls/comments#create-a-review-comment-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies documentation_url: https://docs.github.com/rest/pulls/comments#create-a-reply-for-a-review-comment openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number}/commits documentation_url: https://docs.github.com/rest/pulls/pulls#list-commits-on-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number}/files documentation_url: https://docs.github.com/rest/pulls/pulls#list-pull-requests-files openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number}/merge documentation_url: https://docs.github.com/rest/pulls/pulls#check-if-a-pull-request-has-been-merged openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge documentation_url: https://docs.github.com/rest/pulls/pulls#merge-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers documentation_url: https://docs.github.com/rest/pulls/review-requests#remove-requested-reviewers-from-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers documentation_url: https://docs.github.com/rest/pulls/review-requests#get-all-requested-reviewers-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers documentation_url: https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews documentation_url: https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews documentation_url: https://docs.github.com/rest/pulls/reviews#create-a-review-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id} documentation_url: https://docs.github.com/rest/pulls/reviews#delete-a-pending-review-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id} documentation_url: https://docs.github.com/rest/pulls/reviews#get-a-review-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id} documentation_url: https://docs.github.com/rest/pulls/reviews#update-a-review-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments documentation_url: https://docs.github.com/rest/pulls/reviews#list-comments-for-a-pull-request-review openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals documentation_url: https://docs.github.com/rest/pulls/reviews#dismiss-a-review-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events documentation_url: https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch documentation_url: https://docs.github.com/rest/pulls/pulls#update-a-pull-request-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/readme documentation_url: https://docs.github.com/rest/repos/contents#get-a-repository-readme openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/readme/{dir} documentation_url: https://docs.github.com/rest/repos/contents#get-a-repository-readme-for-a-directory openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/releases documentation_url: https://docs.github.com/rest/releases/releases#list-releases openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/releases documentation_url: https://docs.github.com/rest/releases/releases#create-a-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/releases/assets/{asset_id} documentation_url: https://docs.github.com/rest/releases/assets#delete-a-release-asset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/releases/assets/{asset_id} documentation_url: https://docs.github.com/rest/releases/assets#get-a-release-asset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/releases/assets/{asset_id} documentation_url: https://docs.github.com/rest/releases/assets#update-a-release-asset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/releases/generate-notes documentation_url: https://docs.github.com/rest/releases/releases#generate-release-notes-content-for-a-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/releases/latest documentation_url: https://docs.github.com/rest/releases/releases#get-the-latest-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/releases/tags/{tag} documentation_url: https://docs.github.com/rest/releases/releases#get-a-release-by-tag-name openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/releases/{release_id} documentation_url: https://docs.github.com/rest/releases/releases#delete-a-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/releases/{release_id} documentation_url: https://docs.github.com/rest/releases/releases#get-a-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/releases/{release_id} documentation_url: https://docs.github.com/rest/releases/releases#update-a-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/releases/{release_id}/assets documentation_url: https://docs.github.com/rest/releases/assets#list-release-assets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/releases/{release_id}/assets documentation_url: https://docs.github.com/rest/releases/assets#upload-a-release-asset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/releases/{release_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/releases/{release_id}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-release openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id} documentation_url: https://docs.github.com/rest/reactions/reactions#delete-a-release-reaction openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/replicas/caches - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/repos/repos#list-repository-cache-replication-status + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/repos/repos#list-repository-cache-replication-status openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/rules/branches/{branch} documentation_url: https://docs.github.com/rest/repos/rules#get-rules-for-a-branch openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/rulesets documentation_url: https://docs.github.com/rest/repos/rules#get-all-repository-rulesets openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/rulesets documentation_url: https://docs.github.com/rest/repos/rules#create-a-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/rulesets/rule-suites documentation_url: https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id} documentation_url: https://docs.github.com/rest/repos/rule-suites#get-a-repository-rule-suite openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id} documentation_url: https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/rulesets/{ruleset_id} documentation_url: https://docs.github.com/rest/repos/rules#get-a-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/rulesets/{ruleset_id} documentation_url: https://docs.github.com/rest/repos/rules#update-a-repository-ruleset openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history documentation_url: https://docs.github.com/rest/repos/rules#get-repository-ruleset-history openapi_files: @@ -6246,37 +6474,37 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number} documentation_url: https://docs.github.com/rest/secret-scanning/secret-scanning#get-a-secret-scanning-alert openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number} documentation_url: https://docs.github.com/rest/secret-scanning/secret-scanning#update-a-secret-scanning-alert openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations documentation_url: https://docs.github.com/rest/secret-scanning/secret-scanning#list-locations-for-a-secret-scanning-alert openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses documentation_url: https://docs.github.com/rest/secret-scanning/secret-scanning#create-a-push-protection-bypass openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/secret-scanning/scan-history documentation_url: https://docs.github.com/rest/secret-scanning/secret-scanning#get-secret-scanning-scan-history-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/security-advisories documentation_url: https://docs.github.com/rest/security-advisories/repository-advisories#list-repository-security-advisories openapi_files: @@ -6317,115 +6545,115 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/stats/code_frequency documentation_url: https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/stats/commit_activity documentation_url: https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/stats/contributors documentation_url: https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/stats/participation documentation_url: https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/stats/punch_card documentation_url: https://docs.github.com/rest/metrics/statistics#get-the-hourly-commit-count-for-each-day openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/statuses/{sha} documentation_url: https://docs.github.com/rest/commits/statuses#create-a-commit-status openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/subscribers documentation_url: https://docs.github.com/rest/activity/watching#list-watchers openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/subscription documentation_url: https://docs.github.com/rest/activity/watching#delete-a-repository-subscription openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/subscription documentation_url: https://docs.github.com/rest/activity/watching#get-a-repository-subscription openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/subscription documentation_url: https://docs.github.com/rest/activity/watching#set-a-repository-subscription openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/tags documentation_url: https://docs.github.com/rest/repos/repos#list-repository-tags openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/tags/protection documentation_url: https://docs.github.com/rest/repos/tags#closing-down---list-tag-protection-states-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{owner}/{repo}/tags/protection documentation_url: https://docs.github.com/rest/repos/tags#closing-down---create-a-tag-protection-state-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id} documentation_url: https://docs.github.com/rest/repos/tags#closing-down---delete-a-tag-protection-state-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/tarball/{ref} documentation_url: https://docs.github.com/rest/repos/contents#download-a-repository-archive-tar openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/teams documentation_url: https://docs.github.com/rest/repos/repos#list-repository-teams openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/topics documentation_url: https://docs.github.com/rest/repos/repos#get-all-repository-topics openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/topics documentation_url: https://docs.github.com/rest/repos/repos#replace-all-repository-topics openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/traffic/clones documentation_url: https://docs.github.com/rest/metrics/traffic#get-repository-clones openapi_files: @@ -6451,43 +6679,43 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /repos/{owner}/{repo}/vulnerability-alerts documentation_url: https://docs.github.com/rest/repos/repos#disable-vulnerability-alerts openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/vulnerability-alerts documentation_url: https://docs.github.com/rest/repos/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /repos/{owner}/{repo}/vulnerability-alerts documentation_url: https://docs.github.com/rest/repos/repos#enable-vulnerability-alerts openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repos/{owner}/{repo}/zipball/{ref} documentation_url: https://docs.github.com/rest/repos/contents#download-a-repository-archive-zip openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /repos/{template_owner}/{template_repo}/generate documentation_url: https://docs.github.com/rest/repos/repos#create-a-repository-using-a-template openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repositories documentation_url: https://docs.github.com/rest/repos/repos#list-public-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /repositories/{repository_id}/environments/{environment_name}/secrets documentation_url: https://docs.github.com/enterprise-server@3.7/rest/actions/secrets#list-environment-secrets openapi_files: @@ -6560,62 +6788,62 @@ openapi_operations: documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#list-provisioned-scim-groups-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /scim/v2/enterprises/{enterprise}/Groups documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#provision-a-scim-enterprise-group openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#delete-a-scim-group-from-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#get-scim-provisioning-information-for-an-enterprise-group openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#update-an-attribute-for-a-scim-enterprise-group openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#set-scim-information-for-a-provisioned-enterprise-group openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /scim/v2/enterprises/{enterprise}/Users documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#list-scim-provisioned-identities-for-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /scim/v2/enterprises/{enterprise}/Users documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#provision-a-scim-enterprise-user openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /scim/v2/enterprises/{enterprise}/Users/{scim_user_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#delete-a-scim-user-from-an-enterprise openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /scim/v2/enterprises/{enterprise}/Users/{scim_user_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#get-scim-provisioning-information-for-an-enterprise-user openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /scim/v2/enterprises/{enterprise}/Users/{scim_user_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#update-an-attribute-for-a-scim-enterprise-user openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /scim/v2/enterprises/{enterprise}/Users/{scim_user_id} documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/scim#set-scim-information-for-a-provisioned-enterprise-user openapi_files: - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /scim/v2/organizations/{org}/Users documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/scim/scim#list-scim-provisioned-identities openapi_files: @@ -6645,43 +6873,43 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /search/commits documentation_url: https://docs.github.com/rest/search/search#search-commits openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /search/issues documentation_url: https://docs.github.com/rest/search/search#search-issues-and-pull-requests openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /search/labels documentation_url: https://docs.github.com/rest/search/search#search-labels openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /search/repositories documentation_url: https://docs.github.com/rest/search/search#search-repositories openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /search/topics documentation_url: https://docs.github.com/rest/search/search#search-topics openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /search/users documentation_url: https://docs.github.com/rest/search/search#search-users openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /setup/api/configcheck documentation_url: https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/management-console#get-the-configuration-status openapi_files: @@ -6731,103 +6959,103 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id} documentation_url: https://docs.github.com/rest/teams/teams#get-a-team-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /teams/{team_id} documentation_url: https://docs.github.com/rest/teams/teams#update-a-team-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/discussions documentation_url: https://docs.github.com/rest/teams/discussions#list-discussions-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /teams/{team_id}/discussions documentation_url: https://docs.github.com/rest/teams/discussions#create-a-discussion-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /teams/{team_id}/discussions/{discussion_number} documentation_url: https://docs.github.com/rest/teams/discussions#delete-a-discussion-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/discussions/{discussion_number} documentation_url: https://docs.github.com/rest/teams/discussions#get-a-discussion-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /teams/{team_id}/discussions/{discussion_number} documentation_url: https://docs.github.com/rest/teams/discussions#update-a-discussion-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/discussions/{discussion_number}/comments documentation_url: https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /teams/{team_id}/discussions/{discussion_number}/comments documentation_url: https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number} documentation_url: https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number} documentation_url: https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number} documentation_url: https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/discussions/{discussion_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /teams/{team_id}/discussions/{discussion_number}/reactions documentation_url: https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/invitations documentation_url: https://docs.github.com/rest/teams/members#list-pending-team-invitations-legacy openapi_files: @@ -6838,91 +7066,91 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /teams/{team_id}/members/{username} documentation_url: https://docs.github.com/rest/teams/members#remove-team-member-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/members/{username} documentation_url: https://docs.github.com/rest/teams/members#get-team-member-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /teams/{team_id}/members/{username} documentation_url: https://docs.github.com/rest/teams/members#add-team-member-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /teams/{team_id}/memberships/{username} documentation_url: https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/memberships/{username} documentation_url: https://docs.github.com/rest/teams/members#get-team-membership-for-a-user-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /teams/{team_id}/memberships/{username} documentation_url: https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/projects documentation_url: https://docs.github.com/rest/teams/teams#list-team-projects-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /teams/{team_id}/projects/{project_id} documentation_url: https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/projects/{project_id} documentation_url: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /teams/{team_id}/projects/{project_id} documentation_url: https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/repos documentation_url: https://docs.github.com/rest/teams/teams#list-team-repositories-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /teams/{team_id}/repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /teams/{team_id}/repos/{owner}/{repo} documentation_url: https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions-legacy openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /teams/{team_id}/team-sync/group-mappings documentation_url: https://docs.github.com/enterprise-cloud@latest//rest/teams/team-sync#list-idp-groups-for-a-team-legacy openapi_files: @@ -6936,19 +7164,19 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user documentation_url: https://docs.github.com/rest/users/users#get-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /user documentation_url: https://docs.github.com/rest/users/users#update-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/blocks documentation_url: https://docs.github.com/rest/users/blocking#list-users-blocked-by-the-authenticated-user openapi_files: @@ -7074,7 +7302,7 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /user/email/visibility documentation_url: https://docs.github.com/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user openapi_files: @@ -7085,97 +7313,97 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/emails documentation_url: https://docs.github.com/rest/users/emails#list-email-addresses-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/emails documentation_url: https://docs.github.com/rest/users/emails#add-an-email-address-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/followers documentation_url: https://docs.github.com/rest/users/followers#list-followers-of-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/following documentation_url: https://docs.github.com/rest/users/followers#list-the-people-the-authenticated-user-follows openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/following/{username} documentation_url: https://docs.github.com/rest/users/followers#unfollow-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/following/{username} documentation_url: https://docs.github.com/rest/users/followers#check-if-a-person-is-followed-by-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /user/following/{username} documentation_url: https://docs.github.com/rest/users/followers#follow-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/gpg_keys documentation_url: https://docs.github.com/rest/users/gpg-keys#list-gpg-keys-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/gpg_keys documentation_url: https://docs.github.com/rest/users/gpg-keys#create-a-gpg-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/gpg_keys/{gpg_key_id} documentation_url: https://docs.github.com/rest/users/gpg-keys#delete-a-gpg-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/gpg_keys/{gpg_key_id} documentation_url: https://docs.github.com/rest/users/gpg-keys#get-a-gpg-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/installations documentation_url: https://docs.github.com/rest/apps/installations#list-app-installations-accessible-to-the-user-access-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/installations/{installation_id}/repositories documentation_url: https://docs.github.com/rest/apps/installations#list-repositories-accessible-to-the-user-access-token openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/installations/{installation_id}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/apps/installations#remove-a-repository-from-an-app-installation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /user/installations/{installation_id}/repositories/{repository_id} documentation_url: https://docs.github.com/rest/apps/installations#add-a-repository-to-an-app-installation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/interaction-limits documentation_url: https://docs.github.com/rest/interactions/user#remove-interaction-restrictions-from-your-public-repositories openapi_files: @@ -7196,31 +7424,31 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/keys documentation_url: https://docs.github.com/rest/users/keys#list-public-ssh-keys-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/keys documentation_url: https://docs.github.com/rest/users/keys#create-a-public-ssh-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/keys/{key_id} documentation_url: https://docs.github.com/rest/users/keys#delete-a-public-ssh-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/keys/{key_id} documentation_url: https://docs.github.com/rest/users/keys#get-a-public-ssh-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/marketplace_purchases documentation_url: https://docs.github.com/rest/apps/marketplace#list-subscriptions-for-the-authenticated-user openapi_files: @@ -7236,31 +7464,31 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/memberships/orgs/{org} documentation_url: https://docs.github.com/rest/orgs/members#get-an-organization-membership-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /user/memberships/orgs/{org} documentation_url: https://docs.github.com/rest/orgs/members#update-an-organization-membership-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/migrations documentation_url: https://docs.github.com/rest/migrations/users#list-user-migrations openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/migrations documentation_url: https://docs.github.com/rest/migrations/users#start-a-user-migration openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/migrations/{migration_id} documentation_url: https://docs.github.com/rest/migrations/users#get-a-user-migration-status openapi_files: @@ -7276,7 +7504,7 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock documentation_url: https://docs.github.com/rest/migrations/users#unlock-a-user-repository openapi_files: @@ -7287,199 +7515,197 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/orgs documentation_url: https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/packages documentation_url: https://docs.github.com/rest/packages/packages#list-packages-for-the-authenticated-users-namespace openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/packages/{package_type}/{package_name} documentation_url: https://docs.github.com/rest/packages/packages#delete-a-package-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/packages/{package_type}/{package_name} documentation_url: https://docs.github.com/rest/packages/packages#get-a-package-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/packages/{package_type}/{package_name}/restore documentation_url: https://docs.github.com/rest/packages/packages#restore-a-package-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/packages/{package_type}/{package_name}/versions documentation_url: https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id} documentation_url: https://docs.github.com/rest/packages/packages#delete-a-package-version-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/packages/{package_type}/{package_name}/versions/{package_version_id} documentation_url: https://docs.github.com/rest/packages/packages#get-a-package-version-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore documentation_url: https://docs.github.com/rest/packages/packages#restore-a-package-version-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/projects - documentation_url: https://docs.github.com/rest/projects-classic/projects#create-a-user-project + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#create-a-user-project openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: GET /user/public_emails documentation_url: https://docs.github.com/rest/users/emails#list-public-email-addresses-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/repos documentation_url: https://docs.github.com/rest/repos/repos#list-repositories-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/repos documentation_url: https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/repository_invitations documentation_url: https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/repository_invitations/{invitation_id} documentation_url: https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PATCH /user/repository_invitations/{invitation_id} documentation_url: https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/social_accounts documentation_url: https://docs.github.com/rest/users/social-accounts#delete-social-accounts-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/social_accounts documentation_url: https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/social_accounts documentation_url: https://docs.github.com/rest/users/social-accounts#add-social-accounts-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/ssh_signing_keys documentation_url: https://docs.github.com/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /user/ssh_signing_keys documentation_url: https://docs.github.com/rest/users/ssh-signing-keys#create-a-ssh-signing-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/ssh_signing_keys/{ssh_signing_key_id} documentation_url: https://docs.github.com/rest/users/ssh-signing-keys#delete-an-ssh-signing-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/ssh_signing_keys/{ssh_signing_key_id} documentation_url: https://docs.github.com/rest/users/ssh-signing-keys#get-an-ssh-signing-key-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/starred documentation_url: https://docs.github.com/rest/activity/starring#list-repositories-starred-by-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /user/starred/{owner}/{repo} documentation_url: https://docs.github.com/rest/activity/starring#unstar-a-repository-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/starred/{owner}/{repo} documentation_url: https://docs.github.com/rest/activity/starring#check-if-a-repository-is-starred-by-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /user/starred/{owner}/{repo} documentation_url: https://docs.github.com/rest/activity/starring#star-a-repository-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/subscriptions documentation_url: https://docs.github.com/rest/activity/watching#list-repositories-watched-by-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/teams documentation_url: https://docs.github.com/rest/teams/teams#list-teams-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /user/{account_id} documentation_url: https://docs.github.com/rest/users/users#get-a-user-using-their-id openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users documentation_url: https://docs.github.com/rest/users/users#list-users openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username} documentation_url: https://docs.github.com/rest/users/users#get-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /users/{username}/attestations/bulk-list documentation_url: https://docs.github.com/rest/users/attestations#list-attestations-by-bulk-subject-digests openapi_files: @@ -7510,133 +7736,131 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/events documentation_url: https://docs.github.com/rest/activity/events#list-events-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/events/orgs/{org} documentation_url: https://docs.github.com/rest/activity/events#list-organization-events-for-the-authenticated-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/events/public documentation_url: https://docs.github.com/rest/activity/events#list-public-events-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/followers documentation_url: https://docs.github.com/rest/users/followers#list-followers-of-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/following documentation_url: https://docs.github.com/rest/users/followers#list-the-people-a-user-follows openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/following/{target_user} documentation_url: https://docs.github.com/rest/users/followers#check-if-a-user-follows-another-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/gists documentation_url: https://docs.github.com/rest/gists/gists#list-gists-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/gpg_keys documentation_url: https://docs.github.com/rest/users/gpg-keys#list-gpg-keys-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/hovercard documentation_url: https://docs.github.com/rest/users/users#get-contextual-information-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/installation documentation_url: https://docs.github.com/rest/apps/apps#get-a-user-installation-for-the-authenticated-app openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/keys documentation_url: https://docs.github.com/rest/users/keys#list-public-keys-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/orgs documentation_url: https://docs.github.com/rest/orgs/orgs#list-organizations-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/packages documentation_url: https://docs.github.com/rest/packages/packages#list-packages-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /users/{username}/packages/{package_type}/{package_name} documentation_url: https://docs.github.com/rest/packages/packages#delete-a-package-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/packages/{package_type}/{package_name} documentation_url: https://docs.github.com/rest/packages/packages#get-a-package-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /users/{username}/packages/{package_type}/{package_name}/restore documentation_url: https://docs.github.com/rest/packages/packages#restore-a-package-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/packages/{package_type}/{package_name}/versions documentation_url: https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id} documentation_url: https://docs.github.com/rest/packages/packages#delete-package-version-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id} documentation_url: https://docs.github.com/rest/packages/packages#get-a-package-version-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore documentation_url: https://docs.github.com/rest/packages/packages#restore-package-version-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/projects - documentation_url: https://docs.github.com/rest/projects-classic/projects#list-user-projects + documentation_url: https://docs.github.com/enterprise-server@3.16/rest/projects-classic/projects#list-user-projects openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.16/ghes-3.16.json - name: GET /users/{username}/projectsV2 documentation_url: https://docs.github.com/rest/projects/projects#list-projects-for-user openapi_files: @@ -7687,19 +7911,19 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/received_events/public documentation_url: https://docs.github.com/rest/activity/events#list-public-events-received-by-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/repos documentation_url: https://docs.github.com/rest/repos/repos#list-repositories-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/settings/billing/actions documentation_url: https://docs.github.com/rest/billing/billing#get-github-actions-billing-for-a-user openapi_files: @@ -7725,46 +7949,51 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json + - name: GET /users/{username}/settings/billing/usage/summary + documentation_url: https://docs.github.com/rest/billing/enhanced-billing#get-billing-usage-summary-for-a-user + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json - name: DELETE /users/{username}/site_admin - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#demote-a-site-administrator + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#demote-a-site-administrator openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /users/{username}/site_admin - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/social_accounts documentation_url: https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/ssh_signing_keys documentation_url: https://docs.github.com/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/starred documentation_url: https://docs.github.com/rest/activity/starring#list-repositories-starred-by-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /users/{username}/subscriptions documentation_url: https://docs.github.com/rest/activity/watching#list-repositories-watched-by-a-user openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: DELETE /users/{username}/suspended - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#unsuspend-a-user + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#unsuspend-a-user openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: PUT /users/{username}/suspended - documentation_url: https://docs.github.com/enterprise-server@3.17/rest/enterprise-admin/users#suspend-a-user + documentation_url: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#suspend-a-user openapi_files: - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json - name: GET /versions documentation_url: https://docs.github.com/rest/meta/meta#get-all-api-versions openapi_files: @@ -7775,4 +8004,4 @@ openapi_operations: openapi_files: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - - descriptions/ghes-3.17/ghes-3.17.json + - descriptions/ghes-3.18/ghes-3.18.json From 943b80101c7d15f44ae9e0caef2368b65f82e668 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Wed, 5 Nov 2025 13:22:54 +0100 Subject: [PATCH 15/16] feat: Add support for enterprise billing cost centers API (#3803) --- github/enterprise_billing_cost_centers.go | 232 +++++++ .../enterprise_billing_cost_centers_test.go | 637 ++++++++++++++++++ github/github-accessors.go | 104 +++ github/github-accessors_test.go | 143 ++++ 4 files changed, 1116 insertions(+) create mode 100644 github/enterprise_billing_cost_centers.go create mode 100644 github/enterprise_billing_cost_centers_test.go diff --git a/github/enterprise_billing_cost_centers.go b/github/enterprise_billing_cost_centers.go new file mode 100644 index 00000000000..681bf9ec000 --- /dev/null +++ b/github/enterprise_billing_cost_centers.go @@ -0,0 +1,232 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// CostCenter represents an enterprise cost center. +type CostCenter struct { + ID string `json:"id"` + Name string `json:"name"` + Resources []*CostCenterResource `json:"resources"` + State *string `json:"state,omitempty"` + AzureSubscription *string `json:"azure_subscription,omitempty"` +} + +// CostCenterResource represents a resource assigned to a cost center. +type CostCenterResource struct { + Type string `json:"type"` + Name string `json:"name"` +} + +// CostCenters represents a list of cost centers. +type CostCenters struct { + CostCenters []*CostCenter `json:"costCenters,omitempty"` +} + +// CostCenterListOptions specifies optional parameters to the EnterpriseService.ListCostCenters method. +type CostCenterListOptions struct { + State *string `url:"state,omitempty"` +} + +// CostCenterRequest represents a request to create or update a cost center. +type CostCenterRequest struct { + Name *string `json:"name,omitempty"` +} + +// CostCenterResourceRequest represents a request to add or remove resources from a cost center. +type CostCenterResourceRequest struct { + Users []string `json:"users,omitempty"` + Organizations []string `json:"organizations,omitempty"` + Repositories []string `json:"repositories,omitempty"` +} + +// CostCenterAddResourceResponse represents a response from adding resources to a cost center. +type CostCenterAddResourceResponse struct { + Message *string `json:"message,omitempty"` + ReassignedResources []*ReassignedResource `json:"reassigned_resources,omitempty"` +} + +// ReassignedResource represents a resource that was reassigned from another cost center. +type ReassignedResource struct { + ResourceType *string `json:"resource_type,omitempty"` + Name *string `json:"name,omitempty"` + PreviousCostCenter *string `json:"previous_cost_center,omitempty"` +} + +// CostCenterRemoveResourceResponse represents a response from removing resources from a cost center. +type CostCenterRemoveResourceResponse struct { + Message *string `json:"message,omitempty"` +} + +// CostCenterDeleteResponse represents a response from deleting a cost center. +type CostCenterDeleteResponse struct { + Message *string `json:"message,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + CostCenterState *string `json:"costCenterState,omitempty"` +} + +// ListCostCenters lists all cost centers for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#get-all-cost-centers-for-an-enterprise +// +//meta:operation GET /enterprises/{enterprise}/settings/billing/cost-centers +func (s *EnterpriseService) ListCostCenters(ctx context.Context, enterprise string, opts *CostCenterListOptions) (*CostCenters, *Response, error) { + u := fmt.Sprintf("enterprises/%v/settings/billing/cost-centers", enterprise) + u, err := addOptions(u, opts) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + costCenters := &CostCenters{} + resp, err := s.client.Do(ctx, req, costCenters) + if err != nil { + return nil, resp, err + } + + return costCenters, resp, nil +} + +// CreateCostCenter creates a new cost center for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#create-a-new-cost-center +// +//meta:operation POST /enterprises/{enterprise}/settings/billing/cost-centers +func (s *EnterpriseService) CreateCostCenter(ctx context.Context, enterprise string, costCenter CostCenterRequest) (*CostCenter, *Response, error) { + u := fmt.Sprintf("enterprises/%v/settings/billing/cost-centers", enterprise) + + req, err := s.client.NewRequest("POST", u, costCenter) + if err != nil { + return nil, nil, err + } + + result := &CostCenter{} + resp, err := s.client.Do(ctx, req, result) + if err != nil { + return nil, resp, err + } + + return result, resp, nil +} + +// GetCostCenter gets a cost center by ID for an enterprise. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#get-a-cost-center-by-id +// +//meta:operation GET /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id} +func (s *EnterpriseService) GetCostCenter(ctx context.Context, enterprise, costCenterID string) (*CostCenter, *Response, error) { + u := fmt.Sprintf("enterprises/%v/settings/billing/cost-centers/%v", enterprise, costCenterID) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + costCenter := &CostCenter{} + resp, err := s.client.Do(ctx, req, costCenter) + if err != nil { + return nil, resp, err + } + + return costCenter, resp, nil +} + +// UpdateCostCenter updates the name of a cost center. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#update-a-cost-center-name +// +//meta:operation PATCH /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id} +func (s *EnterpriseService) UpdateCostCenter(ctx context.Context, enterprise, costCenterID string, costCenter CostCenterRequest) (*CostCenter, *Response, error) { + u := fmt.Sprintf("enterprises/%v/settings/billing/cost-centers/%v", enterprise, costCenterID) + + req, err := s.client.NewRequest("PATCH", u, costCenter) + if err != nil { + return nil, nil, err + } + + result := &CostCenter{} + resp, err := s.client.Do(ctx, req, result) + if err != nil { + return nil, resp, err + } + + return result, resp, nil +} + +// DeleteCostCenter deletes a cost center. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#delete-a-cost-center +// +//meta:operation DELETE /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id} +func (s *EnterpriseService) DeleteCostCenter(ctx context.Context, enterprise, costCenterID string) (*CostCenterDeleteResponse, *Response, error) { + u := fmt.Sprintf("enterprises/%v/settings/billing/cost-centers/%v", enterprise, costCenterID) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, nil, err + } + + result := &CostCenterDeleteResponse{} + resp, err := s.client.Do(ctx, req, result) + if err != nil { + return nil, resp, err + } + + return result, resp, nil +} + +// AddResourcesToCostCenter adds resources to a cost center. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#add-resources-to-a-cost-center +// +//meta:operation POST /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource +func (s *EnterpriseService) AddResourcesToCostCenter(ctx context.Context, enterprise, costCenterID string, resources CostCenterResourceRequest) (*CostCenterAddResourceResponse, *Response, error) { + u := fmt.Sprintf("enterprises/%v/settings/billing/cost-centers/%v/resource", enterprise, costCenterID) + + req, err := s.client.NewRequest("POST", u, resources) + if err != nil { + return nil, nil, err + } + + result := &CostCenterAddResourceResponse{} + resp, err := s.client.Do(ctx, req, result) + if err != nil { + return nil, resp, err + } + + return result, resp, nil +} + +// RemoveResourcesFromCostCenter removes resources from a cost center. +// +// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#remove-resources-from-a-cost-center +// +//meta:operation DELETE /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource +func (s *EnterpriseService) RemoveResourcesFromCostCenter(ctx context.Context, enterprise, costCenterID string, resources CostCenterResourceRequest) (*CostCenterRemoveResourceResponse, *Response, error) { + u := fmt.Sprintf("enterprises/%v/settings/billing/cost-centers/%v/resource", enterprise, costCenterID) + + req, err := s.client.NewRequest("DELETE", u, resources) + if err != nil { + return nil, nil, err + } + + result := &CostCenterRemoveResourceResponse{} + resp, err := s.client.Do(ctx, req, result) + if err != nil { + return nil, resp, err + } + + return result, resp, nil +} diff --git a/github/enterprise_billing_cost_centers_test.go b/github/enterprise_billing_cost_centers_test.go new file mode 100644 index 00000000000..d450a701eb5 --- /dev/null +++ b/github/enterprise_billing_cost_centers_test.go @@ -0,0 +1,637 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "fmt" + "net/http" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestEnterpriseService_ListCostCenters(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/enterprises/e/settings/billing/cost-centers", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + testFormValues(t, r, values{ + "state": "active", + }) + fmt.Fprint(w, `{ + "costCenters": [ + { + "id": "2eeb8ffe-6903-11ee-8c99-0242ac120002", + "name": "Cost Center Name", + "state": "active", + "azure_subscription": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "resources": [ + { + "type": "User", + "name": "Monalisa" + }, + { + "type": "Repo", + "name": "octocat/hello-world" + } + ] + }, + { + "id": "3ffb9ffe-6903-11ee-8c99-0242ac120003", + "name": "Another Cost Center", + "state": "active", + "resources": [ + { + "type": "User", + "name": "Octocat" + } + ] + } + ] + }`) + }) + + ctx := t.Context() + opts := &CostCenterListOptions{ + State: Ptr("active"), + } + costCenters, _, err := client.Enterprise.ListCostCenters(ctx, "e", opts) + if err != nil { + t.Errorf("Enterprise.ListCostCenters returned error: %v", err) + } + + want := &CostCenters{ + CostCenters: []*CostCenter{ + { + ID: "2eeb8ffe-6903-11ee-8c99-0242ac120002", + Name: "Cost Center Name", + State: Ptr("active"), + AzureSubscription: Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), + Resources: []*CostCenterResource{ + { + Type: "User", + Name: "Monalisa", + }, + { + Type: "Repo", + Name: "octocat/hello-world", + }, + }, + }, + { + ID: "3ffb9ffe-6903-11ee-8c99-0242ac120003", + Name: "Another Cost Center", + State: Ptr("active"), + Resources: []*CostCenterResource{ + { + Type: "User", + Name: "Octocat", + }, + }, + }, + }, + } + if !cmp.Equal(costCenters, want) { + t.Errorf("Enterprise.ListCostCenters returned %+v, want %+v", costCenters, want) + } + + const methodName = "ListCostCenters" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Enterprise.ListCostCenters(ctx, "\n", opts) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.ListCostCenters(ctx, "e", opts) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_ListCostCenters_invalidEnterprise(t *testing.T) { + t.Parallel() + client, _, _ := setup(t) + + ctx := t.Context() + _, _, err := client.Enterprise.ListCostCenters(ctx, "%", nil) + testURLParseError(t, err) +} + +func TestEnterpriseService_CreateCostCenter(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/enterprises/e/settings/billing/cost-centers", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "POST") + testBody(t, r, `{"name":"Engineering Team"}`+"\n") + fmt.Fprint(w, `{ + "id": "abc123", + "name": "Engineering Team", + "resources": [] + }`) + }) + + ctx := t.Context() + req := CostCenterRequest{ + Name: Ptr("Engineering Team"), + } + costCenter, _, err := client.Enterprise.CreateCostCenter(ctx, "e", req) + if err != nil { + t.Errorf("Enterprise.CreateCostCenter returned error: %v", err) + } + + want := &CostCenter{ + ID: "abc123", + Name: "Engineering Team", + Resources: []*CostCenterResource{}, + } + if !cmp.Equal(costCenter, want) { + t.Errorf("Enterprise.CreateCostCenter returned %+v, want %+v", costCenter, want) + } + + const methodName = "CreateCostCenter" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Enterprise.CreateCostCenter(ctx, "\n", req) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.CreateCostCenter(ctx, "e", req) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_CreateCostCenter_invalidEnterprise(t *testing.T) { + t.Parallel() + client, _, _ := setup(t) + + ctx := t.Context() + _, _, err := client.Enterprise.CreateCostCenter(ctx, "%", CostCenterRequest{}) + testURLParseError(t, err) +} + +func TestEnterpriseService_GetCostCenter(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/enterprises/e/settings/billing/cost-centers/2eeb8ffe-6903-11ee-8c99-0242ac120002", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{ + "id": "2eeb8ffe-6903-11ee-8c99-0242ac120002", + "name": "Cost Center Name", + "state": "active", + "azure_subscription": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "resources": [ + { + "type": "User", + "name": "Monalisa" + }, + { + "type": "Repo", + "name": "octocat/hello-world" + } + ] + }`) + }) + + ctx := t.Context() + costCenter, _, err := client.Enterprise.GetCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + if err != nil { + t.Errorf("Enterprise.GetCostCenter returned error: %v", err) + } + + want := &CostCenter{ + ID: "2eeb8ffe-6903-11ee-8c99-0242ac120002", + Name: "Cost Center Name", + State: Ptr("active"), + AzureSubscription: Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), + Resources: []*CostCenterResource{ + { + Type: "User", + Name: "Monalisa", + }, + { + Type: "Repo", + Name: "octocat/hello-world", + }, + }, + } + if !cmp.Equal(costCenter, want) { + t.Errorf("Enterprise.GetCostCenter returned %+v, want %+v", costCenter, want) + } + + const methodName = "GetCostCenter" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Enterprise.GetCostCenter(ctx, "\n", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.GetCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_GetCostCenter_invalidEnterprise(t *testing.T) { + t.Parallel() + client, _, _ := setup(t) + + ctx := t.Context() + _, _, err := client.Enterprise.GetCostCenter(ctx, "%", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + testURLParseError(t, err) +} + +func TestEnterpriseService_UpdateCostCenter(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/enterprises/e/settings/billing/cost-centers/2eeb8ffe-6903-11ee-8c99-0242ac120002", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "PATCH") + testBody(t, r, `{"name":"Updated Cost Center Name"}`+"\n") + fmt.Fprint(w, `{ + "id": "2eeb8ffe-6903-11ee-8c99-0242ac120002", + "name": "Updated Cost Center Name", + "state": "active", + "azure_subscription": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "resources": [ + { + "type": "User", + "name": "Monalisa" + }, + { + "type": "Repo", + "name": "octocat/hello-world" + } + ] + }`) + }) + + ctx := t.Context() + req := CostCenterRequest{ + Name: Ptr("Updated Cost Center Name"), + } + costCenter, _, err := client.Enterprise.UpdateCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + if err != nil { + t.Errorf("Enterprise.UpdateCostCenter returned error: %v", err) + } + + want := &CostCenter{ + ID: "2eeb8ffe-6903-11ee-8c99-0242ac120002", + Name: "Updated Cost Center Name", + State: Ptr("active"), + AzureSubscription: Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), + Resources: []*CostCenterResource{ + { + Type: "User", + Name: "Monalisa", + }, + { + Type: "Repo", + Name: "octocat/hello-world", + }, + }, + } + if !cmp.Equal(costCenter, want) { + t.Errorf("Enterprise.UpdateCostCenter returned %+v, want %+v", costCenter, want) + } + + const methodName = "UpdateCostCenter" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Enterprise.UpdateCostCenter(ctx, "\n", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.UpdateCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_UpdateCostCenter_invalidEnterprise(t *testing.T) { + t.Parallel() + client, _, _ := setup(t) + + ctx := t.Context() + _, _, err := client.Enterprise.UpdateCostCenter(ctx, "%", "2eeb8ffe-6903-11ee-8c99-0242ac120002", CostCenterRequest{}) + testURLParseError(t, err) +} + +func TestEnterpriseService_DeleteCostCenter(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/enterprises/e/settings/billing/cost-centers/2eeb8ffe-6903-11ee-8c99-0242ac120002", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "DELETE") + fmt.Fprint(w, `{ + "message": "Cost center successfully deleted.", + "id": "2eeb8ffe-6903-11ee-8c99-0242ac120002", + "name": "Engineering Team", + "costCenterState": "CostCenterArchived" + }`) + }) + + ctx := t.Context() + result, _, err := client.Enterprise.DeleteCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + if err != nil { + t.Errorf("Enterprise.DeleteCostCenter returned error: %v", err) + } + + want := &CostCenterDeleteResponse{ + Message: Ptr("Cost center successfully deleted."), + ID: Ptr("2eeb8ffe-6903-11ee-8c99-0242ac120002"), + Name: Ptr("Engineering Team"), + CostCenterState: Ptr("CostCenterArchived"), + } + if !cmp.Equal(result, want) { + t.Errorf("Enterprise.DeleteCostCenter returned %+v, want %+v", result, want) + } + + const methodName = "DeleteCostCenter" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Enterprise.DeleteCostCenter(ctx, "\n", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.DeleteCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_DeleteCostCenter_invalidEnterprise(t *testing.T) { + t.Parallel() + client, _, _ := setup(t) + + ctx := t.Context() + _, _, err := client.Enterprise.DeleteCostCenter(ctx, "%", "2eeb8ffe-6903-11ee-8c99-0242ac120002") + testURLParseError(t, err) +} + +func TestEnterpriseService_AddResourcesToCostCenter(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/enterprises/e/settings/billing/cost-centers/2eeb8ffe-6903-11ee-8c99-0242ac120002/resource", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "POST") + testBody(t, r, `{"users":["monalisa"]}`+"\n") + fmt.Fprint(w, `{ + "message": "Resources successfully added to the cost center.", + "reassigned_resources": [ + { + "resource_type": "user", + "name": "monalisa", + "previous_cost_center": "old-cost-center" + }, + { + "resource_type": "organization", + "name": "octo-org", + "previous_cost_center": "another-cost-center" + }, + { + "resource_type": "repository", + "name": "octo-repo", + "previous_cost_center": "yet-another-cost-center" + } + ] + }`) + }) + + ctx := t.Context() + req := CostCenterResourceRequest{ + Users: []string{"monalisa"}, + } + result, _, err := client.Enterprise.AddResourcesToCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + if err != nil { + t.Errorf("Enterprise.AddResourcesToCostCenter returned error: %v", err) + } + + want := &CostCenterAddResourceResponse{ + Message: Ptr("Resources successfully added to the cost center."), + ReassignedResources: []*ReassignedResource{ + { + ResourceType: Ptr("user"), + Name: Ptr("monalisa"), + PreviousCostCenter: Ptr("old-cost-center"), + }, + { + ResourceType: Ptr("organization"), + Name: Ptr("octo-org"), + PreviousCostCenter: Ptr("another-cost-center"), + }, + { + ResourceType: Ptr("repository"), + Name: Ptr("octo-repo"), + PreviousCostCenter: Ptr("yet-another-cost-center"), + }, + }, + } + if !cmp.Equal(result, want) { + t.Errorf("Enterprise.AddResourcesToCostCenter returned %+v, want %+v", result, want) + } + + const methodName = "AddResourcesToCostCenter" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Enterprise.AddResourcesToCostCenter(ctx, "\n", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.AddResourcesToCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_AddResourcesToCostCenter_invalidEnterprise(t *testing.T) { + t.Parallel() + client, _, _ := setup(t) + + ctx := t.Context() + _, _, err := client.Enterprise.AddResourcesToCostCenter(ctx, "%", "2eeb8ffe-6903-11ee-8c99-0242ac120002", CostCenterResourceRequest{}) + testURLParseError(t, err) +} + +func TestEnterpriseService_RemoveResourcesFromCostCenter(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/enterprises/e/settings/billing/cost-centers/2eeb8ffe-6903-11ee-8c99-0242ac120002/resource", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "DELETE") + testBody(t, r, `{"users":["monalisa"]}`+"\n") + fmt.Fprint(w, `{ + "message": "Resources successfully removed from the cost center." + }`) + }) + + ctx := t.Context() + req := CostCenterResourceRequest{ + Users: []string{"monalisa"}, + } + result, _, err := client.Enterprise.RemoveResourcesFromCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + if err != nil { + t.Errorf("Enterprise.RemoveResourcesFromCostCenter returned error: %v", err) + } + + want := &CostCenterRemoveResourceResponse{ + Message: Ptr("Resources successfully removed from the cost center."), + } + if !cmp.Equal(result, want) { + t.Errorf("Enterprise.RemoveResourcesFromCostCenter returned %+v, want %+v", result, want) + } + + const methodName = "RemoveResourcesFromCostCenter" + testBadOptions(t, methodName, func() (err error) { + _, _, err = client.Enterprise.RemoveResourcesFromCostCenter(ctx, "\n", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.RemoveResourcesFromCostCenter(ctx, "e", "2eeb8ffe-6903-11ee-8c99-0242ac120002", req) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_RemoveResourcesFromCostCenter_invalidEnterprise(t *testing.T) { + t.Parallel() + client, _, _ := setup(t) + + ctx := t.Context() + _, _, err := client.Enterprise.RemoveResourcesFromCostCenter(ctx, "%", "2eeb8ffe-6903-11ee-8c99-0242ac120002", CostCenterResourceRequest{}) + testURLParseError(t, err) +} + +func TestCostCenter_Marshal(t *testing.T) { + t.Parallel() + testJSONMarshal(t, &CostCenter{}, `{"id":"","name":"","resources":null}`) + + u := &CostCenter{ + ID: "1", + Name: "Engineering", + State: Ptr("active"), + AzureSubscription: Ptr("sub-123"), + Resources: []*CostCenterResource{ + { + Type: "user", + Name: "octocat", + }, + }, + } + + want := `{ + "id": "1", + "name": "Engineering", + "state": "active", + "azure_subscription": "sub-123", + "resources": [ + { + "type": "user", + "name": "octocat" + } + ] + }` + + testJSONMarshal(t, u, want) +} + +func TestCostCenterResource_Marshal(t *testing.T) { + t.Parallel() + testJSONMarshal(t, &CostCenterResource{}, `{"type":"","name":""}`) + + u := &CostCenterResource{ + Type: "user", + Name: "octocat", + } + + want := `{ + "type": "user", + "name": "octocat" + }` + + testJSONMarshal(t, u, want) +} + +func TestCostCenters_Marshal(t *testing.T) { + t.Parallel() + testJSONMarshal(t, &CostCenters{}, "{}") + + u := &CostCenters{ + CostCenters: []*CostCenter{ + { + ID: "1", + Name: "Engineering", + Resources: []*CostCenterResource{}, + State: Ptr("active"), + }, + }, + } + + want := `{ + "costCenters": [ + { + "id": "1", + "name": "Engineering", + "resources": [], + "state": "active" + } + ] + }` + + testJSONMarshal(t, u, want) +} + +func TestCostCenterRequest_Marshal(t *testing.T) { + t.Parallel() + testJSONMarshal(t, &CostCenterRequest{}, "{}") + + u := &CostCenterRequest{ + Name: Ptr("Engineering"), + } + + want := `{ + "name": "Engineering" + }` + + testJSONMarshal(t, u, want) +} + +func TestCostCenterResourceRequest_Marshal(t *testing.T) { + t.Parallel() + testJSONMarshal(t, &CostCenterResourceRequest{}, "{}") + + u := &CostCenterResourceRequest{ + Users: []string{"octocat"}, + Organizations: []string{"github"}, + Repositories: []string{"github/go-github"}, + } + + want := `{ + "users": ["octocat"], + "organizations": ["github"], + "repositories": ["github/go-github"] + }` + + testJSONMarshal(t, u, want) +} diff --git a/github/github-accessors.go b/github/github-accessors.go index 7844b5b36d0..c32e2159611 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -6062,6 +6062,86 @@ func (c *CopilotSeatDetails) GetUpdatedAt() Timestamp { return *c.UpdatedAt } +// GetAzureSubscription returns the AzureSubscription field if it's non-nil, zero value otherwise. +func (c *CostCenter) GetAzureSubscription() string { + if c == nil || c.AzureSubscription == nil { + return "" + } + return *c.AzureSubscription +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (c *CostCenter) GetState() string { + if c == nil || c.State == nil { + return "" + } + return *c.State +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (c *CostCenterAddResourceResponse) GetMessage() string { + if c == nil || c.Message == nil { + return "" + } + return *c.Message +} + +// GetCostCenterState returns the CostCenterState field if it's non-nil, zero value otherwise. +func (c *CostCenterDeleteResponse) GetCostCenterState() string { + if c == nil || c.CostCenterState == nil { + return "" + } + return *c.CostCenterState +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (c *CostCenterDeleteResponse) GetID() string { + if c == nil || c.ID == nil { + return "" + } + return *c.ID +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (c *CostCenterDeleteResponse) GetMessage() string { + if c == nil || c.Message == nil { + return "" + } + return *c.Message +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CostCenterDeleteResponse) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (c *CostCenterListOptions) GetState() string { + if c == nil || c.State == nil { + return "" + } + return *c.State +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (c *CostCenterRemoveResourceResponse) GetMessage() string { + if c == nil || c.Message == nil { + return "" + } + return *c.Message +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CostCenterRequest) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + // GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. func (c *CreateCheckRunOptions) GetCompletedAt() Timestamp { if c == nil || c.CompletedAt == nil { @@ -21966,6 +22046,30 @@ func (r *Reactions) GetURL() string { return *r.URL } +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (r *ReassignedResource) GetName() string { + if r == nil || r.Name == nil { + return "" + } + return *r.Name +} + +// GetPreviousCostCenter returns the PreviousCostCenter field if it's non-nil, zero value otherwise. +func (r *ReassignedResource) GetPreviousCostCenter() string { + if r == nil || r.PreviousCostCenter == nil { + return "" + } + return *r.PreviousCostCenter +} + +// GetResourceType returns the ResourceType field if it's non-nil, zero value otherwise. +func (r *ReassignedResource) GetResourceType() string { + if r == nil || r.ResourceType == nil { + return "" + } + return *r.ResourceType +} + // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. func (r *Reference) GetNodeID() string { if r == nil || r.NodeID == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index c6ece7ee50a..d3bef6e4a9d 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -7908,6 +7908,116 @@ func TestCopilotSeatDetails_GetUpdatedAt(tt *testing.T) { c.GetUpdatedAt() } +func TestCostCenter_GetAzureSubscription(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenter{AzureSubscription: &zeroValue} + c.GetAzureSubscription() + c = &CostCenter{} + c.GetAzureSubscription() + c = nil + c.GetAzureSubscription() +} + +func TestCostCenter_GetState(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenter{State: &zeroValue} + c.GetState() + c = &CostCenter{} + c.GetState() + c = nil + c.GetState() +} + +func TestCostCenterAddResourceResponse_GetMessage(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterAddResourceResponse{Message: &zeroValue} + c.GetMessage() + c = &CostCenterAddResourceResponse{} + c.GetMessage() + c = nil + c.GetMessage() +} + +func TestCostCenterDeleteResponse_GetCostCenterState(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterDeleteResponse{CostCenterState: &zeroValue} + c.GetCostCenterState() + c = &CostCenterDeleteResponse{} + c.GetCostCenterState() + c = nil + c.GetCostCenterState() +} + +func TestCostCenterDeleteResponse_GetID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterDeleteResponse{ID: &zeroValue} + c.GetID() + c = &CostCenterDeleteResponse{} + c.GetID() + c = nil + c.GetID() +} + +func TestCostCenterDeleteResponse_GetMessage(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterDeleteResponse{Message: &zeroValue} + c.GetMessage() + c = &CostCenterDeleteResponse{} + c.GetMessage() + c = nil + c.GetMessage() +} + +func TestCostCenterDeleteResponse_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterDeleteResponse{Name: &zeroValue} + c.GetName() + c = &CostCenterDeleteResponse{} + c.GetName() + c = nil + c.GetName() +} + +func TestCostCenterListOptions_GetState(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterListOptions{State: &zeroValue} + c.GetState() + c = &CostCenterListOptions{} + c.GetState() + c = nil + c.GetState() +} + +func TestCostCenterRemoveResourceResponse_GetMessage(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterRemoveResourceResponse{Message: &zeroValue} + c.GetMessage() + c = &CostCenterRemoveResourceResponse{} + c.GetMessage() + c = nil + c.GetMessage() +} + +func TestCostCenterRequest_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CostCenterRequest{Name: &zeroValue} + c.GetName() + c = &CostCenterRequest{} + c.GetName() + c = nil + c.GetName() +} + func TestCreateCheckRunOptions_GetCompletedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -28369,6 +28479,39 @@ func TestReactions_GetURL(tt *testing.T) { r.GetURL() } +func TestReassignedResource_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + r := &ReassignedResource{Name: &zeroValue} + r.GetName() + r = &ReassignedResource{} + r.GetName() + r = nil + r.GetName() +} + +func TestReassignedResource_GetPreviousCostCenter(tt *testing.T) { + tt.Parallel() + var zeroValue string + r := &ReassignedResource{PreviousCostCenter: &zeroValue} + r.GetPreviousCostCenter() + r = &ReassignedResource{} + r.GetPreviousCostCenter() + r = nil + r.GetPreviousCostCenter() +} + +func TestReassignedResource_GetResourceType(tt *testing.T) { + tt.Parallel() + var zeroValue string + r := &ReassignedResource{ResourceType: &zeroValue} + r.GetResourceType() + r = &ReassignedResource{} + r.GetResourceType() + r = nil + r.GetResourceType() +} + func TestReference_GetNodeID(tt *testing.T) { tt.Parallel() var zeroValue string From 876028969d13dbdb40e9b63e9850b2e2bbbe5d6a Mon Sep 17 00:00:00 2001 From: Leonard Sheng Sheng Lee Date: Thu, 6 Nov 2025 17:13:36 +0100 Subject: [PATCH 16/16] feat: Add `sha_pinning_required` to `ActionsPermissions` structs (#3807) --- github/actions_permissions_orgs.go | 1 + github/actions_permissions_orgs_test.go | 14 ++++++++------ github/github-accessors.go | 16 ++++++++++++++++ github/github-accessors_test.go | 22 ++++++++++++++++++++++ github/github-stringify_test.go | 6 ++++-- github/repos_actions_permissions.go | 1 + github/repos_actions_permissions_test.go | 14 ++++++++------ 7 files changed, 60 insertions(+), 14 deletions(-) diff --git a/github/actions_permissions_orgs.go b/github/actions_permissions_orgs.go index 64e692d70a3..626e3998303 100644 --- a/github/actions_permissions_orgs.go +++ b/github/actions_permissions_orgs.go @@ -17,6 +17,7 @@ type ActionsPermissions struct { EnabledRepositories *string `json:"enabled_repositories,omitempty"` AllowedActions *string `json:"allowed_actions,omitempty"` SelectedActionsURL *string `json:"selected_actions_url,omitempty"` + SHAPinningRequired *bool `json:"sha_pinning_required,omitempty"` } func (a ActionsPermissions) String() string { diff --git a/github/actions_permissions_orgs_test.go b/github/actions_permissions_orgs_test.go index 9d213423b9a..c42405795df 100644 --- a/github/actions_permissions_orgs_test.go +++ b/github/actions_permissions_orgs_test.go @@ -20,7 +20,7 @@ func TestActionsService_GetActionsPermissions(t *testing.T) { mux.HandleFunc("/orgs/o/actions/permissions", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - fmt.Fprint(w, `{"enabled_repositories": "all", "allowed_actions": "all"}`) + fmt.Fprint(w, `{"enabled_repositories": "all", "allowed_actions": "all", "sha_pinning_required": true}`) }) ctx := t.Context() @@ -28,7 +28,7 @@ func TestActionsService_GetActionsPermissions(t *testing.T) { if err != nil { t.Errorf("Actions.GetActionsPermissions returned error: %v", err) } - want := &ActionsPermissions{EnabledRepositories: Ptr("all"), AllowedActions: Ptr("all")} + want := &ActionsPermissions{EnabledRepositories: Ptr("all"), AllowedActions: Ptr("all"), SHAPinningRequired: Ptr(true)} if !cmp.Equal(org, want) { t.Errorf("Actions.GetActionsPermissions returned %+v, want %+v", org, want) } @@ -52,7 +52,7 @@ func TestActionsService_UpdateActionsPermissions(t *testing.T) { t.Parallel() client, mux, _ := setup(t) - input := &ActionsPermissions{EnabledRepositories: Ptr("all"), AllowedActions: Ptr("selected")} + input := &ActionsPermissions{EnabledRepositories: Ptr("all"), AllowedActions: Ptr("selected"), SHAPinningRequired: Ptr(true)} mux.HandleFunc("/orgs/o/actions/permissions", func(w http.ResponseWriter, r *http.Request) { v := new(ActionsPermissions) @@ -63,7 +63,7 @@ func TestActionsService_UpdateActionsPermissions(t *testing.T) { t.Errorf("Request body = %+v, want %+v", v, input) } - fmt.Fprint(w, `{"enabled_repositories": "all", "allowed_actions": "selected"}`) + fmt.Fprint(w, `{"enabled_repositories": "all", "allowed_actions": "selected", "sha_pinning_required": true}`) }) ctx := t.Context() @@ -72,7 +72,7 @@ func TestActionsService_UpdateActionsPermissions(t *testing.T) { t.Errorf("Actions.UpdateActionsPermissions returned error: %v", err) } - want := &ActionsPermissions{EnabledRepositories: Ptr("all"), AllowedActions: Ptr("selected")} + want := &ActionsPermissions{EnabledRepositories: Ptr("all"), AllowedActions: Ptr("selected"), SHAPinningRequired: Ptr(true)} if !cmp.Equal(org, want) { t.Errorf("Actions.UpdateActionsPermissions returned %+v, want %+v", org, want) } @@ -326,12 +326,14 @@ func TestActionsPermissions_Marshal(t *testing.T) { EnabledRepositories: Ptr("e"), AllowedActions: Ptr("a"), SelectedActionsURL: Ptr("sau"), + SHAPinningRequired: Ptr(true), } want := `{ "enabled_repositories": "e", "allowed_actions": "a", - "selected_actions_url": "sau" + "selected_actions_url": "sau", + "sha_pinning_required": true }` testJSONMarshal(t, u, want) diff --git a/github/github-accessors.go b/github/github-accessors.go index c32e2159611..6a6ef9c9599 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -206,6 +206,14 @@ func (a *ActionsPermissions) GetSelectedActionsURL() string { return *a.SelectedActionsURL } +// GetSHAPinningRequired returns the SHAPinningRequired field if it's non-nil, zero value otherwise. +func (a *ActionsPermissions) GetSHAPinningRequired() bool { + if a == nil || a.SHAPinningRequired == nil { + return false + } + return *a.SHAPinningRequired +} + // GetAllowedActions returns the AllowedActions field if it's non-nil, zero value otherwise. func (a *ActionsPermissionsEnterprise) GetAllowedActions() string { if a == nil || a.AllowedActions == nil { @@ -254,6 +262,14 @@ func (a *ActionsPermissionsRepository) GetSelectedActionsURL() string { return *a.SelectedActionsURL } +// GetSHAPinningRequired returns the SHAPinningRequired field if it's non-nil, zero value otherwise. +func (a *ActionsPermissionsRepository) GetSHAPinningRequired() bool { + if a == nil || a.SHAPinningRequired == nil { + return false + } + return *a.SHAPinningRequired +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (a *ActionsVariable) GetCreatedAt() Timestamp { if a == nil || a.CreatedAt == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index d3bef6e4a9d..33f25e90ee3 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -273,6 +273,17 @@ func TestActionsPermissions_GetSelectedActionsURL(tt *testing.T) { a.GetSelectedActionsURL() } +func TestActionsPermissions_GetSHAPinningRequired(tt *testing.T) { + tt.Parallel() + var zeroValue bool + a := &ActionsPermissions{SHAPinningRequired: &zeroValue} + a.GetSHAPinningRequired() + a = &ActionsPermissions{} + a.GetSHAPinningRequired() + a = nil + a.GetSHAPinningRequired() +} + func TestActionsPermissionsEnterprise_GetAllowedActions(tt *testing.T) { tt.Parallel() var zeroValue string @@ -339,6 +350,17 @@ func TestActionsPermissionsRepository_GetSelectedActionsURL(tt *testing.T) { a.GetSelectedActionsURL() } +func TestActionsPermissionsRepository_GetSHAPinningRequired(tt *testing.T) { + tt.Parallel() + var zeroValue bool + a := &ActionsPermissionsRepository{SHAPinningRequired: &zeroValue} + a.GetSHAPinningRequired() + a = &ActionsPermissionsRepository{} + a.GetSHAPinningRequired() + a = nil + a.GetSHAPinningRequired() +} + func TestActionsVariable_GetCreatedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp diff --git a/github/github-stringify_test.go b/github/github-stringify_test.go index c068952d51c..6f0cdbeb8f1 100644 --- a/github/github-stringify_test.go +++ b/github/github-stringify_test.go @@ -49,8 +49,9 @@ func TestActionsPermissions_String(t *testing.T) { EnabledRepositories: Ptr(""), AllowedActions: Ptr(""), SelectedActionsURL: Ptr(""), + SHAPinningRequired: Ptr(false), } - want := `github.ActionsPermissions{EnabledRepositories:"", AllowedActions:"", SelectedActionsURL:""}` + want := `github.ActionsPermissions{EnabledRepositories:"", AllowedActions:"", SelectedActionsURL:"", SHAPinningRequired:false}` if got := v.String(); got != want { t.Errorf("ActionsPermissions.String = %v, want %v", got, want) } @@ -75,8 +76,9 @@ func TestActionsPermissionsRepository_String(t *testing.T) { Enabled: Ptr(false), AllowedActions: Ptr(""), SelectedActionsURL: Ptr(""), + SHAPinningRequired: Ptr(false), } - want := `github.ActionsPermissionsRepository{Enabled:false, AllowedActions:"", SelectedActionsURL:""}` + want := `github.ActionsPermissionsRepository{Enabled:false, AllowedActions:"", SelectedActionsURL:"", SHAPinningRequired:false}` if got := v.String(); got != want { t.Errorf("ActionsPermissionsRepository.String = %v, want %v", got, want) } diff --git a/github/repos_actions_permissions.go b/github/repos_actions_permissions.go index 751fd79a894..7e56c3f3965 100644 --- a/github/repos_actions_permissions.go +++ b/github/repos_actions_permissions.go @@ -17,6 +17,7 @@ type ActionsPermissionsRepository struct { Enabled *bool `json:"enabled,omitempty"` AllowedActions *string `json:"allowed_actions,omitempty"` SelectedActionsURL *string `json:"selected_actions_url,omitempty"` + SHAPinningRequired *bool `json:"sha_pinning_required,omitempty"` } func (a ActionsPermissionsRepository) String() string { diff --git a/github/repos_actions_permissions_test.go b/github/repos_actions_permissions_test.go index 8d07eb7a676..aad947f9dc7 100644 --- a/github/repos_actions_permissions_test.go +++ b/github/repos_actions_permissions_test.go @@ -20,7 +20,7 @@ func TestRepositoriesService_GetActionsPermissions(t *testing.T) { mux.HandleFunc("/repos/o/r/actions/permissions", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - fmt.Fprint(w, `{"enabled": true, "allowed_actions": "all"}`) + fmt.Fprint(w, `{"enabled": true, "allowed_actions": "all", "sha_pinning_required": true}`) }) ctx := t.Context() @@ -28,7 +28,7 @@ func TestRepositoriesService_GetActionsPermissions(t *testing.T) { if err != nil { t.Errorf("Repositories.GetActionsPermissions returned error: %v", err) } - want := &ActionsPermissionsRepository{Enabled: Ptr(true), AllowedActions: Ptr("all")} + want := &ActionsPermissionsRepository{Enabled: Ptr(true), AllowedActions: Ptr("all"), SHAPinningRequired: Ptr(true)} if !cmp.Equal(org, want) { t.Errorf("Repositories.GetActionsPermissions returned %+v, want %+v", org, want) } @@ -52,7 +52,7 @@ func TestRepositoriesService_UpdateActionsPermissions(t *testing.T) { t.Parallel() client, mux, _ := setup(t) - input := &ActionsPermissionsRepository{Enabled: Ptr(true), AllowedActions: Ptr("selected")} + input := &ActionsPermissionsRepository{Enabled: Ptr(true), AllowedActions: Ptr("selected"), SHAPinningRequired: Ptr(true)} mux.HandleFunc("/repos/o/r/actions/permissions", func(w http.ResponseWriter, r *http.Request) { v := new(ActionsPermissionsRepository) @@ -63,7 +63,7 @@ func TestRepositoriesService_UpdateActionsPermissions(t *testing.T) { t.Errorf("Request body = %+v, want %+v", v, input) } - fmt.Fprint(w, `{"enabled": true, "allowed_actions": "selected"}`) + fmt.Fprint(w, `{"enabled": true, "allowed_actions": "selected", "sha_pinning_required": true}`) }) ctx := t.Context() @@ -72,7 +72,7 @@ func TestRepositoriesService_UpdateActionsPermissions(t *testing.T) { t.Errorf("Repositories.UpdateActionsPermissions returned error: %v", err) } - want := &ActionsPermissionsRepository{Enabled: Ptr(true), AllowedActions: Ptr("selected")} + want := &ActionsPermissionsRepository{Enabled: Ptr(true), AllowedActions: Ptr("selected"), SHAPinningRequired: Ptr(true)} if !cmp.Equal(org, want) { t.Errorf("Repositories.UpdateActionsPermissions returned %+v, want %+v", org, want) } @@ -100,12 +100,14 @@ func TestActionsPermissionsRepository_Marshal(t *testing.T) { Enabled: Ptr(true), AllowedActions: Ptr("all"), SelectedActionsURL: Ptr("someURL"), + SHAPinningRequired: Ptr(true), } want := `{ "enabled": true, "allowed_actions": "all", - "selected_actions_url": "someURL" + "selected_actions_url": "someURL", + "sha_pinning_required": true }` testJSONMarshal(t, u, want)