+
Skip to content

Update OpenAPI #3352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions github/actions_runner_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type ListOrgRunnerGroupOptions struct {

// ListOrganizationRunnerGroups lists all self-hosted runner groups configured in an organization.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-organization
//
//meta:operation GET /orgs/{org}/actions/runner-groups
func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *ListOrgRunnerGroupOptions) (*RunnerGroups, *Response, error) {
Expand All @@ -106,7 +106,7 @@ func (s *ActionsService) ListOrganizationRunnerGroups(ctx context.Context, org s

// GetOrganizationRunnerGroup gets a specific self-hosted runner group for an organization using its RunnerGroup ID.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#get-a-self-hosted-runner-group-for-an-organization
//
//meta:operation GET /orgs/{org}/actions/runner-groups/{runner_group_id}
func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*RunnerGroup, *Response, error) {
Expand All @@ -127,7 +127,7 @@ func (s *ActionsService) GetOrganizationRunnerGroup(ctx context.Context, org str

// DeleteOrganizationRunnerGroup deletes a self-hosted runner group from an organization.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#delete-a-self-hosted-runner-group-from-an-organization
//
//meta:operation DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}
func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org string, groupID int64) (*Response, error) {
Expand All @@ -143,7 +143,7 @@ func (s *ActionsService) DeleteOrganizationRunnerGroup(ctx context.Context, org

// CreateOrganizationRunnerGroup creates a new self-hosted runner group for an organization.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#create-a-self-hosted-runner-group-for-an-organization
//
//meta:operation POST /orgs/{org}/actions/runner-groups
func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org string, createReq CreateRunnerGroupRequest) (*RunnerGroup, *Response, error) {
Expand All @@ -164,7 +164,7 @@ func (s *ActionsService) CreateOrganizationRunnerGroup(ctx context.Context, org

// UpdateOrganizationRunnerGroup updates a self-hosted runner group for an organization.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization
//
//meta:operation PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}
func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org string, groupID int64, updateReq UpdateRunnerGroupRequest) (*RunnerGroup, *Response, error) {
Expand All @@ -185,7 +185,7 @@ func (s *ActionsService) UpdateOrganizationRunnerGroup(ctx context.Context, org

// ListRepositoryAccessRunnerGroup lists the repositories with access to a self-hosted runner group configured in an organization.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
//
//meta:operation GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories
func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, opts *ListOptions) (*ListRepositories, *Response, error) {
Expand All @@ -212,7 +212,7 @@ func (s *ActionsService) ListRepositoryAccessRunnerGroup(ctx context.Context, or
// SetRepositoryAccessRunnerGroup replaces the list of repositories that have access to a self-hosted runner group configured in an organization
// with a new List of repositories.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#set-repository-access-for-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#set-repository-access-for-a-self-hosted-runner-group-in-an-organization
//
//meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories
func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, ids SetRepoAccessRunnerGroupRequest) (*Response, error) {
Expand All @@ -229,7 +229,7 @@ func (s *ActionsService) SetRepositoryAccessRunnerGroup(ctx context.Context, org
// AddRepositoryAccessRunnerGroup adds a repository to the list of selected repositories that can access a self-hosted runner group.
// The runner group must have visibility set to 'selected'.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#add-repository-access-to-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#add-repository-access-to-a-self-hosted-runner-group-in-an-organization
//
//meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}
func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) {
Expand All @@ -246,7 +246,7 @@ func (s *ActionsService) AddRepositoryAccessRunnerGroup(ctx context.Context, org
// RemoveRepositoryAccessRunnerGroup removes a repository from the list of selected repositories that can access a self-hosted runner group.
// The runner group must have visibility set to 'selected'.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization
//
//meta:operation DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}
func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID, repoID int64) (*Response, error) {
Expand All @@ -262,7 +262,7 @@ func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context,

// ListRunnerGroupRunners lists self-hosted runners that are in a specific organization group.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-self-hosted-runners-in-a-group-for-an-organization
//
//meta:operation GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners
func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string, groupID int64, opts *ListOptions) (*Runners, *Response, error) {
Expand All @@ -289,7 +289,7 @@ func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string,
// SetRunnerGroupRunners replaces the list of self-hosted runners that are part of an organization runner group
// with a new list of runners.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#set-self-hosted-runners-in-a-group-for-an-organization
//
//meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners
func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string, groupID int64, ids SetRunnerGroupRunnersRequest) (*Response, error) {
Expand All @@ -305,7 +305,7 @@ func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string,

// AddRunnerGroupRunners adds a self-hosted runner to a runner group configured in an organization.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#add-a-self-hosted-runner-to-a-group-for-an-organization
//
//meta:operation PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
Expand All @@ -322,7 +322,7 @@ func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string,
// RemoveRunnerGroupRunners removes a self-hosted runner from a group configured in an organization.
// The runner is then returned to the default group.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runner-groups#remove-a-self-hosted-runner-from-a-group-for-an-organization
//
//meta:operation DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
func (s *ActionsService) RemoveRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
Expand Down
4 changes: 2 additions & 2 deletions github/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.14/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand All @@ -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.14/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand Down
6 changes: 3 additions & 3 deletions github/admin_orgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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.14/rest/enterprise-admin/orgs#create-an-organization
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand Down Expand Up @@ -61,7 +61,7 @@ type RenameOrgResponse struct {

// RenameOrg renames an organization in GitHub Enterprise.
//
// GitHub API docs: https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/orgs#update-an-organization-name
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand All @@ -70,7 +70,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.14/rest/enterprise-admin/orgs#update-an-organization-name
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand Down
2 changes: 1 addition & 1 deletion github/admin_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.14/rest/enterprise-admin/admin-stats#get-all-statistics
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/admin-stats#get-all-statistics
//
//meta:operation GET /enterprise/stats/all
func (s *AdminService) GetAdminStats(ctx context.Context) (*AdminStats, *Response, error) {
Expand Down
8 changes: 4 additions & 4 deletions github/admin_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.14/rest/enterprise-admin/users#create-a-user
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#create-a-user
//
//meta:operation POST /admin/users
func (s *AdminService) CreateUser(ctx context.Context, userReq CreateUserRequest) (*User, *Response, error) {
Expand All @@ -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.14/rest/enterprise-admin/users#delete-a-user
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/users#delete-a-user
//
//meta:operation DELETE /admin/users/{username}
func (s *AdminService) DeleteUser(ctx context.Context, username string) (*Response, error) {
Expand Down Expand Up @@ -95,7 +95,7 @@ type UserAuthorization struct {

// CreateUserImpersonation creates an impersonation OAuth token.
//
// GitHub API docs: https://docs.github.com/enterprise-server@3.14/rest/enterprise-admin/users#create-an-impersonation-oauth-token
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand All @@ -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.14/rest/enterprise-admin/users#delete-an-impersonation-oauth-token
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand Down
4 changes: 2 additions & 2 deletions github/authorizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.14/rest/enterprise-admin/users#create-an-impersonation-oauth-token
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand All @@ -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.14/rest/enterprise-admin/users#delete-an-impersonation-oauth-token
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand Down
8 changes: 4 additions & 4 deletions github/repos_prereceive_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.14/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository
// GitHub API docs: https://docs.github.com/enterprise-server@3.15/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) {
Expand Down Expand Up @@ -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.14/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.15/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) {
Expand All @@ -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.14/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.15/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) {
Expand All @@ -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.14/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.15/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) {
Expand Down
Loading
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载