Documentation
¶
Overview ¶
Package gitea implements a client for the Gitea API. The version corresponds to the highest supported version of the gitea API, but backwards-compatibility is mostly given.
Index ¶
- Constants
- func GetAgent() (agent.Agent, error)
- func OptionalBool(v bool) *bool
- func OptionalInt64(v int64) *int64
- func OptionalString(v string) *string
- func Version() string
- type AccessMode
- type AccessToken
- type AccessTokenScope
- type ActionArtifactdeprecated
- type ActionArtifactsResponsedeprecated
- type ActionRunnerdeprecated
- type ActionRunnerLabeldeprecated
- type ActionRunnersResponsedeprecated
- type ActionTaskdeprecated
- type ActionTaskResponsedeprecated
- type ActionVariabledeprecated
- type ActionWorkflowdeprecated
- type ActionWorkflowJobdeprecated
- type ActionWorkflowJobsResponsedeprecated
- type ActionWorkflowResponsedeprecated
- type ActionWorkflowRundeprecated
- type ActionWorkflowRunsResponsedeprecated
- type ActionWorkflowStepdeprecated
- type ActionsArtifact
- type ActionsArtifactsResponse
- type ActionsRunner
- type ActionsRunnerLabel
- type ActionsRunnersResponse
- type ActionsService
- func (c *ActionsService) CreateGlobalRunnerRegistrationToken(ctx context.Context) (*RegistrationToken, *Response, error)
- func (c *ActionsService) CreateOrgRunnerRegistrationToken(ctx context.Context, org string) (*RegistrationToken, *Response, error)
- func (c *ActionsService) CreateOrgSecret(ctx context.Context, org, secretName string, opt CreateOrUpdateSecretOption) (*Response, error)
- func (c *ActionsService) CreateOrgVariable(ctx context.Context, org, name string, opt CreateActionsVariableOption) (*Response, error)
- func (c *ActionsService) CreateRepoRunnerRegistrationToken(ctx context.Context, owner, repo string) (*RegistrationToken, *Response, error)
- func (c *ActionsService) CreateRepoSecret(ctx context.Context, user, repo, secretName string, ...) (*Response, error)
- func (c *ActionsService) CreateRepoVariable(ctx context.Context, user, repo, variableName, value string) (*Response, error)
- func (c *ActionsService) CreateUserRunnerRegistrationToken(ctx context.Context) (*RegistrationToken, *Response, error)
- func (c *ActionsService) CreateUserSecret(ctx context.Context, secretName string, opt CreateOrUpdateSecretOption) (*Response, error)
- func (c *ActionsService) CreateUserVariable(ctx context.Context, variableName string, opt CreateActionsVariableOption) (*Response, error)
- func (c *ActionsService) DeleteGlobalRunner(ctx context.Context, runnerID int64) (*Response, error)
- func (c *ActionsService) DeleteOrgRunner(ctx context.Context, org string, runnerID int64) (*Response, error)
- func (c *ActionsService) DeleteOrgSecret(ctx context.Context, org, secretName string) (*Response, error)
- func (c *ActionsService) DeleteOrgVariable(ctx context.Context, org, name string) (*Response, error)
- func (c *ActionsService) DeleteRepoArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Response, error)
- func (c *ActionsService) DeleteRepoRun(ctx context.Context, owner, repo string, runID int64) (*Response, error)
- func (c *ActionsService) DeleteRepoRunner(ctx context.Context, owner, repo string, runnerID int64) (*Response, error)
- func (c *ActionsService) DeleteRepoSecret(ctx context.Context, user, repo, secretName string) (*Response, error)
- func (c *ActionsService) DeleteRepoVariable(ctx context.Context, user, reponame, variableName string) (*Response, error)
- func (c *ActionsService) DeleteUserRunner(ctx context.Context, runnerID int64) (*Response, error)
- func (c *ActionsService) DeleteUserSecret(ctx context.Context, secretName string) (*Response, error)
- func (c *ActionsService) DeleteUserVariable(ctx context.Context, variableName string) (*Response, error)
- func (c *ActionsService) DisableRepoWorkflow(ctx context.Context, owner, repo, workflowID string) (*Response, error)
- func (c *ActionsService) DispatchRepoWorkflow(ctx context.Context, owner, repo, workflowID string, ...) (*RunDetails, *Response, error)
- func (c *ActionsService) EnableRepoWorkflow(ctx context.Context, owner, repo, workflowID string) (*Response, error)
- func (c *ActionsService) GetGlobalRunner(ctx context.Context, runnerID int64) (*ActionsRunner, *Response, error)
- func (c *ActionsService) GetOrgRunner(ctx context.Context, org string, runnerID int64) (*ActionsRunner, *Response, error)
- func (c *ActionsService) GetOrgVariable(ctx context.Context, org, name string) (*ActionsVariable, *Response, error)
- func (c *ActionsService) GetRepoArtifact(ctx context.Context, owner, repo string, artifactID int64) (*ActionsArtifact, *Response, error)
- func (c *ActionsService) GetRepoArtifactArchive(ctx context.Context, owner, repo string, artifactID int64) ([]byte, *Response, error)
- func (c *ActionsService) GetRepoArtifactArchiveReader(ctx context.Context, owner, repo string, artifactID int64) (io.ReadCloser, *Response, error)
- func (c *ActionsService) GetRepoRun(ctx context.Context, owner, repo string, runID int64) (*ActionsWorkflowRun, *Response, error)
- func (c *ActionsService) GetRepoRunJob(ctx context.Context, owner, repo string, jobID int64) (*ActionsWorkflowJob, *Response, error)
- func (c *ActionsService) GetRepoRunJobLogs(ctx context.Context, owner, repo string, jobID int64) ([]byte, *Response, error)
- func (c *ActionsService) GetRepoRunner(ctx context.Context, owner, repo string, runnerID int64) (*ActionsRunner, *Response, error)
- func (c *ActionsService) GetRepoVariable(ctx context.Context, user, repo, variableName string) (*RepoActionsVariable, *Response, error)
- func (c *ActionsService) GetRepoWorkflow(ctx context.Context, owner, repo, workflowID string) (*ActionsWorkflow, *Response, error)
- func (c *ActionsService) GetUserRunner(ctx context.Context, runnerID int64) (*ActionsRunner, *Response, error)
- func (c *ActionsService) GetUserVariable(ctx context.Context, variableName string) (*ActionsVariable, *Response, error)
- func (c *ActionsService) ListGlobalRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
- func (c *ActionsService) ListOrgRunJobs(ctx context.Context, org string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
- func (c *ActionsService) ListOrgRunners(ctx context.Context, org string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
- func (c *ActionsService) ListOrgRuns(ctx context.Context, org string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
- func (c *ActionsService) ListOrgSecrets(ctx context.Context, org string, opt ListOrgActionsSecretOption) ([]*Secret, *Response, error)
- func (c *ActionsService) ListOrgVariables(ctx context.Context, org string, opt ListOrgActionsVariableOption) ([]*ActionsVariable, *Response, error)
- func (c *ActionsService) ListRepoArtifacts(ctx context.Context, owner, repo string, opt ListActionsArtifactsOptions) (*ActionsArtifactsResponse, *Response, error)
- func (c *ActionsService) ListRepoJobsByRun(ctx context.Context, owner, repo string, runID int64, ...) (*ActionsWorkflowJobsResponse, *Response, error)
- func (c *ActionsService) ListRepoRunArtifacts(ctx context.Context, owner, repo string, runID int64, ...) (*ActionsArtifactsResponse, *Response, error)
- func (c *ActionsService) ListRepoRunJobs(ctx context.Context, owner, repo string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
- func (c *ActionsService) ListRepoRunners(ctx context.Context, owner, repo string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
- func (c *ActionsService) ListRepoRuns(ctx context.Context, owner, repo string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
- func (c *ActionsService) ListRepoSecrets(ctx context.Context, user, repo string, opt ListRepoActionsSecretOption) ([]*Secret, *Response, error)
- func (c *ActionsService) ListRepoTasks(ctx context.Context, owner, repo string, opt ListOptions) (*ActionsTaskResponse, *Response, error)
- func (c *ActionsService) ListRepoVariables(ctx context.Context, user, repo string, opt ListRepoActionsVariableOption) ([]*RepoActionsVariable, *Response, error)
- func (c *ActionsService) ListRepoWorkflows(ctx context.Context, owner, repo string) (*ActionsWorkflowResponse, *Response, error)
- func (c *ActionsService) ListRunJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
- func (c *ActionsService) ListRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
- func (c *ActionsService) ListUserRunJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
- func (c *ActionsService) ListUserRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
- func (c *ActionsService) ListUserRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
- func (c *ActionsService) ListUserVariables(ctx context.Context, opt ListOptions) ([]*ActionsVariable, *Response, error)
- func (c *ActionsService) RerunRepoRun(ctx context.Context, owner, repo string, runID int64) (*ActionsWorkflowRun, *Response, error)
- func (c *ActionsService) RerunRepoRunFailedJobs(ctx context.Context, owner, repo string, runID int64) (*Response, error)
- func (c *ActionsService) RerunRepoRunJob(ctx context.Context, owner, repo string, runID, jobID int64) (*ActionsWorkflowJob, *Response, error)
- func (c *ActionsService) UpdateGlobalRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
- func (c *ActionsService) UpdateOrgRunner(ctx context.Context, org string, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
- func (c *ActionsService) UpdateOrgVariable(ctx context.Context, org, name string, opt UpdateActionsVariableOption) (*Response, error)
- func (c *ActionsService) UpdateRepoRunner(ctx context.Context, owner, repo string, runnerID int64, ...) (*ActionsRunner, *Response, error)
- func (c *ActionsService) UpdateRepoVariable(ctx context.Context, user, repo, variableName, value string) (*Response, error)
- func (c *ActionsService) UpdateUserRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
- func (c *ActionsService) UpdateUserVariable(ctx context.Context, variableName string, opt UpdateActionsVariableOption) (*Response, error)
- type ActionsTask
- type ActionsTaskResponse
- type ActionsVariable
- type ActionsWorkflow
- type ActionsWorkflowJob
- type ActionsWorkflowJobsResponse
- type ActionsWorkflowResponse
- type ActionsWorkflowRun
- type ActionsWorkflowRunsResponse
- type ActionsWorkflowStep
- type Activity
- type ActivityPub
- type ActivityPubService
- func (c *ActivityPubService) GetPerson(ctx context.Context, userID int64) (ActivityPub, *Response, error)
- func (c *ActivityPubService) GetPersonResponse(ctx context.Context, userID int64) ([]byte, *Response, error)
- func (c *ActivityPubService) SendInbox(ctx context.Context, userID int64, activity ActivityPub) (*Response, error)
- type ActivityService
- func (c *ActivityService) GetUserHeatmap(ctx context.Context, username string) ([]*UserHeatmapData, *Response, error)
- func (c *ActivityService) ListOrgFeeds(ctx context.Context, org string, opt ListOrgActivityFeedsOptions) ([]*Activity, *Response, error)
- func (c *ActivityService) ListRepoFeeds(ctx context.Context, owner, repo string, opt ListRepoActivityFeedsOptions) ([]*Activity, *Response, error)
- func (c *ActivityService) ListTeamFeeds(ctx context.Context, teamID int64, opt ListTeamActivityFeedsOptions) ([]*Activity, *Response, error)
- func (c *ActivityService) ListUserFeeds(ctx context.Context, username string, opt ListUserActivityFeedsOptions) ([]*Activity, *Response, error)
- type AddCollaboratorOption
- type AddTimeOption
- type AdminListOrgsOptions
- type AdminListUsersOptions
- type AdminService
- func (c *AdminService) AddUserBadges(ctx context.Context, username string, opt UserBadgeOption) (*Response, error)
- func (c *AdminService) AdoptUnadoptedRepo(ctx context.Context, owner, repo string) (*Response, error)
- func (c *AdminService) CreateOrg(ctx context.Context, user string, opt CreateOrgOption) (*Organization, *Response, error)
- func (c *AdminService) CreateRepo(ctx context.Context, user string, opt CreateRepoOption) (*Repository, *Response, error)
- func (c *AdminService) CreateUser(ctx context.Context, opt CreateUserOption) (*User, *Response, error)
- func (c *AdminService) CreateUserPublicKey(ctx context.Context, user string, opt CreateKeyOption) (*PublicKey, *Response, error)
- func (c *AdminService) DeleteUnadoptedRepo(ctx context.Context, owner, repo string) (*Response, error)
- func (c *AdminService) DeleteUser(ctx context.Context, user string) (*Response, error)
- func (c *AdminService) DeleteUserBadge(ctx context.Context, username string, opt UserBadgeOption) (*Response, error)
- func (c *AdminService) DeleteUserPublicKey(ctx context.Context, user string, keyID int) (*Response, error)
- func (c *AdminService) EditUser(ctx context.Context, user string, opt EditUserOption) (*Response, error)
- func (c *AdminService) ListCronTasks(ctx context.Context, opt ListCronTaskOptions) ([]*CronTask, *Response, error)
- func (c *AdminService) ListEmails(ctx context.Context, opt ListAdminEmailsOptions) ([]*Email, *Response, error)
- func (c *AdminService) ListOrgs(ctx context.Context, opt AdminListOrgsOptions) ([]*Organization, *Response, error)
- func (c *AdminService) ListUnadoptedRepos(ctx context.Context, opt ListUnadoptedReposOptions) ([]string, *Response, error)
- func (c *AdminService) ListUserBadges(ctx context.Context, username string) ([]*Badge, *Response, error)
- func (c *AdminService) ListUsers(ctx context.Context, opt AdminListUsersOptions) ([]*User, *Response, error)
- func (c *AdminService) RenameUser(ctx context.Context, username string, opt RenameUserOption) (*Response, error)
- func (c *AdminService) RunCronTasks(ctx context.Context, task string) (*Response, error)
- func (c *AdminService) SearchEmails(ctx context.Context, opt SearchAdminEmailsOptions) ([]*Email, *Response, error)
- type AnnotatedTag
- type AnnotatedTagObject
- type ApplyDiffPatchFileOptions
- type ArchiveType
- type Attachment
- type Badge
- type Branch
- type BranchProtection
- type ChangeFileOperation
- type ChangeFilesOptions
- type ChangedFile
- type Client
- func (c *Client) AcceptRepoTransfer(ctx context.Context, owner, reponame string) (*Repository, *Response, error)deprecated
- func (c *Client) AddCollaborator(ctx context.Context, user, repo, collaborator string, ...) (*Response, error)deprecated
- func (c *Client) AddEmail(ctx context.Context, opt CreateEmailOption) ([]*Email, *Response, error)deprecated
- func (c *Client) AddIssueLabels(ctx context.Context, owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)deprecated
- func (c *Client) AddIssueSubscription(ctx context.Context, owner, repo string, index int64, user string) (*Response, error)deprecated
- func (c *Client) AddRepoTeam(ctx context.Context, user, repo, team string) (*Response, error)deprecated
- func (c *Client) AddRepoTopic(ctx context.Context, user, repo, topic string) (*Response, error)deprecated
- func (c *Client) AddTeamMember(ctx context.Context, id int64, user string) (*Response, error)deprecated
- func (c *Client) AddTeamRepository(ctx context.Context, id int64, org, repo string) (*Response, error)deprecated
- func (c *Client) AddTime(ctx context.Context, owner, repo string, index int64, opt AddTimeOption) (*TrackedTime, *Response, error)deprecated
- func (c *Client) AddUserBadges(ctx context.Context, username string, opt UserBadgeOption) (*Response, error)deprecated
- func (c *Client) AdminCreateOrg(ctx context.Context, user string, opt CreateOrgOption) (*Organization, *Response, error)deprecated
- func (c *Client) AdminCreateRepo(ctx context.Context, user string, opt CreateRepoOption) (*Repository, *Response, error)deprecated
- func (c *Client) AdminCreateUser(ctx context.Context, opt CreateUserOption) (*User, *Response, error)deprecated
- func (c *Client) AdminCreateUserPublicKey(ctx context.Context, user string, opt CreateKeyOption) (*PublicKey, *Response, error)deprecated
- func (c *Client) AdminDeleteUser(ctx context.Context, user string) (*Response, error)deprecated
- func (c *Client) AdminDeleteUserPublicKey(ctx context.Context, user string, keyID int) (*Response, error)deprecated
- func (c *Client) AdminEditUser(ctx context.Context, user string, opt EditUserOption) (*Response, error)deprecated
- func (c *Client) AdminListOrgs(ctx context.Context, opt AdminListOrgsOptions) ([]*Organization, *Response, error)deprecated
- func (c *Client) AdminListUsers(ctx context.Context, opt AdminListUsersOptions) ([]*User, *Response, error)deprecated
- func (c *Client) AdminRenameUser(ctx context.Context, username string, opt RenameUserOption) (*Response, error)deprecated
- func (c *Client) AdoptUnadoptedRepo(ctx context.Context, owner, repo string) (*Response, error)deprecated
- func (c *Client) ApplyRepoDiffPatch(ctx context.Context, owner, repo string, opt ApplyDiffPatchFileOptions) (*FileResponse, *Response, error)deprecated
- func (c *Client) BlockOrgUser(ctx context.Context, org, username string) (*Response, error)deprecated
- func (c *Client) BlockUser(ctx context.Context, username string) (*Response, error)deprecated
- func (c *Client) CancelScheduledAutoMerge(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) ChangeFiles(ctx context.Context, owner, repo string, opt ChangeFilesOptions) (*FileResponse, *Response, error)deprecated
- func (c *Client) CheckIssueSubscription(ctx context.Context, owner, repo string, index int64) (*WatchInfo, *Response, error)deprecated
- func (c *Client) CheckNotifications(ctx context.Context) (int64, *Response, error)deprecated
- func (c *Client) CheckOrgBlock(ctx context.Context, org, username string) (bool, *Response, error)deprecated
- func (c *Client) CheckOrgMembership(ctx context.Context, org, user string) (bool, *Response, error)deprecated
- func (c *Client) CheckPinAllowed(ctx context.Context, owner, repo string) (*NewIssuePinsAllowed, *Response, error)deprecated
- func (c *Client) CheckPublicOrgMembership(ctx context.Context, org, user string) (bool, *Response, error)deprecated
- func (c *Client) CheckRepoTeam(ctx context.Context, user, repo, team string) (*Team, *Response, error)deprecated
- func (c *Client) CheckRepoWatch(ctx context.Context, owner, repo string) (bool, *Response, error)deprecated
- func (c *Client) CheckServerVersionConstraint(ctx context.Context, constraint string) error
- func (c *Client) CheckUserBlock(ctx context.Context, username string) (bool, *Response, error)deprecated
- func (c *Client) ClearIssueLabels(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) CollaboratorPermission(ctx context.Context, user, repo, collaborator string) (*CollaboratorPermissionResult, *Response, error)deprecated
- func (c *Client) CompareCommits(ctx context.Context, user, repo, prev, current string) (*Compare, *Response, error)deprecated
- func (c *Client) CreateAccessToken(ctx context.Context, opt CreateAccessTokenOption) (*AccessToken, *Response, error)deprecated
- func (c *Client) CreateAdminActionRunnerRegistrationToken(ctx context.Context) (*RegistrationToken, *Response, error)deprecated
- func (c *Client) CreateAdminHook(ctx context.Context, opt CreateHookOption) (*Hook, *Response, error)deprecated
- func (c *Client) CreateBranch(ctx context.Context, owner, repo string, opt CreateBranchOption) (*Branch, *Response, error)deprecated
- func (c *Client) CreateBranchProtection(ctx context.Context, owner, repo string, opt CreateBranchProtectionOption) (*BranchProtection, *Response, error)deprecated
- func (c *Client) CreateDeployKey(ctx context.Context, user, repo string, opt CreateKeyOption) (*DeployKey, *Response, error)deprecated
- func (c *Client) CreateFile(ctx context.Context, owner, repo, filepath string, opt CreateFileOptions) (*FileResponse, *Response, error)deprecated
- func (c *Client) CreateFork(ctx context.Context, user, repo string, form CreateForkOption) (*Repository, *Response, error)deprecated
- func (c *Client) CreateGPGKey(ctx context.Context, opt CreateGPGKeyOption) (*GPGKey, *Response, error)deprecated
- func (c *Client) CreateIssue(ctx context.Context, owner, repo string, opt CreateIssueOption) (*Issue, *Response, error)deprecated
- func (c *Client) CreateIssueAttachment(ctx context.Context, owner, repo string, index int64, file io.Reader, ...) (*Attachment, *Response, error)deprecated
- func (c *Client) CreateIssueBlocking(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)deprecated
- func (c *Client) CreateIssueComment(ctx context.Context, owner, repo string, index int64, ...) (*Comment, *Response, error)deprecated
- func (c *Client) CreateIssueCommentAttachment(ctx context.Context, owner, repo string, commentID int64, file io.Reader, ...) (*Attachment, *Response, error)deprecated
- func (c *Client) CreateIssueDependency(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)deprecated
- func (c *Client) CreateLabel(ctx context.Context, owner, repo string, opt CreateLabelOption) (*Label, *Response, error)deprecated
- func (c *Client) CreateMilestone(ctx context.Context, owner, repo string, opt CreateMilestoneOption) (*Milestone, *Response, error)deprecated
- func (c *Client) CreateMyHook(ctx context.Context, opt CreateHookOption) (*Hook, *Response, error)deprecated
- func (c *Client) CreateOauth2(ctx context.Context, opt CreateApplicationOption) (*OAuth2Application, *Response, error)deprecated
- func (c *Client) CreateOrg(ctx context.Context, opt CreateOrgOption) (*Organization, *Response, error)deprecated
- func (c *Client) CreateOrgActionRunnerRegistrationToken(ctx context.Context, org string) (*RegistrationToken, *Response, error)deprecated
- func (c *Client) CreateOrgActionSecret(ctx context.Context, org, secretName string, opt CreateOrUpdateSecretOption) (*Response, error)deprecated
- func (c *Client) CreateOrgActionVariable(ctx context.Context, org, name string, opt CreateActionsVariableOption) (*Response, error)deprecated
- func (c *Client) CreateOrgHook(ctx context.Context, org string, opt CreateHookOption) (*Hook, *Response, error)deprecated
- func (c *Client) CreateOrgLabel(ctx context.Context, orgName string, opt CreateOrgLabelOption) (*Label, *Response, error)deprecated
- func (c *Client) CreateOrgRepo(ctx context.Context, org string, opt CreateRepoOption) (*Repository, *Response, error)deprecated
- func (c *Client) CreatePublicKey(ctx context.Context, opt CreateKeyOption) (*PublicKey, *Response, error)deprecated
- func (c *Client) CreatePullRequest(ctx context.Context, owner, repo string, opt CreatePullRequestOption) (*PullRequest, *Response, error)deprecated
- func (c *Client) CreatePullReview(ctx context.Context, owner, repo string, index int64, ...) (*PullReview, *Response, error)deprecated
- func (c *Client) CreatePullReviewCommentReply(ctx context.Context, owner, repo string, index, id int64, ...) (*PullReviewComment, *Response, error)deprecated
- func (c *Client) CreateRelease(ctx context.Context, owner, repo string, opt CreateReleaseOption) (*Release, *Response, error)deprecated
- func (c *Client) CreateReleaseAttachment(ctx context.Context, user, repo string, release int64, file io.Reader, ...) (*Attachment, *Response, error)deprecated
- func (c *Client) CreateRepo(ctx context.Context, opt CreateRepoOption) (*Repository, *Response, error)deprecated
- func (c *Client) CreateRepoActionRunnerRegistrationToken(ctx context.Context, owner, repo string) (*RegistrationToken, *Response, error)deprecated
- func (c *Client) CreateRepoActionSecret(ctx context.Context, user, repo, secretName string, ...) (*Response, error)deprecated
- func (c *Client) CreateRepoActionVariable(ctx context.Context, user, repo, variableName, value string) (*Response, error)deprecated
- func (c *Client) CreateRepoFromTemplate(ctx context.Context, templateOwner, templateRepo string, ...) (*Repository, *Response, error)deprecated
- func (c *Client) CreateRepoHook(ctx context.Context, user, repo string, opt CreateHookOption) (*Hook, *Response, error)deprecated
- func (c *Client) CreateReviewRequests(ctx context.Context, owner, repo string, index int64, ...) (*Response, error)deprecated
- func (c *Client) CreateStatus(ctx context.Context, owner, repo, sha string, opts CreateStatusOption) (*Status, *Response, error)deprecated
- func (c *Client) CreateTag(ctx context.Context, user, repo string, opt CreateTagOption) (*Tag, *Response, error)deprecated
- func (c *Client) CreateTagProtection(ctx context.Context, owner, repo string, opt CreateTagProtectionOption) (*TagProtection, *Response, error)deprecated
- func (c *Client) CreateTeam(ctx context.Context, org string, opt CreateTeamOption) (*Team, *Response, error)deprecated
- func (c *Client) CreateUserActionRunnerRegistrationToken(ctx context.Context) (*RegistrationToken, *Response, error)deprecated
- func (c *Client) CreateUserActionSecret(ctx context.Context, secretName string, opt CreateOrUpdateSecretOption) (*Response, error)deprecated
- func (c *Client) CreateUserActionVariable(ctx context.Context, variableName string, opt CreateActionsVariableOption) (*Response, error)deprecated
- func (c *Client) CreateWikiPage(ctx context.Context, owner, repo string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)deprecated
- func (c *Client) DeleteAccessToken(ctx context.Context, value interface{}) (*Response, error)deprecated
- func (c *Client) DeleteAdminActionRunner(ctx context.Context, runnerID int64) (*Response, error)deprecated
- func (c *Client) DeleteAdminHook(ctx context.Context, id int64) (*Response, error)deprecated
- func (c *Client) DeleteBranchProtection(ctx context.Context, owner, repo, name string) (*Response, error)deprecated
- func (c *Client) DeleteCollaborator(ctx context.Context, user, repo, collaborator string) (*Response, error)deprecated
- func (c *Client) DeleteDeployKey(ctx context.Context, owner, repo string, keyID int64) (*Response, error)deprecated
- func (c *Client) DeleteEmail(ctx context.Context, opt DeleteEmailOption) (*Response, error)deprecated
- func (c *Client) DeleteFile(ctx context.Context, owner, repo, filepath string, opt DeleteFileOptions) (*Response, error)deprecated
- func (c *Client) DeleteGPGKey(ctx context.Context, keyID int64) (*Response, error)deprecated
- func (c *Client) DeleteIssue(ctx context.Context, user, repo string, id int64) (*Response, error)deprecated
- func (c *Client) DeleteIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64) (*Response, error)deprecated
- func (c *Client) DeleteIssueComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)deprecated
- func (c *Client) DeleteIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64) (*Response, error)deprecated
- func (c *Client) DeleteIssueCommentReaction(ctx context.Context, owner, repo string, commentID int64, reaction string) (*Response, error)deprecated
- func (c *Client) DeleteIssueLabel(ctx context.Context, owner, repo string, index, label int64) (*Response, error)deprecated
- func (c *Client) DeleteIssueReaction(ctx context.Context, owner, repo string, index int64, reaction string) (*Response, error)deprecated
- func (c *Client) DeleteIssueStopwatch(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) DeleteIssueSubscription(ctx context.Context, owner, repo string, index int64, user string) (*Response, error)deprecated
- func (c *Client) DeleteLabel(ctx context.Context, owner, repo string, id int64) (*Response, error)deprecated
- func (c *Client) DeleteMilestone(ctx context.Context, owner, repo string, id int64) (*Response, error)deprecated
- func (c *Client) DeleteMilestoneByName(ctx context.Context, owner, repo, name string) (*Response, error)deprecated
- func (c *Client) DeleteMyHook(ctx context.Context, id int64) (*Response, error)deprecated
- func (c *Client) DeleteOauth2(ctx context.Context, oauth2id int64) (*Response, error)deprecated
- func (c *Client) DeleteOrg(ctx context.Context, orgname string) (*Response, error)deprecated
- func (c *Client) DeleteOrgActionRunner(ctx context.Context, org string, runnerID int64) (*Response, error)deprecated
- func (c *Client) DeleteOrgActionSecret(ctx context.Context, org, secretName string) (*Response, error)deprecated
- func (c *Client) DeleteOrgActionVariable(ctx context.Context, org, name string) (*Response, error)deprecated
- func (c *Client) DeleteOrgAvatar(ctx context.Context, org string) (*Response, error)deprecated
- func (c *Client) DeleteOrgHook(ctx context.Context, org string, id int64) (*Response, error)deprecated
- func (c *Client) DeleteOrgLabel(ctx context.Context, orgName string, labelID int64) (*Response, error)deprecated
- func (c *Client) DeleteOrgMembership(ctx context.Context, org, user string) (*Response, error)deprecated
- func (c *Client) DeletePackage(ctx context.Context, owner, packageType, name, version string) (*Response, error)deprecated
- func (c *Client) DeletePublicKey(ctx context.Context, keyID int64) (*Response, error)deprecated
- func (c *Client) DeletePullReview(ctx context.Context, owner, repo string, index, id int64) (*Response, error)deprecated
- func (c *Client) DeletePushMirror(ctx context.Context, user, repo, remoteName string) (*Response, error)deprecated
- func (c *Client) DeleteRelease(ctx context.Context, user, repo string, id int64) (*Response, error)deprecated
- func (c *Client) DeleteReleaseAttachment(ctx context.Context, user, repo string, release, id int64) (*Response, error)deprecated
- func (c *Client) DeleteReleaseByTag(ctx context.Context, user, repo, tag string) (*Response, error)deprecated
- func (c *Client) DeleteRepo(ctx context.Context, owner, repo string) (*Response, error)deprecated
- func (c *Client) DeleteRepoActionArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Response, error)deprecated
- func (c *Client) DeleteRepoActionRun(ctx context.Context, owner, repo string, runID int64) (*Response, error)deprecated
- func (c *Client) DeleteRepoActionRunner(ctx context.Context, owner, repo string, runnerID int64) (*Response, error)deprecated
- func (c *Client) DeleteRepoActionSecret(ctx context.Context, user, repo, secretName string) (*Response, error)deprecated
- func (c *Client) DeleteRepoActionVariable(ctx context.Context, user, reponame, variableName string) (*Response, error)deprecated
- func (c *Client) DeleteRepoAvatar(ctx context.Context, owner, repo string) (*Response, error)deprecated
- func (c *Client) DeleteRepoBranch(ctx context.Context, user, repo, branch string) (bool, *Response, error)deprecated
- func (c *Client) DeleteRepoGitHook(ctx context.Context, user, repo, id string) (*Response, error)deprecated
- func (c *Client) DeleteRepoHook(ctx context.Context, user, repo string, id int64) (*Response, error)deprecated
- func (c *Client) DeleteRepoTopic(ctx context.Context, user, repo, topic string) (*Response, error)deprecated
- func (c *Client) DeleteReviewRequests(ctx context.Context, owner, repo string, index int64, ...) (*Response, error)deprecated
- func (c *Client) DeleteTag(ctx context.Context, user, repo, tag string) (*Response, error)deprecated
- func (c *Client) DeleteTagProtection(ctx context.Context, owner, repo string, id int64) (*Response, error)deprecated
- func (c *Client) DeleteTeam(ctx context.Context, id int64) (*Response, error)deprecated
- func (c *Client) DeleteTime(ctx context.Context, owner, repo string, index, timeID int64) (*Response, error)deprecated
- func (c *Client) DeleteUnadoptedRepo(ctx context.Context, owner, repo string) (*Response, error)deprecated
- func (c *Client) DeleteUserActionRunner(ctx context.Context, runnerID int64) (*Response, error)deprecated
- func (c *Client) DeleteUserActionSecret(ctx context.Context, secretName string) (*Response, error)deprecated
- func (c *Client) DeleteUserActionVariable(ctx context.Context, variableName string) (*Response, error)deprecated
- func (c *Client) DeleteUserAvatar(ctx context.Context) (*Response, error)deprecated
- func (c *Client) DeleteUserBadge(ctx context.Context, username string, opt UserBadgeOption) (*Response, error)deprecated
- func (c *Client) DeleteWikiPage(ctx context.Context, owner, repo, pageName string) (*Response, error)deprecated
- func (c *Client) DisableRepoActionWorkflow(ctx context.Context, owner, repo, workflowID string) (*Response, error)deprecated
- func (c *Client) DismissPullReview(ctx context.Context, owner, repo string, index, id int64, ...) (*Response, error)deprecated
- func (c *Client) DispatchRepoActionWorkflow(ctx context.Context, owner, repo, workflowID string, ...) (*RunDetails, *Response, error)deprecated
- func (c *Client) EditAdminHook(ctx context.Context, id int64, opt EditHookOption) (*Hook, *Response, error)deprecated
- func (c *Client) EditBranchProtection(ctx context.Context, owner, repo, name string, opt EditBranchProtectionOption) (*BranchProtection, *Response, error)deprecated
- func (c *Client) EditIssue(ctx context.Context, owner, repo string, index int64, opt EditIssueOption) (*Issue, *Response, error)deprecated
- func (c *Client) EditIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64, ...) (*Attachment, *Response, error)deprecated
- func (c *Client) EditIssueComment(ctx context.Context, owner, repo string, commentID int64, ...) (*Comment, *Response, error)deprecated
- func (c *Client) EditIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64, ...) (*Attachment, *Response, error)deprecated
- func (c *Client) EditLabel(ctx context.Context, owner, repo string, id int64, opt EditLabelOption) (*Label, *Response, error)deprecated
- func (c *Client) EditMilestone(ctx context.Context, owner, repo string, id int64, opt EditMilestoneOption) (*Milestone, *Response, error)deprecated
- func (c *Client) EditMilestoneByName(ctx context.Context, owner, repo, name string, opt EditMilestoneOption) (*Milestone, *Response, error)deprecated
- func (c *Client) EditMyHook(ctx context.Context, id int64, opt EditHookOption) (*Response, error)deprecated
- func (c *Client) EditOrg(ctx context.Context, orgname string, opt EditOrgOption) (*Response, error)deprecated
- func (c *Client) EditOrgHook(ctx context.Context, org string, id int64, opt EditHookOption) (*Response, error)deprecated
- func (c *Client) EditOrgLabel(ctx context.Context, orgName string, labelID int64, opt EditOrgLabelOption) (*Label, *Response, error)deprecated
- func (c *Client) EditPullRequest(ctx context.Context, owner, repo string, index int64, ...) (*PullRequest, *Response, error)deprecated
- func (c *Client) EditRelease(ctx context.Context, owner, repo string, id int64, form EditReleaseOption) (*Release, *Response, error)deprecated
- func (c *Client) EditReleaseAttachment(ctx context.Context, user, repo string, release, attachment int64, ...) (*Attachment, *Response, error)deprecated
- func (c *Client) EditRepo(ctx context.Context, owner, reponame string, opt EditRepoOption) (*Repository, *Response, error)deprecated
- func (c *Client) EditRepoGitHook(ctx context.Context, user, repo, id string, opt EditGitHookOption) (*Response, error)deprecated
- func (c *Client) EditRepoHook(ctx context.Context, user, repo string, id int64, opt EditHookOption) (*Response, error)deprecated
- func (c *Client) EditTagProtection(ctx context.Context, owner, repo string, id int64, opt EditTagProtectionOption) (*TagProtection, *Response, error)deprecated
- func (c *Client) EditTeam(ctx context.Context, id int64, opt EditTeamOption) (*Response, error)deprecated
- func (c *Client) EditWikiPage(ctx context.Context, owner, repo, pageName string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)deprecated
- func (c *Client) EnableRepoActionWorkflow(ctx context.Context, owner, repo, workflowID string) (*Response, error)deprecated
- func (c *Client) Follow(ctx context.Context, target string) (*Response, error)deprecated
- func (c *Client) GetActivityPubPerson(ctx context.Context, userID int64) (ActivityPub, *Response, error)deprecated
- func (c *Client) GetActivityPubPersonResponse(ctx context.Context, userID int64) ([]byte, *Response, error)deprecated
- func (c *Client) GetAdminActionRunner(ctx context.Context, runnerID int64) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) GetAdminHook(ctx context.Context, id int64) (*Hook, *Response, error)deprecated
- func (c *Client) GetAnnotatedTag(ctx context.Context, user, repo, sha string) (*AnnotatedTag, *Response, error)deprecated
- func (c *Client) GetArchive(ctx context.Context, owner, repo, ref string, ext ArchiveType) ([]byte, *Response, error)deprecated
- func (c *Client) GetArchiveReader(ctx context.Context, owner, repo, ref string, ext ArchiveType) (io.ReadCloser, *Response, error)deprecated
- func (c *Client) GetAssignees(ctx context.Context, user, repo string) ([]*User, *Response, error)deprecated
- func (c *Client) GetBlob(ctx context.Context, user, repo, sha string) (*GitBlobResponse, *Response, error)deprecated
- func (c *Client) GetBranchProtection(ctx context.Context, owner, repo, name string) (*BranchProtection, *Response, error)deprecated
- func (c *Client) GetCombinedStatus(ctx context.Context, owner, repo, ref string) (*CombinedStatus, *Response, error)deprecated
- func (c *Client) GetCommitDiff(ctx context.Context, user, repo, commitID string) ([]byte, *Response, error)deprecated
- func (c *Client) GetCommitPatch(ctx context.Context, user, repo, commitID string) ([]byte, *Response, error)deprecated
- func (c *Client) GetCommitPullRequest(ctx context.Context, owner, repo, sha string) (*PullRequest, *Response, error)deprecated
- func (c *Client) GetContents(ctx context.Context, owner, repo, ref, filepath string) (*ContentsResponse, *Response, error)deprecated
- func (c *Client) GetContentsExt(ctx context.Context, owner, repo, filepath string, opt GetContentsExtOptions) (*ContentsExtResponse, *Response, error)deprecated
- func (c *Client) GetDeployKey(ctx context.Context, user, repo string, keyID int64) (*DeployKey, *Response, error)deprecated
- func (c *Client) GetEditorConfig(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)deprecated
- func (c *Client) GetFile(ctx context.Context, owner, repo, ref, filepath string, resolveLFS ...bool) ([]byte, *Response, error)deprecated
- func (c *Client) GetFileReader(ctx context.Context, owner, repo, ref, filepath string, resolveLFS ...bool) (io.ReadCloser, *Response, error)deprecated
- func (c *Client) GetGPGKey(ctx context.Context, keyID int64) (*GPGKey, *Response, error)deprecated
- func (c *Client) GetGPGKeyVerificationToken(ctx context.Context) (string, *Response, error)deprecated
- func (c *Client) GetGitignoreTemplateInfo(ctx context.Context, name string) (*GitignoreTemplateInfo, *Response, error)deprecated
- func (c *Client) GetGlobalAPISettings(ctx context.Context) (*GlobalAPISettings, *Response, error)deprecated
- func (c *Client) GetGlobalAttachmentSettings(ctx context.Context) (*GlobalAttachmentSettings, *Response, error)deprecated
- func (c *Client) GetGlobalRepoSettings(ctx context.Context) (*GlobalRepoSettings, *Response, error)deprecated
- func (c *Client) GetGlobalUISettings(ctx context.Context) (*GlobalUISettings, *Response, error)deprecated
- func (c *Client) GetIssue(ctx context.Context, owner, repo string, index int64) (*Issue, *Response, error)deprecated
- func (c *Client) GetIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64) (*Attachment, *Response, error)deprecated
- func (c *Client) GetIssueComment(ctx context.Context, owner, repo string, id int64) (*Comment, *Response, error)deprecated
- func (c *Client) GetIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64) (*Attachment, *Response, error)deprecated
- func (c *Client) GetIssueCommentReactions(ctx context.Context, owner, repo string, commentID int64) ([]*Reaction, *Response, error)deprecated
- func (c *Client) GetIssueConfig(ctx context.Context, owner, repo string) (*IssueConfig, *Response, error)deprecated
- func (c *Client) GetIssueLabels(ctx context.Context, owner, repo string, index int64, opts ListLabelsOptions) ([]*Label, *Response, error)deprecated
- func (c *Client) GetIssueTemplates(ctx context.Context, owner, repo string) ([]*IssueTemplate, *Response, error)deprecated
- func (c *Client) GetLabelTemplate(ctx context.Context, name string) ([]*LabelTemplate, *Response, error)deprecated
- func (c *Client) GetLatestPackage(ctx context.Context, owner, packageType, name string) (*Package, *Response, error)deprecated
- func (c *Client) GetLatestRelease(ctx context.Context, owner, repo string) (*Release, *Response, error)deprecated
- func (c *Client) GetLicenseTemplateInfo(ctx context.Context, name string) (*LicenseTemplateInfo, *Response, error)deprecated
- func (c *Client) GetMilestone(ctx context.Context, owner, repo string, id int64) (*Milestone, *Response, error)deprecated
- func (c *Client) GetMilestoneByName(ctx context.Context, owner, repo, name string) (*Milestone, *Response, error)deprecated
- func (c *Client) GetMyHook(ctx context.Context, id int64) (*Hook, *Response, error)deprecated
- func (c *Client) GetMyStarredRepos(ctx context.Context) ([]*Repository, *Response, error)deprecated
- func (c *Client) GetMyUserInfo(ctx context.Context) (*User, *Response, error)deprecated
- func (c *Client) GetMyWatchedRepos(ctx context.Context) ([]*Repository, *Response, error)deprecated
- func (c *Client) GetNodeInfo(ctx context.Context) (*NodeInfo, *Response, error)deprecated
- func (c *Client) GetNotification(ctx context.Context, id int64) (*NotificationThread, *Response, error)deprecated
- func (c *Client) GetOauth2(ctx context.Context, oauth2id int64) (*OAuth2Application, *Response, error)deprecated
- func (c *Client) GetOrg(ctx context.Context, orgname string) (*Organization, *Response, error)deprecated
- func (c *Client) GetOrgActionRunner(ctx context.Context, org string, runnerID int64) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) GetOrgActionVariable(ctx context.Context, org, name string) (*ActionsVariable, *Response, error)deprecated
- func (c *Client) GetOrgHook(ctx context.Context, org string, id int64) (*Hook, *Response, error)deprecated
- func (c *Client) GetOrgLabel(ctx context.Context, orgName string, labelID int64) (*Label, *Response, error)deprecated
- func (c *Client) GetOrgPermissions(ctx context.Context, org, user string) (*OrgPermissions, *Response, error)deprecated
- func (c *Client) GetPackage(ctx context.Context, owner, packageType, name, version string) (*Package, *Response, error)deprecated
- func (c *Client) GetPublicKey(ctx context.Context, keyID int64) (*PublicKey, *Response, error)deprecated
- func (c *Client) GetPullRequest(ctx context.Context, owner, repo string, index int64) (*PullRequest, *Response, error)deprecated
- func (c *Client) GetPullRequestByBaseHead(ctx context.Context, owner, repo, base, head string) (*PullRequest, *Response, error)deprecated
- func (c *Client) GetPullRequestDiff(ctx context.Context, owner, repo string, index int64, ...) ([]byte, *Response, error)deprecated
- func (c *Client) GetPullRequestPatch(ctx context.Context, owner, repo string, index int64) ([]byte, *Response, error)deprecated
- func (c *Client) GetPullReview(ctx context.Context, owner, repo string, index, id int64) (*PullReview, *Response, error)deprecated
- func (c *Client) GetPushMirrorByRemoteName(ctx context.Context, user, repo, remoteName string) (*PushMirrorResponse, *Response, error)deprecated
- func (c *Client) GetRawFile(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)deprecated
- func (c *Client) GetRawFileOrLFS(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)deprecated
- func (c *Client) GetRelease(ctx context.Context, owner, repo string, id int64) (*Release, *Response, error)deprecated
- func (c *Client) GetReleaseAttachment(ctx context.Context, user, repo string, release, id int64) (*Attachment, *Response, error)deprecated
- func (c *Client) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*Release, *Response, error)deprecated
- func (c *Client) GetRepo(ctx context.Context, owner, reponame string) (*Repository, *Response, error)deprecated
- func (c *Client) GetRepoActionArtifact(ctx context.Context, owner, repo string, artifactID int64) (*ActionsArtifact, *Response, error)deprecated
- func (c *Client) GetRepoActionArtifactArchive(ctx context.Context, owner, repo string, artifactID int64) ([]byte, *Response, error)deprecated
- func (c *Client) GetRepoActionArtifactArchiveReader(ctx context.Context, owner, repo string, artifactID int64) (io.ReadCloser, *Response, error)deprecated
- func (c *Client) GetRepoActionJob(ctx context.Context, owner, repo string, jobID int64) (*ActionsWorkflowJob, *Response, error)deprecated
- func (c *Client) GetRepoActionJobLogs(ctx context.Context, owner, repo string, jobID int64) ([]byte, *Response, error)deprecated
- func (c *Client) GetRepoActionRun(ctx context.Context, owner, repo string, runID int64) (*ActionsWorkflowRun, *Response, error)deprecated
- func (c *Client) GetRepoActionRunner(ctx context.Context, owner, repo string, runnerID int64) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) GetRepoActionVariable(ctx context.Context, user, repo, variableName string) (*RepoActionsVariable, *Response, error)deprecated
- func (c *Client) GetRepoActionWorkflow(ctx context.Context, owner, repo, workflowID string) (*ActionsWorkflow, *Response, error)deprecated
- func (c *Client) GetRepoBranch(ctx context.Context, user, repo, branch string) (*Branch, *Response, error)deprecated
- func (c *Client) GetRepoByID(ctx context.Context, id int64) (*Repository, *Response, error)deprecated
- func (c *Client) GetRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)deprecated
- func (c *Client) GetRepoGitHook(ctx context.Context, user, repo, id string) (*GitHook, *Response, error)deprecated
- func (c *Client) GetRepoHook(ctx context.Context, user, repo string, id int64) (*Hook, *Response, error)deprecated
- func (c *Client) GetRepoLabel(ctx context.Context, owner, repo string, id int64) (*Label, *Response, error)deprecated
- func (c *Client) GetRepoLanguages(ctx context.Context, owner, repo string) (map[string]int64, *Response, error)deprecated
- func (c *Client) GetRepoLicenses(ctx context.Context, owner, repo string) ([]string, *Response, error)deprecated
- func (c *Client) GetRepoNote(ctx context.Context, owner, repo, sha string, opt GetRepoNoteOptions) (*GitNote, *Response, error)deprecated
- func (c *Client) GetRepoRef(ctx context.Context, user, repo, ref string) (*Reference, *Response, error)deprecated
- func (c *Client) GetRepoRefs(ctx context.Context, user, repo, ref string) ([]*Reference, *Response, error)deprecated
- func (c *Client) GetRepoSigningKeyGPG(ctx context.Context, owner, repo string) (string, *Response, error)deprecated
- func (c *Client) GetRepoSigningKeySSH(ctx context.Context, owner, repo string) (string, *Response, error)deprecated
- func (c *Client) GetRepoTeams(ctx context.Context, user, repo string) ([]*Team, *Response, error)deprecated
- func (c *Client) GetReviewers(ctx context.Context, user, repo string) ([]*User, *Response, error)deprecated
- func (c *Client) GetSigningKeyGPG(ctx context.Context) (string, *Response, error)deprecated
- func (c *Client) GetSigningKeySSH(ctx context.Context) (string, *Response, error)deprecated
- func (c *Client) GetSingleCommit(ctx context.Context, user, repo, commitID string) (*Commit, *Response, error)deprecated
- func (c *Client) GetStarredRepos(ctx context.Context, user string) ([]*Repository, *Response, error)deprecated
- func (c *Client) GetTag(ctx context.Context, user, repo, tag string) (*Tag, *Response, error)deprecated
- func (c *Client) GetTagProtection(ctx context.Context, owner, repo string, id int64) (*TagProtection, *Response, error)deprecated
- func (c *Client) GetTeam(ctx context.Context, id int64) (*Team, *Response, error)deprecated
- func (c *Client) GetTeamMember(ctx context.Context, id int64, user string) (*User, *Response, error)deprecated
- func (c *Client) GetTeamRepository(ctx context.Context, id int64, org, repo string) (*Repository, *Response, error)deprecated
- func (c *Client) GetTrees(ctx context.Context, user, repo string, opt ListTreeOptions) (*GitTreeResponse, *Response, error)deprecated
- func (c *Client) GetUserActionRunner(ctx context.Context, runnerID int64) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) GetUserActionVariable(ctx context.Context, variableName string) (*ActionsVariable, *Response, error)deprecated
- func (c *Client) GetUserByID(ctx context.Context, id int64) (*User, *Response, error)deprecated
- func (c *Client) GetUserHeatmap(ctx context.Context, username string) ([]*UserHeatmapData, *Response, error)deprecated
- func (c *Client) GetUserInfo(ctx context.Context, user string) (*User, *Response, error)deprecated
- func (c *Client) GetUserSettings(ctx context.Context) (*UserSettings, *Response, error)deprecated
- func (c *Client) GetUserTrackedTimes(ctx context.Context, owner, repo, user string) ([]*TrackedTime, *Response, error)deprecated
- func (c *Client) GetWatchedRepos(ctx context.Context, user string) ([]*Repository, *Response, error)deprecated
- func (c *Client) GetWikiPage(ctx context.Context, owner, repo, pageName string) (*WikiPage, *Response, error)deprecated
- func (c *Client) GetWikiPageRevisions(ctx context.Context, owner, repo, pageName string, ...) (*WikiCommitList, *Response, error)deprecated
- func (c *Client) IsCollaborator(ctx context.Context, user, repo, collaborator string) (bool, *Response, error)deprecated
- func (c *Client) IsFollowing(ctx context.Context, target string) (bool, *Response)deprecated
- func (c *Client) IsPullRequestMerged(ctx context.Context, owner, repo string, index int64) (bool, *Response, error)deprecated
- func (c *Client) IsRepoStarring(ctx context.Context, user, repo string) (bool, *Response, error)deprecated
- func (c *Client) IsUserFollowing(ctx context.Context, user, target string) (bool, *Response)deprecated
- func (c *Client) IssueSubscribe(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) IssueUnSubscribe(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) LinkPackage(ctx context.Context, owner, packageType, name, repoName string) (*Response, error)deprecated
- func (c *Client) ListAccessTokens(ctx context.Context, opts ListAccessTokensOptions) ([]*AccessToken, *Response, error)deprecated
- func (c *Client) ListAdminActionJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)deprecated
- func (c *Client) ListAdminActionRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)deprecated
- func (c *Client) ListAdminActionRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)deprecated
- func (c *Client) ListAdminEmails(ctx context.Context, opt ListAdminEmailsOptions) ([]*Email, *Response, error)deprecated
- func (c *Client) ListAdminHooks(ctx context.Context, opt ListGlobalHooksOptions) ([]*Hook, *Response, error)deprecated
- func (c *Client) ListAllGitRefs(ctx context.Context, owner, repo string) ([]*Reference, *Response, error)deprecated
- func (c *Client) ListBranchProtections(ctx context.Context, owner, repo string, opt ListBranchProtectionsOptions) ([]*BranchProtection, *Response, error)deprecated
- func (c *Client) ListCollaborators(ctx context.Context, user, repo string, opt ListCollaboratorsOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListContents(ctx context.Context, owner, repo, ref, filepath string) ([]*ContentsResponse, *Response, error)deprecated
- func (c *Client) ListCronTasks(ctx context.Context, opt ListCronTaskOptions) ([]*CronTask, *Response, error)deprecated
- func (c *Client) ListDeployKeys(ctx context.Context, user, repo string, opt ListDeployKeysOptions) ([]*DeployKey, *Response, error)deprecated
- func (c *Client) ListEmails(ctx context.Context, opt ListEmailsOptions) ([]*Email, *Response, error)deprecated
- func (c *Client) ListFollowers(ctx context.Context, user string, opt ListFollowersOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListFollowing(ctx context.Context, user string, opt ListFollowingOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListForks(ctx context.Context, user, repo string, opt ListForksOptions) ([]*Repository, *Response, error)deprecated
- func (c *Client) ListGPGKeys(ctx context.Context, user string, opt ListGPGKeysOptions) ([]*GPGKey, *Response, error)deprecated
- func (c *Client) ListGitignoresTemplates(ctx context.Context) ([]string, *Response, error)deprecated
- func (c *Client) ListIssueAttachments(ctx context.Context, owner, repo string, index int64) ([]*Attachment, *Response, error)deprecated
- func (c *Client) ListIssueBlocks(ctx context.Context, owner, repo string, index int64, ...) ([]*Issue, *Response, error)deprecated
- func (c *Client) ListIssueCommentAttachments(ctx context.Context, owner, repo string, commentID int64) ([]*Attachment, *Response, error)deprecated
- func (c *Client) ListIssueComments(ctx context.Context, owner, repo string, index int64, ...) ([]*Comment, *Response, error)deprecated
- func (c *Client) ListIssueDependencies(ctx context.Context, owner, repo string, index int64, ...) ([]*Issue, *Response, error)deprecated
- func (c *Client) ListIssueReactions(ctx context.Context, owner, repo string, index int64, ...) ([]*Reaction, *Response, error)deprecated
- func (c *Client) ListIssueSubscribers(ctx context.Context, owner, repo string, index int64, ...) ([]*User, *Response, error)deprecated
- func (c *Client) ListIssueTimeline(ctx context.Context, owner, repo string, index int64, ...) ([]*TimelineComment, *Response, error)deprecated
- func (c *Client) ListIssueTrackedTimes(ctx context.Context, owner, repo string, index int64, ...) ([]*TrackedTime, *Response, error)deprecated
- func (c *Client) ListIssues(ctx context.Context, opt ListIssueOption) ([]*Issue, *Response, error)deprecated
- func (c *Client) ListLabelTemplates(ctx context.Context) ([]string, *Response, error)deprecated
- func (c *Client) ListLicenseTemplates(ctx context.Context) ([]*LicensesTemplateListEntry, *Response, error)deprecated
- func (c *Client) ListMyBlocks(ctx context.Context, opt ListUserBlocksOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListMyFollowers(ctx context.Context, opt ListFollowersOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListMyFollowing(ctx context.Context, opt ListFollowingOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListMyGPGKeys(ctx context.Context, opt *ListGPGKeysOptions) ([]*GPGKey, *Response, error)deprecated
- func (c *Client) ListMyHooks(ctx context.Context, opt ListHooksOptions) ([]*Hook, *Response, error)deprecated
- func (c *Client) ListMyOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)deprecated
- func (c *Client) ListMyPublicKeys(ctx context.Context, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)deprecated
- func (c *Client) ListMyRepos(ctx context.Context, opt ListReposOptions) ([]*Repository, *Response, error)deprecated
- func (c *Client) ListMyStopwatches(ctx context.Context, opt ListStopwatchesOptions) ([]*StopWatch, *Response, error)deprecated
- func (c *Client) ListMyTeams(ctx context.Context, opt *ListTeamsOptions) ([]*Team, *Response, error)deprecated
- func (c *Client) ListMyTrackedTimes(ctx context.Context, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)deprecated
- func (c *Client) ListNotifications(ctx context.Context, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)deprecated
- func (c *Client) ListOauth2(ctx context.Context, opt ListApplicationsOptions) ([]*OAuth2Application, *Response, error)deprecated
- func (c *Client) ListOrgActionJobs(ctx context.Context, org string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)deprecated
- func (c *Client) ListOrgActionRunners(ctx context.Context, org string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)deprecated
- func (c *Client) ListOrgActionRuns(ctx context.Context, org string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)deprecated
- func (c *Client) ListOrgActionSecret(ctx context.Context, org string, opt ListOrgActionsSecretOption) ([]*Secret, *Response, error)deprecated
- func (c *Client) ListOrgActionVariable(ctx context.Context, org string, opt ListOrgActionsVariableOption) ([]*ActionsVariable, *Response, error)deprecated
- func (c *Client) ListOrgActivityFeeds(ctx context.Context, org string, opt ListOrgActivityFeedsOptions) ([]*Activity, *Response, error)deprecated
- func (c *Client) ListOrgBlocks(ctx context.Context, org string, opt ListOrgBlocksOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListOrgHooks(ctx context.Context, org string, opt ListHooksOptions) ([]*Hook, *Response, error)deprecated
- func (c *Client) ListOrgLabels(ctx context.Context, orgName string, opt ListOrgLabelsOptions) ([]*Label, *Response, error)deprecated
- func (c *Client) ListOrgMembership(ctx context.Context, org string, opt ListOrgMembershipOption) ([]*User, *Response, error)deprecated
- func (c *Client) ListOrgRepos(ctx context.Context, org string, opt ListOrgReposOptions) ([]*Repository, *Response, error)deprecated
- func (c *Client) ListOrgTeams(ctx context.Context, org string, opt ListTeamsOptions) ([]*Team, *Response, error)deprecated
- func (c *Client) ListOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)deprecated
- func (c *Client) ListPackageFiles(ctx context.Context, owner, packageType, name, version string) ([]*PackageFile, *Response, error)deprecated
- func (c *Client) ListPackageVersions(ctx context.Context, owner, packageType, name string, opt ListPackagesOptions) ([]*Package, *Response, error)deprecated
- func (c *Client) ListPackages(ctx context.Context, owner string, opt ListPackagesOptions) ([]*Package, *Response, error)deprecated
- func (c *Client) ListPublicKeys(ctx context.Context, user string, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)deprecated
- func (c *Client) ListPublicOrgMembership(ctx context.Context, org string, opt ListOrgMembershipOption) ([]*User, *Response, error)deprecated
- func (c *Client) ListPullRequestCommits(ctx context.Context, owner, repo string, index int64, ...) ([]*Commit, *Response, error)deprecated
- func (c *Client) ListPullRequestFiles(ctx context.Context, owner, repo string, index int64, ...) ([]*ChangedFile, *Response, error)deprecated
- func (c *Client) ListPullReviewComments(ctx context.Context, owner, repo string, index, id int64) ([]*PullReviewComment, *Response, error)deprecated
- func (c *Client) ListPullReviews(ctx context.Context, owner, repo string, index int64, ...) ([]*PullReview, *Response, error)deprecated
- func (c *Client) ListPushMirrors(ctx context.Context, user, repo string, opt ListOptions) ([]*PushMirrorResponse, *Response, error)deprecated
- func (c *Client) ListReleaseAttachments(ctx context.Context, user, repo string, release int64, ...) ([]*Attachment, *Response, error)deprecated
- func (c *Client) ListReleases(ctx context.Context, owner, repo string, opt ListReleasesOptions) ([]*Release, *Response, error)deprecated
- func (c *Client) ListRepoActionArtifacts(ctx context.Context, owner, repo string, opt ListActionsArtifactsOptions) (*ActionsArtifactsResponse, *Response, error)deprecated
- func (c *Client) ListRepoActionJobs(ctx context.Context, owner, repo string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)deprecated
- func (c *Client) ListRepoActionRunArtifacts(ctx context.Context, owner, repo string, runID int64, ...) (*ActionsArtifactsResponse, *Response, error)deprecated
- func (c *Client) ListRepoActionRunJobs(ctx context.Context, owner, repo string, runID int64, ...) (*ActionsWorkflowJobsResponse, *Response, error)deprecated
- func (c *Client) ListRepoActionRunners(ctx context.Context, owner, repo string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)deprecated
- func (c *Client) ListRepoActionRuns(ctx context.Context, owner, repo string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)deprecated
- func (c *Client) ListRepoActionSecret(ctx context.Context, user, repo string, opt ListRepoActionsSecretOption) ([]*Secret, *Response, error)deprecated
- func (c *Client) ListRepoActionTasks(ctx context.Context, owner, repo string, opt ListOptions) (*ActionsTaskResponse, *Response, error)deprecated
- func (c *Client) ListRepoActionVariable(ctx context.Context, user, repo string, opt ListRepoActionsVariableOption) ([]*RepoActionsVariable, *Response, error)deprecated
- func (c *Client) ListRepoActionWorkflows(ctx context.Context, owner, repo string) (*ActionsWorkflowResponse, *Response, error)deprecated
- func (c *Client) ListRepoActivityFeeds(ctx context.Context, owner, repo string, opt ListRepoActivityFeedsOptions) ([]*Activity, *Response, error)deprecated
- func (c *Client) ListRepoBranches(ctx context.Context, user, repo string, opt ListRepoBranchesOptions) ([]*Branch, *Response, error)deprecated
- func (c *Client) ListRepoCommits(ctx context.Context, user, repo string, opt ListCommitOptions) ([]*Commit, *Response, error)deprecated
- func (c *Client) ListRepoGitHooks(ctx context.Context, user, repo string, opt ListRepoGitHooksOptions) ([]*GitHook, *Response, error)deprecated
- func (c *Client) ListRepoHooks(ctx context.Context, user, repo string, opt ListHooksOptions) ([]*Hook, *Response, error)deprecated
- func (c *Client) ListRepoIssueComments(ctx context.Context, owner, repo string, opt ListIssueCommentOptions) ([]*Comment, *Response, error)deprecated
- func (c *Client) ListRepoIssues(ctx context.Context, owner, repo string, opt ListIssueOption) ([]*Issue, *Response, error)deprecated
- func (c *Client) ListRepoLabels(ctx context.Context, owner, repo string, opt ListLabelsOptions) ([]*Label, *Response, error)deprecated
- func (c *Client) ListRepoMilestones(ctx context.Context, owner, repo string, opt ListMilestoneOption) ([]*Milestone, *Response, error)deprecated
- func (c *Client) ListRepoNotifications(ctx context.Context, owner, repo string, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)deprecated
- func (c *Client) ListRepoPinnedIssues(ctx context.Context, owner, repo string) ([]*Issue, *Response, error)deprecated
- func (c *Client) ListRepoPinnedPullRequests(ctx context.Context, owner, repo string) ([]*PullRequest, *Response, error)deprecated
- func (c *Client) ListRepoPullRequests(ctx context.Context, owner, repo string, opt ListPullRequestsOptions) ([]*PullRequest, *Response, error)deprecated
- func (c *Client) ListRepoStargazers(ctx context.Context, user, repo string, opt ListStargazersOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListRepoSubscribers(ctx context.Context, owner, repo string, opt ListOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListRepoTags(ctx context.Context, user, repo string, opt ListRepoTagsOptions) ([]*Tag, *Response, error)deprecated
- func (c *Client) ListRepoTopics(ctx context.Context, user, repo string, opt ListRepoTopicsOptions) ([]string, *Response, error)deprecated
- func (c *Client) ListRepoTrackedTimes(ctx context.Context, owner, repo string, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)deprecated
- func (c *Client) ListStatuses(ctx context.Context, owner, repo, ref string, opt ListStatusesOption) ([]*Status, *Response, error)deprecated
- func (c *Client) ListTagProtection(ctx context.Context, owner, repo string, opt ListRepoTagProtectionsOptions) ([]*TagProtection, *Response, error)deprecated
- func (c *Client) ListTeamActivityFeeds(ctx context.Context, teamID int64, opt ListTeamActivityFeedsOptions) ([]*Activity, *Response, error)deprecated
- func (c *Client) ListTeamMembers(ctx context.Context, id int64, opt ListTeamMembersOptions) ([]*User, *Response, error)deprecated
- func (c *Client) ListTeamRepositories(ctx context.Context, id int64, opt ListTeamRepositoriesOptions) ([]*Repository, *Response, error)deprecated
- func (c *Client) ListUnadoptedRepos(ctx context.Context, opt ListUnadoptedReposOptions) ([]string, *Response, error)deprecated
- func (c *Client) ListUserActionJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)deprecated
- func (c *Client) ListUserActionRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)deprecated
- func (c *Client) ListUserActionRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)deprecated
- func (c *Client) ListUserActionVariable(ctx context.Context, opt ListOptions) ([]*ActionsVariable, *Response, error)deprecated
- func (c *Client) ListUserActivityFeeds(ctx context.Context, username string, opt ListUserActivityFeedsOptions) ([]*Activity, *Response, error)deprecated
- func (c *Client) ListUserBadges(ctx context.Context, username string) ([]*Badge, *Response, error)deprecated
- func (c *Client) ListUserOrgs(ctx context.Context, user string, opt ListOrgsOptions) ([]*Organization, *Response, error)deprecated
- func (c *Client) ListUserRepos(ctx context.Context, user string, opt ListReposOptions) ([]*Repository, *Response, error)deprecated
- func (c *Client) ListWikiPages(ctx context.Context, owner, repo string, opt ListWikiPagesOptions) ([]*WikiPageMetaData, *Response, error)deprecated
- func (c *Client) LockIssue(ctx context.Context, owner, repo string, index int64, opt LockIssueOption) (*Response, error)deprecated
- func (c *Client) MergePullRequest(ctx context.Context, owner, repo string, index int64, ...) (bool, *Response, error)deprecated
- func (c *Client) MergeUpstream(ctx context.Context, owner, repo string, opt MergeUpstreamRequest) (*MergeUpstreamResponse, *Response, error)deprecated
- func (c *Client) MigrateRepo(ctx context.Context, opt MigrateRepoOption) (*Repository, *Response, error)deprecated
- func (c *Client) MirrorSync(ctx context.Context, owner, repo string) (*Response, error)deprecated
- func (c *Client) MoveIssuePin(ctx context.Context, owner, repo string, index, position int64) (*Response, error)deprecated
- func (c *Client) PinIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) PostIssueCommentReaction(ctx context.Context, owner, repo string, commentID int64, reaction string) (*Reaction, *Response, error)deprecated
- func (c *Client) PostIssueReaction(ctx context.Context, owner, repo string, index int64, reaction string) (*Reaction, *Response, error)deprecated
- func (c *Client) PostRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)deprecated
- func (c *Client) PushMirrors(ctx context.Context, user, repo string, opt CreatePushMirrorOption) (*PushMirrorResponse, *Response, error)deprecated
- func (c *Client) ReadNotification(ctx context.Context, id int64, status ...NotificationStatus) (*NotificationThread, *Response, error)deprecated
- func (c *Client) ReadNotifications(ctx context.Context, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)deprecated
- func (c *Client) ReadRepoNotifications(ctx context.Context, owner, repo string, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)deprecated
- func (c *Client) RejectRepoTransfer(ctx context.Context, owner, reponame string) (*Repository, *Response, error)deprecated
- func (c *Client) RemoveIssueBlocking(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)deprecated
- func (c *Client) RemoveIssueDependency(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)deprecated
- func (c *Client) RemoveRepoTeam(ctx context.Context, user, repo, team string) (*Response, error)deprecated
- func (c *Client) RemoveTeamMember(ctx context.Context, id int64, user string) (*Response, error)deprecated
- func (c *Client) RemoveTeamRepository(ctx context.Context, id int64, org, repo string) (*Response, error)deprecated
- func (c *Client) RenameOrg(ctx context.Context, org string, opt RenameOrgOption) (*Response, error)deprecated
- func (c *Client) RenameRepoBranch(ctx context.Context, user, repo, branch string, opt RenameRepoBranchOption) (successful bool, resp *Response, err error)deprecated
- func (c *Client) RenderMarkdown(ctx context.Context, opt MarkdownOption) (string, *Response, error)deprecated
- func (c *Client) RenderMarkdownRaw(ctx context.Context, markdown string) (string, *Response, error)deprecated
- func (c *Client) RenderMarkup(ctx context.Context, opt MarkupOption) (string, *Response, error)deprecated
- func (c *Client) ReplaceIssueLabels(ctx context.Context, owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)deprecated
- func (c *Client) RerunRepoActionJob(ctx context.Context, owner, repo string, runID, jobID int64) (*ActionsWorkflowJob, *Response, error)deprecated
- func (c *Client) RerunRepoActionRun(ctx context.Context, owner, repo string, runID int64) (*ActionsWorkflowRun, *Response, error)deprecated
- func (c *Client) RerunRepoActionRunFailedJobs(ctx context.Context, owner, repo string, runID int64) (*Response, error)deprecated
- func (c *Client) ResetIssueTime(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) ResolvePullReviewComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)deprecated
- func (c *Client) RunCronTasks(ctx context.Context, task string) (*Response, error)deprecated
- func (c *Client) SearchAdminEmails(ctx context.Context, opt SearchAdminEmailsOptions) ([]*Email, *Response, error)deprecated
- func (c *Client) SearchOrgTeams(ctx context.Context, org string, opt *SearchTeamsOptions) ([]*Team, *Response, error)deprecated
- func (c *Client) SearchRepos(ctx context.Context, opt SearchRepoOptions) ([]*Repository, *Response, error)deprecated
- func (c *Client) SearchTopics(ctx context.Context, opt TopicSearchOptions) (*TopicSearchResult, *Response, error)deprecated
- func (c *Client) SearchUsers(ctx context.Context, opt SearchUsersOption) ([]*User, *Response, error)deprecated
- func (c *Client) SendActivityPubInbox(ctx context.Context, userID int64, activity ActivityPub) (*Response, error)deprecated
- func (c *Client) ServerVersion(ctx context.Context) (string, *Response, error)deprecated
- func (c *Client) SetBasicAuth(username, password string)
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) SetOTP(otp string)
- func (c *Client) SetPublicOrgMembership(ctx context.Context, org, user string, visible bool) (*Response, error)deprecated
- func (c *Client) SetRepoTopics(ctx context.Context, user, repo string, list []string) (*Response, error)deprecated
- func (c *Client) SetSudo(sudo string)
- func (c *Client) SetUserAgent(userAgent string)
- func (c *Client) StarRepo(ctx context.Context, user, repo string) (*Response, error)deprecated
- func (c *Client) StartIssueStopWatch(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) StopIssueStopWatch(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) SubmitPullReview(ctx context.Context, owner, repo string, index, id int64, ...) (*PullReview, *Response, error)deprecated
- func (c *Client) TestWebhook(ctx context.Context, owner, repo string, hookID int64, ref string) (*Response, error)deprecated
- func (c *Client) TransferRepo(ctx context.Context, owner, reponame string, opt TransferRepoOption) (*Repository, *Response, error)deprecated
- func (c *Client) TriggerPushMirrorsSync(ctx context.Context, owner, repo string) (*Response, error)deprecated
- func (c *Client) UnDismissPullReview(ctx context.Context, owner, repo string, index, id int64) (*Response, error)deprecated
- func (c *Client) UnStarRepo(ctx context.Context, user, repo string) (*Response, error)deprecated
- func (c *Client) UnWatchRepo(ctx context.Context, owner, repo string) (*Response, error)deprecated
- func (c *Client) UnblockOrgUser(ctx context.Context, org, username string) (*Response, error)deprecated
- func (c *Client) UnblockUser(ctx context.Context, username string) (*Response, error)deprecated
- func (c *Client) Unfollow(ctx context.Context, target string) (*Response, error)deprecated
- func (c *Client) UnlinkPackage(ctx context.Context, owner, packageType, name string) (*Response, error)deprecated
- func (c *Client) UnlockIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) UnpinIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) UnresolvePullReviewComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)deprecated
- func (c *Client) UpdateAdminActionRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) UpdateBranchProtectionPriorities(ctx context.Context, owner, repo string, ids []int64) (*Response, error)deprecated
- func (c *Client) UpdateFile(ctx context.Context, owner, repo, filepath string, opt UpdateFileOptions) (*FileResponse, *Response, error)deprecated
- func (c *Client) UpdateIssueDeadline(ctx context.Context, owner, repo string, index int64, opt EditDeadlineOption) (*Issue, *Response, error)deprecated
- func (c *Client) UpdateOauth2(ctx context.Context, oauth2id int64, opt CreateApplicationOption) (*OAuth2Application, *Response, error)deprecated
- func (c *Client) UpdateOrgActionRunner(ctx context.Context, org string, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) UpdateOrgActionVariable(ctx context.Context, org, name string, opt UpdateActionsVariableOption) (*Response, error)deprecated
- func (c *Client) UpdateOrgAvatar(ctx context.Context, org string, opt UpdateUserAvatarOption) (*Response, error)deprecated
- func (c *Client) UpdatePullRequest(ctx context.Context, owner, repo string, index int64) (*Response, error)deprecated
- func (c *Client) UpdateRepoActionRunner(ctx context.Context, owner, repo string, runnerID int64, ...) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) UpdateRepoActionVariable(ctx context.Context, user, repo, variableName, value string) (*Response, error)deprecated
- func (c *Client) UpdateRepoAvatar(ctx context.Context, owner, repo string, opt UpdateRepoAvatarOption) (*Response, error)deprecated
- func (c *Client) UpdateRepoBranchRef(ctx context.Context, user, repo, branch string, opt UpdateRepoBranchRefOption) (successful bool, resp *Response, err error)deprecated
- func (c *Client) UpdateUserActionRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)deprecated
- func (c *Client) UpdateUserActionVariable(ctx context.Context, variableName string, opt UpdateActionsVariableOption) (*Response, error)deprecated
- func (c *Client) UpdateUserAvatar(ctx context.Context, opt UpdateUserAvatarOption) (*Response, error)deprecated
- func (c *Client) UpdateUserSettings(ctx context.Context, opt UserSettingsOptions) (*UserSettings, *Response, error)deprecated
- func (c *Client) ValidateIssueConfig(ctx context.Context, owner, repo string) (*IssueConfigValidation, *Response, error)deprecated
- func (c *Client) VerifyGPGKey(ctx context.Context, opt VerifyGPGKeyOption) (*GPGKey, *Response, error)deprecated
- func (c *Client) WatchRepo(ctx context.Context, owner, repo string) (*Response, error)deprecated
- type ClientOption
- func SetBasicAuth(username, password string) ClientOption
- func SetDebugMode() ClientOption
- func SetGiteaVersion(v string) ClientOption
- func SetHTTPClient(httpClient *http.Client) ClientOption
- func SetOTP(otp string) ClientOption
- func SetSudo(sudo string) ClientOption
- func SetToken(token string) ClientOption
- func SetUserAgent(userAgent string) ClientOption
- func UseSSHCert(principal, sshKey, passphrase string) ClientOption
- func UseSSHPubkey(fingerprint, sshKey, passphrase string) ClientOption
- type CollaboratorPermissionResult
- type CombinedStatus
- type Comment
- type Commit
- type CommitAffectedFiles
- type CommitDateOptions
- type CommitMeta
- type CommitStats
- type CommitUser
- type Compare
- type ContentsExtResponse
- type ContentsResponse
- type CreateAccessTokenOption
- type CreateActionVariableOptiondeprecated
- type CreateActionWorkflowDispatchOptiondeprecated
- type CreateActionsVariableOption
- type CreateActionsWorkflowDispatchOption
- type CreateApplicationOption
- type CreateBranchOption
- type CreateBranchProtectionOption
- type CreateEmailOption
- type CreateFileOptions
- type CreateForkOption
- type CreateGPGKeyOption
- type CreateHookOption
- type CreateIssueCommentOption
- type CreateIssueOption
- type CreateKeyOption
- type CreateLabelOption
- type CreateMilestoneOption
- type CreateOauth2Optiondeprecated
- type CreateOrUpdateSecretOption
- type CreateOrgLabelOption
- type CreateOrgOption
- type CreatePullRequestOption
- type CreatePullReviewComment
- type CreatePullReviewCommentReplyOptions
- type CreatePullReviewOptions
- type CreatePushMirrorOption
- type CreateReleaseOption
- type CreateRepoActionsVariable
- type CreateRepoFromTemplateOption
- type CreateRepoOption
- type CreateStatusOption
- type CreateTagOption
- type CreateTagProtectionOption
- type CreateTeamOption
- type CreateUserOption
- type CreateWikiPageOptions
- type CronTask
- type DeleteEmailOption
- type DeleteFileOptions
- type DeployKey
- type DismissPullReviewOptions
- type EditActionRunnerOptiondeprecated
- type EditActionsRunnerOption
- type EditAttachmentOptions
- type EditBranchProtectionOption
- type EditDeadlineOption
- type EditGitHookOption
- type EditHookOption
- type EditIssueCommentOption
- type EditIssueOption
- type EditLabelOption
- type EditMilestoneOption
- type EditOrgLabelOption
- type EditOrgOption
- type EditPullRequestOption
- type EditReleaseOption
- type EditRepoOption
- type EditTagProtectionOption
- type EditTeamOption
- type EditUserOption
- type Email
- type ErrUnknownVersion
- type ExternalTracker
- type ExternalWiki
- type FileCommitResponse
- type FileDeleteResponse
- type FileLinksResponse
- type FileOptions
- type FileResponse
- type GPGKey
- type GPGKeyEmail
- type GetContentsExtOptions
- type GetFilesOptions
- type GetRepoNoteOptions
- type GitBlobResponse
- type GitEntry
- type GitHook
- type GitIdentity
- type GitNote
- type GitObject
- type GitService
- func (c *GitService) DeleteRepoGitHook(ctx context.Context, user, repo, id string) (*Response, error)
- func (c *GitService) EditRepoGitHook(ctx context.Context, user, repo, id string, opt EditGitHookOption) (*Response, error)
- func (c *GitService) GetBlob(ctx context.Context, user, repo, sha string) (*GitBlobResponse, *Response, error)
- func (c *GitService) GetRepoGitHook(ctx context.Context, user, repo, id string) (*GitHook, *Response, error)
- func (c *GitService) GetRepoNote(ctx context.Context, owner, repo, sha string, opt GetRepoNoteOptions) (*GitNote, *Response, error)
- func (c *GitService) GetRepoRef(ctx context.Context, user, repo, ref string) (*Reference, *Response, error)
- func (c *GitService) GetRepoRefs(ctx context.Context, user, repo, ref string) ([]*Reference, *Response, error)
- func (c *GitService) GetTrees(ctx context.Context, user, repo string, opt ListTreeOptions) (*GitTreeResponse, *Response, error)
- func (c *GitService) ListAllGitRefs(ctx context.Context, owner, repo string) ([]*Reference, *Response, error)
- func (c *GitService) ListRepoGitHooks(ctx context.Context, user, repo string, opt ListRepoGitHooksOptions) ([]*GitHook, *Response, error)
- type GitServiceType
- type GitTreeResponse
- type GitignoreTemplateInfo
- type GlobalAPISettings
- type GlobalAttachmentSettings
- type GlobalRepoSettings
- type GlobalUISettings
- type HTTPSign
- type HTTPSignConfig
- type Hook
- type HookType
- type HooksService
- func (c *HooksService) CreateGlobalHook(ctx context.Context, opt CreateHookOption) (*Hook, *Response, error)
- func (c *HooksService) CreateMyHook(ctx context.Context, opt CreateHookOption) (*Hook, *Response, error)
- func (c *HooksService) CreateOrgHook(ctx context.Context, org string, opt CreateHookOption) (*Hook, *Response, error)
- func (c *HooksService) CreateRepoHook(ctx context.Context, user, repo string, opt CreateHookOption) (*Hook, *Response, error)
- func (c *HooksService) DeleteGlobalHook(ctx context.Context, id int64) (*Response, error)
- func (c *HooksService) DeleteMyHook(ctx context.Context, id int64) (*Response, error)
- func (c *HooksService) DeleteOrgHook(ctx context.Context, org string, id int64) (*Response, error)
- func (c *HooksService) DeleteRepoHook(ctx context.Context, user, repo string, id int64) (*Response, error)
- func (c *HooksService) EditGlobalHook(ctx context.Context, id int64, opt EditHookOption) (*Hook, *Response, error)
- func (c *HooksService) EditMyHook(ctx context.Context, id int64, opt EditHookOption) (*Response, error)
- func (c *HooksService) EditOrgHook(ctx context.Context, org string, id int64, opt EditHookOption) (*Response, error)
- func (c *HooksService) EditRepoHook(ctx context.Context, user, repo string, id int64, opt EditHookOption) (*Response, error)
- func (c *HooksService) GetGlobalHook(ctx context.Context, id int64) (*Hook, *Response, error)
- func (c *HooksService) GetMyHook(ctx context.Context, id int64) (*Hook, *Response, error)
- func (c *HooksService) GetOrgHook(ctx context.Context, org string, id int64) (*Hook, *Response, error)
- func (c *HooksService) GetRepoHook(ctx context.Context, user, repo string, id int64) (*Hook, *Response, error)
- func (c *HooksService) ListGlobalHooks(ctx context.Context, opt ListGlobalHooksOptions) ([]*Hook, *Response, error)
- func (c *HooksService) ListMyHooks(ctx context.Context, opt ListHooksOptions) ([]*Hook, *Response, error)
- func (c *HooksService) ListOrgHooks(ctx context.Context, org string, opt ListHooksOptions) ([]*Hook, *Response, error)
- func (c *HooksService) ListRepoHooks(ctx context.Context, user, repo string, opt ListHooksOptions) ([]*Hook, *Response, error)
- func (c *HooksService) TestWebhook(ctx context.Context, owner, repo string, hookID int64, ref string) (*Response, error)
- type Identitydeprecated
- type InternalTracker
- type Issue
- type IssueBlockedBy
- type IssueConfig
- type IssueConfigContactLink
- type IssueConfigValidation
- type IssueFormElement
- type IssueFormElementAttributes
- type IssueFormElementType
- type IssueFormElementValidations
- type IssueLabelsOption
- type IssueMeta
- type IssueTemplate
- type IssueType
- type IssuesService
- func (c *IssuesService) AddIssueLabels(ctx context.Context, owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
- func (c *IssuesService) AddIssueSubscription(ctx context.Context, owner, repo string, index int64, user string) (*Response, error)
- func (c *IssuesService) AddTime(ctx context.Context, owner, repo string, index int64, opt AddTimeOption) (*TrackedTime, *Response, error)
- func (c *IssuesService) CheckIssueSubscription(ctx context.Context, owner, repo string, index int64) (*WatchInfo, *Response, error)
- func (c *IssuesService) ClearIssueLabels(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) CreateIssue(ctx context.Context, owner, repo string, opt CreateIssueOption) (*Issue, *Response, error)
- func (c *IssuesService) CreateIssueAttachment(ctx context.Context, owner, repo string, index int64, file io.Reader, ...) (*Attachment, *Response, error)
- func (c *IssuesService) CreateIssueBlocking(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
- func (c *IssuesService) CreateIssueComment(ctx context.Context, owner, repo string, index int64, ...) (*Comment, *Response, error)
- func (c *IssuesService) CreateIssueCommentAttachment(ctx context.Context, owner, repo string, commentID int64, file io.Reader, ...) (*Attachment, *Response, error)
- func (c *IssuesService) CreateIssueDependency(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
- func (c *IssuesService) DeleteIssue(ctx context.Context, user, repo string, id int64) (*Response, error)
- func (c *IssuesService) DeleteIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64) (*Response, error)
- func (c *IssuesService) DeleteIssueComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)
- func (c *IssuesService) DeleteIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64) (*Response, error)
- func (c *IssuesService) DeleteIssueCommentReaction(ctx context.Context, owner, repo string, commentID int64, reaction string) (*Response, error)
- func (c *IssuesService) DeleteIssueLabel(ctx context.Context, owner, repo string, index, label int64) (*Response, error)
- func (c *IssuesService) DeleteIssueReaction(ctx context.Context, owner, repo string, index int64, reaction string) (*Response, error)
- func (c *IssuesService) DeleteIssueStopwatch(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) DeleteIssueSubscription(ctx context.Context, owner, repo string, index int64, user string) (*Response, error)
- func (c *IssuesService) DeleteTime(ctx context.Context, owner, repo string, index, timeID int64) (*Response, error)
- func (c *IssuesService) EditIssue(ctx context.Context, owner, repo string, index int64, opt EditIssueOption) (*Issue, *Response, error)
- func (c *IssuesService) EditIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64, ...) (*Attachment, *Response, error)
- func (c *IssuesService) EditIssueComment(ctx context.Context, owner, repo string, commentID int64, ...) (*Comment, *Response, error)
- func (c *IssuesService) EditIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64, ...) (*Attachment, *Response, error)
- func (c *IssuesService) GetIssue(ctx context.Context, owner, repo string, index int64) (*Issue, *Response, error)
- func (c *IssuesService) GetIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64) (*Attachment, *Response, error)
- func (c *IssuesService) GetIssueComment(ctx context.Context, owner, repo string, id int64) (*Comment, *Response, error)
- func (c *IssuesService) GetIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64) (*Attachment, *Response, error)
- func (c *IssuesService) GetIssueCommentReactions(ctx context.Context, owner, repo string, commentID int64) ([]*Reaction, *Response, error)
- func (c *IssuesService) GetIssueLabels(ctx context.Context, owner, repo string, index int64, opts ListLabelsOptions) ([]*Label, *Response, error)
- func (c *IssuesService) GetIssueTemplates(ctx context.Context, owner, repo string) ([]*IssueTemplate, *Response, error)
- func (c *IssuesService) GetUserTrackedTimes(ctx context.Context, owner, repo, user string) ([]*TrackedTime, *Response, error)
- func (c *IssuesService) IssueSubscribe(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) IssueUnSubscribe(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) ListIssueAttachments(ctx context.Context, owner, repo string, index int64) ([]*Attachment, *Response, error)
- func (c *IssuesService) ListIssueBlocks(ctx context.Context, owner, repo string, index int64, ...) ([]*Issue, *Response, error)
- func (c *IssuesService) ListIssueCommentAttachments(ctx context.Context, owner, repo string, commentID int64) ([]*Attachment, *Response, error)
- func (c *IssuesService) ListIssueComments(ctx context.Context, owner, repo string, index int64, ...) ([]*Comment, *Response, error)
- func (c *IssuesService) ListIssueDependencies(ctx context.Context, owner, repo string, index int64, ...) ([]*Issue, *Response, error)
- func (c *IssuesService) ListIssueReactions(ctx context.Context, owner, repo string, index int64, ...) ([]*Reaction, *Response, error)
- func (c *IssuesService) ListIssueSubscribers(ctx context.Context, owner, repo string, index int64, ...) ([]*User, *Response, error)
- func (c *IssuesService) ListIssueTimeline(ctx context.Context, owner, repo string, index int64, ...) ([]*TimelineComment, *Response, error)
- func (c *IssuesService) ListIssueTrackedTimes(ctx context.Context, owner, repo string, index int64, ...) ([]*TrackedTime, *Response, error)
- func (c *IssuesService) ListIssues(ctx context.Context, opt ListIssueOption) ([]*Issue, *Response, error)
- func (c *IssuesService) ListMyStopwatches(ctx context.Context, opt ListStopwatchesOptions) ([]*StopWatch, *Response, error)
- func (c *IssuesService) ListMyTrackedTimes(ctx context.Context, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
- func (c *IssuesService) ListRepoIssueComments(ctx context.Context, owner, repo string, opt ListIssueCommentOptions) ([]*Comment, *Response, error)
- func (c *IssuesService) ListRepoIssues(ctx context.Context, owner, repo string, opt ListIssueOption) ([]*Issue, *Response, error)
- func (c *IssuesService) ListRepoPinnedIssues(ctx context.Context, owner, repo string) ([]*Issue, *Response, error)
- func (c *IssuesService) ListRepoTrackedTimes(ctx context.Context, owner, repo string, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
- func (c *IssuesService) LockIssue(ctx context.Context, owner, repo string, index int64, opt LockIssueOption) (*Response, error)
- func (c *IssuesService) MoveIssuePin(ctx context.Context, owner, repo string, index, position int64) (*Response, error)
- func (c *IssuesService) PinIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) PostIssueCommentReaction(ctx context.Context, owner, repo string, commentID int64, reaction string) (*Reaction, *Response, error)
- func (c *IssuesService) PostIssueReaction(ctx context.Context, owner, repo string, index int64, reaction string) (*Reaction, *Response, error)
- func (c *IssuesService) RemoveIssueBlocking(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
- func (c *IssuesService) RemoveIssueDependency(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
- func (c *IssuesService) ReplaceIssueLabels(ctx context.Context, owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
- func (c *IssuesService) ResetIssueTime(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) StartIssueStopWatch(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) StopIssueStopWatch(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) UnlockIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) UnpinIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *IssuesService) UpdateIssueDeadline(ctx context.Context, owner, repo string, index int64, opt EditDeadlineOption) (*Issue, *Response, error)
- type Label
- type LabelTemplate
- type LicenseTemplateInfo
- type LicensesTemplateListEntry
- type ListAccessTokensOptions
- type ListActionArtifactsOptionsdeprecated
- type ListActionRunnersOptionsdeprecated
- type ListActionsArtifactsOptions
- type ListActionsRunnersOptions
- type ListAdminEmailsOptions
- type ListAdminHooksOptionsdeprecated
- type ListApplicationsOptions
- type ListBranchProtectionsOptions
- type ListCollaboratorsOptions
- type ListCommitOptions
- type ListCronTaskOptions
- type ListDeployKeysOptions
- type ListEmailsOptions
- type ListFollowersOptions
- type ListFollowingOptions
- type ListForksOptions
- type ListGPGKeysOptions
- type ListGlobalHooksOptions
- type ListHooksOptions
- type ListIssueBlocksOptions
- type ListIssueCommentOptions
- type ListIssueDependenciesOptions
- type ListIssueOption
- type ListIssueReactionsOptions
- type ListIssueSubscribersOptions
- type ListLabelsOptions
- type ListMilestoneOption
- type ListNotificationOptions
- type ListOauth2Optiondeprecated
- type ListOptions
- type ListOrgActionSecretOptiondeprecated
- type ListOrgActionVariableOptiondeprecated
- type ListOrgActionsSecretOption
- type ListOrgActionsVariableOption
- type ListOrgActivityFeedsOptions
- type ListOrgBlocksOptions
- type ListOrgLabelsOptions
- type ListOrgMembershipOption
- type ListOrgReposOptions
- type ListOrgsOptions
- type ListPackagesOptions
- type ListPublicKeysOptions
- type ListPullRequestCommitsOptions
- type ListPullRequestFilesOptions
- type ListPullRequestsOptions
- type ListPullReviewsOptions
- type ListReleaseAttachmentsOptions
- type ListReleasesOptions
- type ListRepoActionJobsOptionsdeprecated
- type ListRepoActionRunsOptionsdeprecated
- type ListRepoActionSecretOptiondeprecated
- type ListRepoActionVariableOptiondeprecated
- type ListRepoActionsJobsOptions
- type ListRepoActionsRunsOptions
- type ListRepoActionsSecretOption
- type ListRepoActionsVariableOption
- type ListRepoActivityFeedsOptions
- type ListRepoBranchesOptions
- type ListRepoGitHooksOptions
- type ListRepoTagProtectionsOptions
- type ListRepoTagsOptions
- type ListRepoTopicsOptions
- type ListReposOptions
- type ListStargazersOptions
- type ListStatusesOption
- type ListStopwatchesOptions
- type ListTeamActivityFeedsOptions
- type ListTeamMembersOptions
- type ListTeamRepositoriesOptions
- type ListTeamsOptions
- type ListTrackedTimesOptions
- type ListTreeOptions
- type ListUnadoptedReposOptions
- type ListUserActivityFeedsOptions
- type ListUserBlocksOptions
- type ListWikiPageRevisionsOptions
- type ListWikiPagesOptions
- type LockIssueOption
- type MarkNotificationOptions
- type MarkdownOption
- type MarkupOption
- type MergePullRequestOption
- type MergeStyle
- type MergeUpstreamRequest
- type MergeUpstreamResponse
- type MetaService
- func (c *MetaService) GetNodeInfo(ctx context.Context) (*NodeInfo, *Response, error)
- func (c *MetaService) GetSigningKeyGPG(ctx context.Context) (string, *Response, error)
- func (c *MetaService) GetSigningKeySSH(ctx context.Context) (string, *Response, error)
- func (c *MetaService) ServerVersion(ctx context.Context) (string, *Response, error)
- type MigrateRepoOption
- type Milestone
- type NewIssuePinsAllowed
- type NodeInfo
- type NodeInfoServices
- type NodeInfoSoftware
- type NodeInfoUsage
- type NodeInfoUsageUsers
- type Notedeprecated
- type NotificationStatus
- type NotificationSubject
- type NotificationSubjectState
- type NotificationSubjectType
- type NotificationThread
- type NotificationsService
- func (c *NotificationsService) Check(ctx context.Context) (int64, *Response, error)
- func (c *NotificationsService) GetByID(ctx context.Context, id int64) (*NotificationThread, *Response, error)
- func (c *NotificationsService) List(ctx context.Context, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
- func (c *NotificationsService) ListByRepo(ctx context.Context, owner, repo string, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
- func (c *NotificationsService) MarkRead(ctx context.Context, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
- func (c *NotificationsService) MarkReadByID(ctx context.Context, id int64, status ...NotificationStatus) (*NotificationThread, *Response, error)
- func (c *NotificationsService) MarkReadByRepo(ctx context.Context, owner, repo string, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
- type NotifyStatusdeprecated
- type NotifySubjectStatedeprecated
- type NotifySubjectTypedeprecated
- type OAuth2Application
- type OAuth2Service
- func (c *OAuth2Service) CreateApplication(ctx context.Context, opt CreateApplicationOption) (*OAuth2Application, *Response, error)
- func (c *OAuth2Service) DeleteApplication(ctx context.Context, oauth2id int64) (*Response, error)
- func (c *OAuth2Service) GetApplication(ctx context.Context, oauth2id int64) (*OAuth2Application, *Response, error)
- func (c *OAuth2Service) ListApplications(ctx context.Context, opt ListApplicationsOptions) ([]*OAuth2Application, *Response, error)
- func (c *OAuth2Service) UpdateApplication(ctx context.Context, oauth2id int64, opt CreateApplicationOption) (*OAuth2Application, *Response, error)
- type Oauth2deprecated
- type OrgPermissions
- type Organization
- type OrganizationsService
- func (c *OrganizationsService) AddTeamMember(ctx context.Context, id int64, user string) (*Response, error)
- func (c *OrganizationsService) AddTeamRepository(ctx context.Context, id int64, org, repo string) (*Response, error)
- func (c *OrganizationsService) BlockOrgUser(ctx context.Context, org, username string) (*Response, error)
- func (c *OrganizationsService) CheckOrgBlock(ctx context.Context, org, username string) (bool, *Response, error)
- func (c *OrganizationsService) CheckOrgMembership(ctx context.Context, org, user string) (bool, *Response, error)
- func (c *OrganizationsService) CheckPublicOrgMembership(ctx context.Context, org, user string) (bool, *Response, error)
- func (c *OrganizationsService) CreateOrg(ctx context.Context, opt CreateOrgOption) (*Organization, *Response, error)
- func (c *OrganizationsService) CreateOrgLabel(ctx context.Context, orgName string, opt CreateOrgLabelOption) (*Label, *Response, error)
- func (c *OrganizationsService) CreateTeam(ctx context.Context, org string, opt CreateTeamOption) (*Team, *Response, error)
- func (c *OrganizationsService) DeleteOrg(ctx context.Context, orgname string) (*Response, error)
- func (c *OrganizationsService) DeleteOrgAvatar(ctx context.Context, org string) (*Response, error)
- func (c *OrganizationsService) DeleteOrgLabel(ctx context.Context, orgName string, labelID int64) (*Response, error)
- func (c *OrganizationsService) DeleteOrgMembership(ctx context.Context, org, user string) (*Response, error)
- func (c *OrganizationsService) DeleteTeam(ctx context.Context, id int64) (*Response, error)
- func (c *OrganizationsService) EditOrg(ctx context.Context, orgname string, opt EditOrgOption) (*Response, error)
- func (c *OrganizationsService) EditOrgLabel(ctx context.Context, orgName string, labelID int64, opt EditOrgLabelOption) (*Label, *Response, error)
- func (c *OrganizationsService) EditTeam(ctx context.Context, id int64, opt EditTeamOption) (*Response, error)
- func (c *OrganizationsService) GetOrg(ctx context.Context, orgname string) (*Organization, *Response, error)
- func (c *OrganizationsService) GetOrgLabel(ctx context.Context, orgName string, labelID int64) (*Label, *Response, error)
- func (c *OrganizationsService) GetOrgPermissions(ctx context.Context, org, user string) (*OrgPermissions, *Response, error)
- func (c *OrganizationsService) GetTeam(ctx context.Context, id int64) (*Team, *Response, error)
- func (c *OrganizationsService) GetTeamMember(ctx context.Context, id int64, user string) (*User, *Response, error)
- func (c *OrganizationsService) GetTeamRepository(ctx context.Context, id int64, org, repo string) (*Repository, *Response, error)
- func (c *OrganizationsService) ListMyOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)
- func (c *OrganizationsService) ListMyTeams(ctx context.Context, opt *ListTeamsOptions) ([]*Team, *Response, error)
- func (c *OrganizationsService) ListOrgBlocks(ctx context.Context, org string, opt ListOrgBlocksOptions) ([]*User, *Response, error)
- func (c *OrganizationsService) ListOrgLabels(ctx context.Context, orgName string, opt ListOrgLabelsOptions) ([]*Label, *Response, error)
- func (c *OrganizationsService) ListOrgMembership(ctx context.Context, org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
- func (c *OrganizationsService) ListOrgTeams(ctx context.Context, org string, opt ListTeamsOptions) ([]*Team, *Response, error)
- func (c *OrganizationsService) ListOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)
- func (c *OrganizationsService) ListPublicOrgMembership(ctx context.Context, org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
- func (c *OrganizationsService) ListTeamMembers(ctx context.Context, id int64, opt ListTeamMembersOptions) ([]*User, *Response, error)
- func (c *OrganizationsService) ListTeamRepositories(ctx context.Context, id int64, opt ListTeamRepositoriesOptions) ([]*Repository, *Response, error)
- func (c *OrganizationsService) ListUserOrgs(ctx context.Context, user string, opt ListOrgsOptions) ([]*Organization, *Response, error)
- func (c *OrganizationsService) RemoveTeamMember(ctx context.Context, id int64, user string) (*Response, error)
- func (c *OrganizationsService) RemoveTeamRepository(ctx context.Context, id int64, org, repo string) (*Response, error)
- func (c *OrganizationsService) RenameOrg(ctx context.Context, org string, opt RenameOrgOption) (*Response, error)
- func (c *OrganizationsService) SearchOrgTeams(ctx context.Context, org string, opt *SearchTeamsOptions) ([]*Team, *Response, error)
- func (c *OrganizationsService) SetPublicOrgMembership(ctx context.Context, org, user string, visible bool) (*Response, error)
- func (c *OrganizationsService) UnblockOrgUser(ctx context.Context, org, username string) (*Response, error)
- func (c *OrganizationsService) UpdateOrgAvatar(ctx context.Context, org string, opt UpdateUserAvatarOption) (*Response, error)
- type PRBranchInfo
- type Package
- type PackageFile
- type PackagesService
- func (c *PackagesService) DeletePackage(ctx context.Context, owner, packageType, name, version string) (*Response, error)
- func (c *PackagesService) GetLatestPackage(ctx context.Context, owner, packageType, name string) (*Package, *Response, error)
- func (c *PackagesService) GetPackage(ctx context.Context, owner, packageType, name, version string) (*Package, *Response, error)
- func (c *PackagesService) LinkPackage(ctx context.Context, owner, packageType, name, repoName string) (*Response, error)
- func (c *PackagesService) ListPackageFiles(ctx context.Context, owner, packageType, name, version string) ([]*PackageFile, *Response, error)
- func (c *PackagesService) ListPackageVersions(ctx context.Context, owner, packageType, name string, opt ListPackagesOptions) ([]*Package, *Response, error)
- func (c *PackagesService) ListPackages(ctx context.Context, owner string, opt ListPackagesOptions) ([]*Package, *Response, error)
- func (c *PackagesService) UnlinkPackage(ctx context.Context, owner, packageType, name string) (*Response, error)
- type PayloadCommit
- type PayloadCommitVerification
- type PayloadUser
- type Permission
- type ProjectsMode
- type PublicKey
- type PullRequest
- type PullRequestDiffOptions
- type PullRequestMeta
- type PullRequestsService
- func (c *PullRequestsService) CancelScheduledAutoMerge(ctx context.Context, owner, repo string, index int64) (*Response, error)
- func (c *PullRequestsService) CreatePullRequest(ctx context.Context, owner, repo string, opt CreatePullRequestOption) (*PullRequest, *Response, error)
- func (c *PullRequestsService) CreatePullReview(ctx context.Context, owner, repo string, index int64, ...) (*PullReview, *Response, error)
- func (c *PullRequestsService) CreatePullReviewCommentReply(ctx context.Context, owner, repo string, index, id int64, ...) (*PullReviewComment, *Response, error)
- func (c *PullRequestsService) CreateReviewRequests(ctx context.Context, owner, repo string, index int64, ...) (*Response, error)
- func (c *PullRequestsService) DeletePullReview(ctx context.Context, owner, repo string, index, id int64) (*Response, error)
- func (c *PullRequestsService) DeleteReviewRequests(ctx context.Context, owner, repo string, index int64, ...) (*Response, error)
- func (c *PullRequestsService) DismissPullReview(ctx context.Context, owner, repo string, index, id int64, ...) (*Response, error)
- func (c *PullRequestsService) EditPullRequest(ctx context.Context, owner, repo string, index int64, ...) (*PullRequest, *Response, error)
- func (c *PullRequestsService) GetCommitPullRequest(ctx context.Context, owner, repo, sha string) (*PullRequest, *Response, error)
- func (c *PullRequestsService) GetPullRequest(ctx context.Context, owner, repo string, index int64) (*PullRequest, *Response, error)
- func (c *PullRequestsService) GetPullRequestByBaseHead(ctx context.Context, owner, repo, base, head string) (*PullRequest, *Response, error)
- func (c *PullRequestsService) GetPullRequestDiff(ctx context.Context, owner, repo string, index int64, ...) ([]byte, *Response, error)
- func (c *PullRequestsService) GetPullRequestPatch(ctx context.Context, owner, repo string, index int64) ([]byte, *Response, error)
- func (c *PullRequestsService) GetPullReview(ctx context.Context, owner, repo string, index, id int64) (*PullReview, *Response, error)
- func (c *PullRequestsService) IsPullRequestMerged(ctx context.Context, owner, repo string, index int64) (bool, *Response, error)
- func (c *PullRequestsService) ListPullRequestCommits(ctx context.Context, owner, repo string, index int64, ...) ([]*Commit, *Response, error)
- func (c *PullRequestsService) ListPullRequestFiles(ctx context.Context, owner, repo string, index int64, ...) ([]*ChangedFile, *Response, error)
- func (c *PullRequestsService) ListPullReviewComments(ctx context.Context, owner, repo string, index, id int64) ([]*PullReviewComment, *Response, error)
- func (c *PullRequestsService) ListPullReviews(ctx context.Context, owner, repo string, index int64, ...) ([]*PullReview, *Response, error)
- func (c *PullRequestsService) ListRepoPinnedPullRequests(ctx context.Context, owner, repo string) ([]*PullRequest, *Response, error)
- func (c *PullRequestsService) ListRepoPullRequests(ctx context.Context, owner, repo string, opt ListPullRequestsOptions) ([]*PullRequest, *Response, error)
- func (c *PullRequestsService) MergePullRequest(ctx context.Context, owner, repo string, index int64, ...) (bool, *Response, error)
- func (c *PullRequestsService) ResolvePullReviewComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)
- func (c *PullRequestsService) SubmitPullReview(ctx context.Context, owner, repo string, index, id int64, ...) (*PullReview, *Response, error)
- func (c *PullRequestsService) UnDismissPullReview(ctx context.Context, owner, repo string, index, id int64) (*Response, error)
- func (c *PullRequestsService) UnresolvePullReviewComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)
- func (c *PullRequestsService) UpdatePullRequest(ctx context.Context, owner, repo string, index int64) (*Response, error)
- type PullReview
- type PullReviewComment
- type PullReviewRequestOptions
- type PushMirrorResponse
- type PutRepoActionsVariable
- type Reaction
- type Reference
- type RegistrationToken
- type Release
- type ReleasesService
- func (c *ReleasesService) CreateRelease(ctx context.Context, owner, repo string, opt CreateReleaseOption) (*Release, *Response, error)
- func (c *ReleasesService) CreateReleaseAttachment(ctx context.Context, user, repo string, release int64, file io.Reader, ...) (*Attachment, *Response, error)
- func (c *ReleasesService) DeleteRelease(ctx context.Context, user, repo string, id int64) (*Response, error)
- func (c *ReleasesService) DeleteReleaseAttachment(ctx context.Context, user, repo string, release, id int64) (*Response, error)
- func (c *ReleasesService) DeleteReleaseByTag(ctx context.Context, user, repo, tag string) (*Response, error)
- func (c *ReleasesService) EditRelease(ctx context.Context, owner, repo string, id int64, form EditReleaseOption) (*Release, *Response, error)
- func (c *ReleasesService) EditReleaseAttachment(ctx context.Context, user, repo string, release, attachment int64, ...) (*Attachment, *Response, error)
- func (c *ReleasesService) GetLatestRelease(ctx context.Context, owner, repo string) (*Release, *Response, error)
- func (c *ReleasesService) GetRelease(ctx context.Context, owner, repo string, id int64) (*Release, *Response, error)
- func (c *ReleasesService) GetReleaseAttachment(ctx context.Context, user, repo string, release, id int64) (*Attachment, *Response, error)
- func (c *ReleasesService) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*Release, *Response, error)
- func (c *ReleasesService) ListReleaseAttachments(ctx context.Context, user, repo string, release int64, ...) ([]*Attachment, *Response, error)
- func (c *ReleasesService) ListReleases(ctx context.Context, owner, repo string, opt ListReleasesOptions) ([]*Release, *Response, error)
- type RenameOrgOption
- type RenameRepoBranchOption
- type RenameUserOption
- type RenderService
- func (c *RenderService) RenderMarkdown(ctx context.Context, opt MarkdownOption) (string, *Response, error)
- func (c *RenderService) RenderMarkdownRaw(ctx context.Context, markdown string) (string, *Response, error)
- func (c *RenderService) RenderMarkup(ctx context.Context, opt MarkupOption) (string, *Response, error)
- type RepoActionVariabledeprecated
- type RepoActionsVariable
- type RepoCommit
- type RepoTransfer
- type RepoType
- type RepoUnitType
- type RepositoriesService
- func (c *RepositoriesService) AcceptRepoTransfer(ctx context.Context, owner, reponame string) (*Repository, *Response, error)
- func (c *RepositoriesService) AddCollaborator(ctx context.Context, user, repo, collaborator string, ...) (*Response, error)
- func (c *RepositoriesService) AddRepoTeam(ctx context.Context, user, repo, team string) (*Response, error)
- func (c *RepositoriesService) AddRepoTopic(ctx context.Context, user, repo, topic string) (*Response, error)
- func (c *RepositoriesService) ApplyRepoDiffPatch(ctx context.Context, owner, repo string, opt ApplyDiffPatchFileOptions) (*FileResponse, *Response, error)
- func (c *RepositoriesService) ChangeFiles(ctx context.Context, owner, repo string, opt ChangeFilesOptions) (*FileResponse, *Response, error)
- func (c *RepositoriesService) CheckPinAllowed(ctx context.Context, owner, repo string) (*NewIssuePinsAllowed, *Response, error)
- func (c *RepositoriesService) CheckRepoTeam(ctx context.Context, user, repo, team string) (*Team, *Response, error)
- func (c *RepositoriesService) CheckRepoWatch(ctx context.Context, owner, repo string) (bool, *Response, error)
- func (c *RepositoriesService) CollaboratorPermission(ctx context.Context, user, repo, collaborator string) (*CollaboratorPermissionResult, *Response, error)
- func (c *RepositoriesService) CompareCommits(ctx context.Context, user, repo, prev, current string) (*Compare, *Response, error)
- func (c *RepositoriesService) CreateBranch(ctx context.Context, owner, repo string, opt CreateBranchOption) (*Branch, *Response, error)
- func (c *RepositoriesService) CreateBranchProtection(ctx context.Context, owner, repo string, opt CreateBranchProtectionOption) (*BranchProtection, *Response, error)
- func (c *RepositoriesService) CreateDeployKey(ctx context.Context, user, repo string, opt CreateKeyOption) (*DeployKey, *Response, error)
- func (c *RepositoriesService) CreateFile(ctx context.Context, owner, repo, filepath string, opt CreateFileOptions) (*FileResponse, *Response, error)
- func (c *RepositoriesService) CreateFork(ctx context.Context, user, repo string, form CreateForkOption) (*Repository, *Response, error)
- func (c *RepositoriesService) CreateLabel(ctx context.Context, owner, repo string, opt CreateLabelOption) (*Label, *Response, error)
- func (c *RepositoriesService) CreateMilestone(ctx context.Context, owner, repo string, opt CreateMilestoneOption) (*Milestone, *Response, error)
- func (c *RepositoriesService) CreateOrgRepo(ctx context.Context, org string, opt CreateRepoOption) (*Repository, *Response, error)
- func (c *RepositoriesService) CreateRepo(ctx context.Context, opt CreateRepoOption) (*Repository, *Response, error)
- func (c *RepositoriesService) CreateRepoFromTemplate(ctx context.Context, templateOwner, templateRepo string, ...) (*Repository, *Response, error)
- func (c *RepositoriesService) CreateStatus(ctx context.Context, owner, repo, sha string, opts CreateStatusOption) (*Status, *Response, error)
- func (c *RepositoriesService) CreateTag(ctx context.Context, user, repo string, opt CreateTagOption) (*Tag, *Response, error)
- func (c *RepositoriesService) CreateTagProtection(ctx context.Context, owner, repo string, opt CreateTagProtectionOption) (*TagProtection, *Response, error)
- func (c *RepositoriesService) DeleteBranchProtection(ctx context.Context, owner, repo, name string) (*Response, error)
- func (c *RepositoriesService) DeleteCollaborator(ctx context.Context, user, repo, collaborator string) (*Response, error)
- func (c *RepositoriesService) DeleteDeployKey(ctx context.Context, owner, repo string, keyID int64) (*Response, error)
- func (c *RepositoriesService) DeleteFile(ctx context.Context, owner, repo, filepath string, opt DeleteFileOptions) (*Response, error)
- func (c *RepositoriesService) DeleteLabel(ctx context.Context, owner, repo string, id int64) (*Response, error)
- func (c *RepositoriesService) DeleteMilestone(ctx context.Context, owner, repo string, id int64) (*Response, error)
- func (c *RepositoriesService) DeleteMilestoneByName(ctx context.Context, owner, repo, name string) (*Response, error)
- func (c *RepositoriesService) DeletePushMirror(ctx context.Context, user, repo, remoteName string) (*Response, error)
- func (c *RepositoriesService) DeleteRepo(ctx context.Context, owner, repo string) (*Response, error)
- func (c *RepositoriesService) DeleteRepoAvatar(ctx context.Context, owner, repo string) (*Response, error)
- func (c *RepositoriesService) DeleteRepoBranch(ctx context.Context, user, repo, branch string) (bool, *Response, error)
- func (c *RepositoriesService) DeleteRepoTopic(ctx context.Context, user, repo, topic string) (*Response, error)
- func (c *RepositoriesService) DeleteTag(ctx context.Context, user, repo, tag string) (*Response, error)
- func (c *RepositoriesService) DeleteTagProtection(ctx context.Context, owner, repo string, id int64) (*Response, error)
- func (c *RepositoriesService) EditBranchProtection(ctx context.Context, owner, repo, name string, opt EditBranchProtectionOption) (*BranchProtection, *Response, error)
- func (c *RepositoriesService) EditLabel(ctx context.Context, owner, repo string, id int64, opt EditLabelOption) (*Label, *Response, error)
- func (c *RepositoriesService) EditMilestone(ctx context.Context, owner, repo string, id int64, opt EditMilestoneOption) (*Milestone, *Response, error)
- func (c *RepositoriesService) EditMilestoneByName(ctx context.Context, owner, repo, name string, opt EditMilestoneOption) (*Milestone, *Response, error)
- func (c *RepositoriesService) EditRepo(ctx context.Context, owner, reponame string, opt EditRepoOption) (*Repository, *Response, error)
- func (c *RepositoriesService) EditTagProtection(ctx context.Context, owner, repo string, id int64, opt EditTagProtectionOption) (*TagProtection, *Response, error)
- func (c *RepositoriesService) GetAnnotatedTag(ctx context.Context, user, repo, sha string) (*AnnotatedTag, *Response, error)
- func (c *RepositoriesService) GetArchive(ctx context.Context, owner, repo, ref string, ext ArchiveType) ([]byte, *Response, error)
- func (c *RepositoriesService) GetArchiveReader(ctx context.Context, owner, repo, ref string, ext ArchiveType) (io.ReadCloser, *Response, error)
- func (c *RepositoriesService) GetAssignees(ctx context.Context, user, repo string) ([]*User, *Response, error)
- func (c *RepositoriesService) GetBranchProtection(ctx context.Context, owner, repo, name string) (*BranchProtection, *Response, error)
- func (c *RepositoriesService) GetCombinedStatus(ctx context.Context, owner, repo, ref string) (*CombinedStatus, *Response, error)
- func (c *RepositoriesService) GetCommitDiff(ctx context.Context, user, repo, commitID string) ([]byte, *Response, error)
- func (c *RepositoriesService) GetCommitPatch(ctx context.Context, user, repo, commitID string) ([]byte, *Response, error)
- func (c *RepositoriesService) GetContents(ctx context.Context, owner, repo, ref, filepath string) (*ContentsResponse, *Response, error)
- func (c *RepositoriesService) GetContentsExt(ctx context.Context, owner, repo, filepath string, opt GetContentsExtOptions) (*ContentsExtResponse, *Response, error)
- func (c *RepositoriesService) GetDeployKey(ctx context.Context, user, repo string, keyID int64) (*DeployKey, *Response, error)
- func (c *RepositoriesService) GetEditorConfig(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)
- func (c *RepositoriesService) GetFile(ctx context.Context, owner, repo, ref, filepath string, resolveLFS ...bool) ([]byte, *Response, error)
- func (c *RepositoriesService) GetFileReader(ctx context.Context, owner, repo, ref, filepath string, resolveLFS ...bool) (io.ReadCloser, *Response, error)
- func (c *RepositoriesService) GetIssueConfig(ctx context.Context, owner, repo string) (*IssueConfig, *Response, error)
- func (c *RepositoriesService) GetMilestone(ctx context.Context, owner, repo string, id int64) (*Milestone, *Response, error)
- func (c *RepositoriesService) GetMilestoneByName(ctx context.Context, owner, repo, name string) (*Milestone, *Response, error)
- func (c *RepositoriesService) GetMyStarredRepos(ctx context.Context) ([]*Repository, *Response, error)
- func (c *RepositoriesService) GetMyWatchedRepos(ctx context.Context) ([]*Repository, *Response, error)
- func (c *RepositoriesService) GetPushMirrorByRemoteName(ctx context.Context, user, repo, remoteName string) (*PushMirrorResponse, *Response, error)
- func (c *RepositoriesService) GetRawFile(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)
- func (c *RepositoriesService) GetRawFileOrLFS(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)
- func (c *RepositoriesService) GetRepo(ctx context.Context, owner, reponame string) (*Repository, *Response, error)
- func (c *RepositoriesService) GetRepoBranch(ctx context.Context, user, repo, branch string) (*Branch, *Response, error)
- func (c *RepositoriesService) GetRepoByID(ctx context.Context, id int64) (*Repository, *Response, error)
- func (c *RepositoriesService) GetRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)
- func (c *RepositoriesService) GetRepoLabel(ctx context.Context, owner, repo string, id int64) (*Label, *Response, error)
- func (c *RepositoriesService) GetRepoLanguages(ctx context.Context, owner, repo string) (map[string]int64, *Response, error)
- func (c *RepositoriesService) GetRepoLicenses(ctx context.Context, owner, repo string) ([]string, *Response, error)
- func (c *RepositoriesService) GetRepoSigningKeyGPG(ctx context.Context, owner, repo string) (string, *Response, error)
- func (c *RepositoriesService) GetRepoSigningKeySSH(ctx context.Context, owner, repo string) (string, *Response, error)
- func (c *RepositoriesService) GetRepoTeams(ctx context.Context, user, repo string) ([]*Team, *Response, error)
- func (c *RepositoriesService) GetReviewers(ctx context.Context, user, repo string) ([]*User, *Response, error)
- func (c *RepositoriesService) GetSingleCommit(ctx context.Context, user, repo, commitID string) (*Commit, *Response, error)
- func (c *RepositoriesService) GetStarredRepos(ctx context.Context, user string) ([]*Repository, *Response, error)
- func (c *RepositoriesService) GetTag(ctx context.Context, user, repo, tag string) (*Tag, *Response, error)
- func (c *RepositoriesService) GetTagProtection(ctx context.Context, owner, repo string, id int64) (*TagProtection, *Response, error)
- func (c *RepositoriesService) GetWatchedRepos(ctx context.Context, user string) ([]*Repository, *Response, error)
- func (c *RepositoriesService) IsCollaborator(ctx context.Context, user, repo, collaborator string) (bool, *Response, error)
- func (c *RepositoriesService) IsRepoStarring(ctx context.Context, user, repo string) (bool, *Response, error)
- func (c *RepositoriesService) ListBranchProtections(ctx context.Context, owner, repo string, opt ListBranchProtectionsOptions) ([]*BranchProtection, *Response, error)
- func (c *RepositoriesService) ListCollaborators(ctx context.Context, user, repo string, opt ListCollaboratorsOptions) ([]*User, *Response, error)
- func (c *RepositoriesService) ListContents(ctx context.Context, owner, repo, ref, filepath string) ([]*ContentsResponse, *Response, error)
- func (c *RepositoriesService) ListDeployKeys(ctx context.Context, user, repo string, opt ListDeployKeysOptions) ([]*DeployKey, *Response, error)
- func (c *RepositoriesService) ListForks(ctx context.Context, user, repo string, opt ListForksOptions) ([]*Repository, *Response, error)
- func (c *RepositoriesService) ListMilestones(ctx context.Context, owner, repo string, opt ListMilestoneOption) ([]*Milestone, *Response, error)
- func (c *RepositoriesService) ListMyRepos(ctx context.Context, opt ListReposOptions) ([]*Repository, *Response, error)
- func (c *RepositoriesService) ListOrgRepos(ctx context.Context, org string, opt ListOrgReposOptions) ([]*Repository, *Response, error)
- func (c *RepositoriesService) ListPushMirrors(ctx context.Context, user, repo string, opt ListOptions) ([]*PushMirrorResponse, *Response, error)
- func (c *RepositoriesService) ListRepoBranches(ctx context.Context, user, repo string, opt ListRepoBranchesOptions) ([]*Branch, *Response, error)
- func (c *RepositoriesService) ListRepoCommits(ctx context.Context, user, repo string, opt ListCommitOptions) ([]*Commit, *Response, error)
- func (c *RepositoriesService) ListRepoLabels(ctx context.Context, owner, repo string, opt ListLabelsOptions) ([]*Label, *Response, error)
- func (c *RepositoriesService) ListRepoStargazers(ctx context.Context, user, repo string, opt ListStargazersOptions) ([]*User, *Response, error)
- func (c *RepositoriesService) ListRepoSubscribers(ctx context.Context, owner, repo string, opt ListOptions) ([]*User, *Response, error)
- func (c *RepositoriesService) ListRepoTags(ctx context.Context, user, repo string, opt ListRepoTagsOptions) ([]*Tag, *Response, error)
- func (c *RepositoriesService) ListRepoTopics(ctx context.Context, user, repo string, opt ListRepoTopicsOptions) ([]string, *Response, error)
- func (c *RepositoriesService) ListStatuses(ctx context.Context, owner, repo, ref string, opt ListStatusesOption) ([]*Status, *Response, error)
- func (c *RepositoriesService) ListTagProtection(ctx context.Context, owner, repo string, opt ListRepoTagProtectionsOptions) ([]*TagProtection, *Response, error)
- func (c *RepositoriesService) ListUserRepos(ctx context.Context, user string, opt ListReposOptions) ([]*Repository, *Response, error)
- func (c *RepositoriesService) MergeUpstream(ctx context.Context, owner, repo string, opt MergeUpstreamRequest) (*MergeUpstreamResponse, *Response, error)
- func (c *RepositoriesService) MigrateRepo(ctx context.Context, opt MigrateRepoOption) (*Repository, *Response, error)
- func (c *RepositoriesService) MirrorSync(ctx context.Context, owner, repo string) (*Response, error)
- func (c *RepositoriesService) PostRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)
- func (c *RepositoriesService) PushMirrors(ctx context.Context, user, repo string, opt CreatePushMirrorOption) (*PushMirrorResponse, *Response, error)
- func (c *RepositoriesService) RejectRepoTransfer(ctx context.Context, owner, reponame string) (*Repository, *Response, error)
- func (c *RepositoriesService) RemoveRepoTeam(ctx context.Context, user, repo, team string) (*Response, error)
- func (c *RepositoriesService) RenameRepoBranch(ctx context.Context, user, repo, branch string, opt RenameRepoBranchOption) (successful bool, resp *Response, err error)
- func (c *RepositoriesService) SearchRepos(ctx context.Context, opt SearchRepoOptions) ([]*Repository, *Response, error)
- func (c *RepositoriesService) SearchTopics(ctx context.Context, opt TopicSearchOptions) (*TopicSearchResult, *Response, error)
- func (c *RepositoriesService) SetRepoTopics(ctx context.Context, user, repo string, list []string) (*Response, error)
- func (c *RepositoriesService) StarRepo(ctx context.Context, user, repo string) (*Response, error)
- func (c *RepositoriesService) TransferRepo(ctx context.Context, owner, reponame string, opt TransferRepoOption) (*Repository, *Response, error)
- func (c *RepositoriesService) TriggerPushMirrorsSync(ctx context.Context, owner, repo string) (*Response, error)
- func (c *RepositoriesService) UnStarRepo(ctx context.Context, user, repo string) (*Response, error)
- func (c *RepositoriesService) UnWatchRepo(ctx context.Context, owner, repo string) (*Response, error)
- func (c *RepositoriesService) UpdateBranchProtectionPriorities(ctx context.Context, owner, repo string, ids []int64) (*Response, error)
- func (c *RepositoriesService) UpdateFile(ctx context.Context, owner, repo, filepath string, opt UpdateFileOptions) (*FileResponse, *Response, error)
- func (c *RepositoriesService) UpdateRepoAvatar(ctx context.Context, owner, repo string, opt UpdateRepoAvatarOption) (*Response, error)
- func (c *RepositoriesService) UpdateRepoBranchRef(ctx context.Context, user, repo, branch string, opt UpdateRepoBranchRefOption) (successful bool, resp *Response, err error)
- func (c *RepositoriesService) ValidateIssueConfig(ctx context.Context, owner, repo string) (*IssueConfigValidation, *Response, error)
- func (c *RepositoriesService) WatchRepo(ctx context.Context, owner, repo string) (*Response, error)
- type Repository
- type RepositoryMeta
- type Response
- type ReviewStateType
- type RunDetails
- type SearchAdminEmailsOptions
- type SearchRepoOptions
- type SearchTeamsOptions
- type SearchUsersOption
- type Secret
- type SettingsService
- func (c *SettingsService) GetGlobalAPISettings(ctx context.Context) (*GlobalAPISettings, *Response, error)
- func (c *SettingsService) GetGlobalAttachmentSettings(ctx context.Context) (*GlobalAttachmentSettings, *Response, error)
- func (c *SettingsService) GetGlobalRepoSettings(ctx context.Context) (*GlobalRepoSettings, *Response, error)
- func (c *SettingsService) GetGlobalUISettings(ctx context.Context) (*GlobalUISettings, *Response, error)
- type StateType
- type Status
- type StatusState
- type StopWatch
- type SubmitPullReviewOptions
- type Tag
- type TagProtection
- type Team
- type TeamSearchResults
- type TemplatesService
- func (c *TemplatesService) GetGitignore(ctx context.Context, name string) (*GitignoreTemplateInfo, *Response, error)
- func (c *TemplatesService) GetLabel(ctx context.Context, name string) ([]*LabelTemplate, *Response, error)
- func (c *TemplatesService) GetLicense(ctx context.Context, name string) (*LicenseTemplateInfo, *Response, error)
- func (c *TemplatesService) ListGitignores(ctx context.Context) ([]string, *Response, error)
- func (c *TemplatesService) ListLabels(ctx context.Context) ([]string, *Response, error)
- func (c *TemplatesService) ListLicenses(ctx context.Context) ([]*LicensesTemplateListEntry, *Response, error)
- type TimelineComment
- type TopicResponse
- type TopicSearchOptions
- type TopicSearchResult
- type TrackedTime
- type TransferRepoOption
- type TrustModel
- type UpdateActionVariableOptiondeprecated
- type UpdateActionsVariableOption
- type UpdateFileOptions
- type UpdateRepoAvatarOption
- type UpdateRepoBranchOption
- type UpdateRepoBranchRefOption
- type UpdateUserAvatarOption
- type User
- type UserBadgeOption
- type UserHeatmapData
- type UserSettings
- type UserSettingsOptions
- type UsersService
- func (c *UsersService) AddEmail(ctx context.Context, opt CreateEmailOption) ([]*Email, *Response, error)
- func (c *UsersService) BlockUser(ctx context.Context, username string) (*Response, error)
- func (c *UsersService) CheckUserBlock(ctx context.Context, username string) (bool, *Response, error)
- func (c *UsersService) CreateAccessToken(ctx context.Context, opt CreateAccessTokenOption) (*AccessToken, *Response, error)
- func (c *UsersService) CreateGPGKey(ctx context.Context, opt CreateGPGKeyOption) (*GPGKey, *Response, error)
- func (c *UsersService) CreatePublicKey(ctx context.Context, opt CreateKeyOption) (*PublicKey, *Response, error)
- func (c *UsersService) DeleteAccessToken(ctx context.Context, value interface{}) (*Response, error)
- func (c *UsersService) DeleteEmail(ctx context.Context, opt DeleteEmailOption) (*Response, error)
- func (c *UsersService) DeleteGPGKey(ctx context.Context, keyID int64) (*Response, error)
- func (c *UsersService) DeletePublicKey(ctx context.Context, keyID int64) (*Response, error)
- func (c *UsersService) DeleteUserAvatar(ctx context.Context) (*Response, error)
- func (c *UsersService) Follow(ctx context.Context, target string) (*Response, error)
- func (c *UsersService) GetGPGKey(ctx context.Context, keyID int64) (*GPGKey, *Response, error)
- func (c *UsersService) GetGPGKeyVerificationToken(ctx context.Context) (string, *Response, error)
- func (c *UsersService) GetMyUserInfo(ctx context.Context) (*User, *Response, error)
- func (c *UsersService) GetPublicKey(ctx context.Context, keyID int64) (*PublicKey, *Response, error)
- func (c *UsersService) GetUserByID(ctx context.Context, id int64) (*User, *Response, error)
- func (c *UsersService) GetUserInfo(ctx context.Context, user string) (*User, *Response, error)
- func (c *UsersService) GetUserSettings(ctx context.Context) (*UserSettings, *Response, error)
- func (c *UsersService) IsFollowing(ctx context.Context, target string) (bool, *Response)
- func (c *UsersService) IsUserFollowing(ctx context.Context, user, target string) (bool, *Response)
- func (c *UsersService) ListAccessTokens(ctx context.Context, opts ListAccessTokensOptions) ([]*AccessToken, *Response, error)
- func (c *UsersService) ListEmails(ctx context.Context, opt ListEmailsOptions) ([]*Email, *Response, error)
- func (c *UsersService) ListFollowers(ctx context.Context, user string, opt ListFollowersOptions) ([]*User, *Response, error)
- func (c *UsersService) ListFollowing(ctx context.Context, user string, opt ListFollowingOptions) ([]*User, *Response, error)
- func (c *UsersService) ListGPGKeys(ctx context.Context, user string, opt ListGPGKeysOptions) ([]*GPGKey, *Response, error)
- func (c *UsersService) ListMyBlocks(ctx context.Context, opt ListUserBlocksOptions) ([]*User, *Response, error)
- func (c *UsersService) ListMyFollowers(ctx context.Context, opt ListFollowersOptions) ([]*User, *Response, error)
- func (c *UsersService) ListMyFollowing(ctx context.Context, opt ListFollowingOptions) ([]*User, *Response, error)
- func (c *UsersService) ListMyGPGKeys(ctx context.Context, opt *ListGPGKeysOptions) ([]*GPGKey, *Response, error)
- func (c *UsersService) ListMyPublicKeys(ctx context.Context, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
- func (c *UsersService) ListPublicKeys(ctx context.Context, user string, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
- func (c *UsersService) SearchUsers(ctx context.Context, opt SearchUsersOption) ([]*User, *Response, error)
- func (c *UsersService) UnblockUser(ctx context.Context, username string) (*Response, error)
- func (c *UsersService) Unfollow(ctx context.Context, target string) (*Response, error)
- func (c *UsersService) UpdateUserAvatar(ctx context.Context, opt UpdateUserAvatarOption) (*Response, error)
- func (c *UsersService) UpdateUserSettings(ctx context.Context, opt UserSettingsOptions) (*UserSettings, *Response, error)
- func (c *UsersService) VerifyGPGKey(ctx context.Context, opt VerifyGPGKeyOption) (*GPGKey, *Response, error)
- type VerifyGPGKeyOption
- type VisibleType
- type WatchInfo
- type WikiCommit
- type WikiCommitList
- type WikiPage
- type WikiPageMetaData
- type WikiService
- func (c *WikiService) CreatePage(ctx context.Context, owner, repo string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
- func (c *WikiService) DeletePage(ctx context.Context, owner, repo, pageName string) (*Response, error)
- func (c *WikiService) EditPage(ctx context.Context, owner, repo, pageName string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
- func (c *WikiService) GetPage(ctx context.Context, owner, repo, pageName string) (*WikiPage, *Response, error)
- func (c *WikiService) GetPageRevisions(ctx context.Context, owner, repo, pageName string, ...) (*WikiCommitList, *Response, error)
- func (c *WikiService) ListPages(ctx context.Context, owner, repo string, opt ListWikiPagesOptions) ([]*WikiPageMetaData, *Response, error)
Constants ¶
const ( // NotificationStatusUnread was not read NotificationStatusUnread NotificationStatus = "unread" // NotificationStatusRead was already read by user NotificationStatusRead NotificationStatus = "read" // NotificationStatusPinned notification is pinned by user NotificationStatusPinned NotificationStatus = "pinned" // Deprecated: use NotificationStatusUnread instead. NotifyStatusUnread = NotificationStatusUnread // Deprecated: use NotificationStatusRead instead. NotifyStatusRead = NotificationStatusRead // Deprecated: use NotificationStatusPinned instead. NotifyStatusPinned = NotificationStatusPinned )
const ( // NotificationSubjectIssue an issue is subject of an notification NotificationSubjectIssue NotificationSubjectType = "Issue" // NotificationSubjectPull an pull is subject of an notification NotificationSubjectPull NotificationSubjectType = "Pull" // NotificationSubjectCommit an commit is subject of an notification NotificationSubjectCommit NotificationSubjectType = "Commit" // NotificationSubjectRepository an repository is subject of an notification NotificationSubjectRepository NotificationSubjectType = "Repository" // Deprecated: use NotificationSubjectIssue instead. NotifySubjectIssue = NotificationSubjectIssue // Deprecated: use NotificationSubjectPull instead. NotifySubjectPull = NotificationSubjectPull // Deprecated: use NotificationSubjectCommit instead. NotifySubjectCommit = NotificationSubjectCommit // Deprecated: use NotificationSubjectRepository instead. NotifySubjectRepository = NotificationSubjectRepository )
const ( // NotificationSubjectOpen if subject is a pull/issue and is open at the moment NotificationSubjectOpen NotificationSubjectState = "open" // NotificationSubjectClosed if subject is a pull/issue and is closed at the moment NotificationSubjectClosed NotificationSubjectState = "closed" // NotificationSubjectMerged if subject is a pull and got merged NotificationSubjectMerged NotificationSubjectState = "merged" // Deprecated: use NotificationSubjectOpen instead. NotifySubjectOpen = NotificationSubjectOpen // Deprecated: use NotificationSubjectClosed instead. NotifySubjectClosed = NotificationSubjectClosed // Deprecated: use NotificationSubjectMerged instead. NotifySubjectMerged = NotificationSubjectMerged )
Variables ¶
This section is empty.
Functions ¶
func OptionalInt64 ¶
OptionalInt64 convert a int64 to a int64 reference
func OptionalString ¶
OptionalString convert a string to a string reference
Types ¶
type AccessMode ¶
type AccessMode string
AccessMode represent the grade of access you have to something
const ( // AccessModeNone no access AccessModeNone AccessMode = "none" // AccessModeRead read access AccessModeRead AccessMode = "read" // AccessModeWrite write access AccessModeWrite AccessMode = "write" // AccessModeAdmin admin access AccessModeAdmin AccessMode = "admin" // AccessModeOwner owner AccessModeOwner AccessMode = "owner" )
type AccessToken ¶
type AccessToken struct {
ID int64 `json:"id"`
Name string `json:"name"`
Token string `json:"sha1"`
TokenLastEight string `json:"token_last_eight"`
Scopes []AccessTokenScope `json:"scopes"`
Created time.Time `json:"created_at,omitempty"`
Updated time.Time `json:"last_used_at,omitempty"`
}
AccessToken represents an API access token.
type AccessTokenScope ¶
type AccessTokenScope string
AccessTokenScope represents the scope for an access token.
const ( AccessTokenScopeAll AccessTokenScope = "all" AccessTokenScopeRepo AccessTokenScope = "repo" AccessTokenScopeRepoStatus AccessTokenScope = "repo:status" AccessTokenScopePublicRepo AccessTokenScope = "public_repo" AccessTokenScopeAdminOrg AccessTokenScope = "admin:org" AccessTokenScopeWriteOrg AccessTokenScope = "write:org" AccessTokenScopeReadOrg AccessTokenScope = "read:org" AccessTokenScopeAdminPublicKey AccessTokenScope = "admin:public_key" AccessTokenScopeWritePublicKey AccessTokenScope = "write:public_key" AccessTokenScopeReadPublicKey AccessTokenScope = "read:public_key" AccessTokenScopeAdminRepoHook AccessTokenScope = "admin:repo_hook" AccessTokenScopeWriteRepoHook AccessTokenScope = "write:repo_hook" AccessTokenScopeReadRepoHook AccessTokenScope = "read:repo_hook" AccessTokenScopeAdminOrgHook AccessTokenScope = "admin:org_hook" AccessTokenScopeAdminUserHook AccessTokenScope = "admin:user_hook" AccessTokenScopeNotification AccessTokenScope = "notification" AccessTokenScopeUser AccessTokenScope = "user" AccessTokenScopeReadUser AccessTokenScope = "read:user" AccessTokenScopeUserEmail AccessTokenScope = "user:email" AccessTokenScopeUserFollow AccessTokenScope = "user:follow" AccessTokenScopeDeleteRepo AccessTokenScope = "delete_repo" AccessTokenScopePackage AccessTokenScope = "package" AccessTokenScopeWritePackage AccessTokenScope = "write:package" AccessTokenScopeReadPackage AccessTokenScope = "read:package" AccessTokenScopeDeletePackage AccessTokenScope = "delete:package" AccessTokenScopeAdminGPGKey AccessTokenScope = "admin:gpg_key" AccessTokenScopeWriteGPGKey AccessTokenScope = "write:gpg_key" AccessTokenScopeReadGPGKey AccessTokenScope = "read:gpg_key" AccessTokenScopeAdminApplication AccessTokenScope = "admin:application" AccessTokenScopeWriteApplication AccessTokenScope = "write:application" AccessTokenScopeReadApplication AccessTokenScope = "read:application" AccessTokenScopeSudo AccessTokenScope = "sudo" )
type ActionArtifact
deprecated
type ActionArtifact = ActionsArtifact
Deprecated: use ActionsArtifact instead.
type ActionArtifactsResponse
deprecated
type ActionArtifactsResponse = ActionsArtifactsResponse
Deprecated: use ActionsArtifactsResponse instead.
type ActionRunner
deprecated
type ActionRunner = ActionsRunner
Deprecated: use ActionsRunner instead.
type ActionRunnerLabel
deprecated
type ActionRunnerLabel = ActionsRunnerLabel
Deprecated: use ActionsRunnerLabel instead.
type ActionRunnersResponse
deprecated
type ActionRunnersResponse = ActionsRunnersResponse
Deprecated: use ActionsRunnersResponse instead.
type ActionTask
deprecated
type ActionTask = ActionsTask
Deprecated: use ActionsTask instead.
type ActionTaskResponse
deprecated
type ActionTaskResponse = ActionsTaskResponse
Deprecated: use ActionsTaskResponse instead.
type ActionVariable
deprecated
type ActionVariable = ActionsVariable
Deprecated: use ActionsVariable instead.
type ActionWorkflow
deprecated
type ActionWorkflow = ActionsWorkflow
Deprecated: use ActionsWorkflow instead.
type ActionWorkflowJob
deprecated
type ActionWorkflowJob = ActionsWorkflowJob
Deprecated: use ActionsWorkflowJob instead.
type ActionWorkflowJobsResponse
deprecated
type ActionWorkflowJobsResponse = ActionsWorkflowJobsResponse
Deprecated: use ActionsWorkflowJobsResponse instead.
type ActionWorkflowResponse
deprecated
type ActionWorkflowResponse = ActionsWorkflowResponse
Deprecated: use ActionsWorkflowResponse instead.
type ActionWorkflowRun
deprecated
type ActionWorkflowRun = ActionsWorkflowRun
Deprecated: use ActionsWorkflowRun instead.
type ActionWorkflowRunsResponse
deprecated
type ActionWorkflowRunsResponse = ActionsWorkflowRunsResponse
Deprecated: use ActionsWorkflowRunsResponse instead.
type ActionWorkflowStep
deprecated
type ActionWorkflowStep = ActionsWorkflowStep
Deprecated: use ActionsWorkflowStep instead.
type ActionsArtifact ¶ added in v1.0.1
type ActionsArtifact struct {
ID int64 `json:"id"`
Name string `json:"name"`
SizeInBytes int64 `json:"size_in_bytes"`
URL string `json:"url"`
ArchiveDownloadURL string `json:"archive_download_url"`
Expired bool `json:"expired"`
WorkflowRun *ActionsWorkflowRun `json:"workflow_run"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ExpiresAt time.Time `json:"expires_at"`
}
ActionsArtifact represents an Actions artifact.
type ActionsArtifactsResponse ¶ added in v1.0.1
type ActionsArtifactsResponse struct {
Artifacts []*ActionsArtifact `json:"artifacts"`
TotalCount int64 `json:"total_count"`
}
ActionsArtifactsResponse contains a page of artifacts.
type ActionsRunner ¶ added in v1.0.1
type ActionsRunner struct {
ID int64 `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
Busy bool `json:"busy"`
Disabled bool `json:"disabled"`
Ephemeral bool `json:"ephemeral"`
Labels []*ActionsRunnerLabel `json:"labels"`
}
ActionsRunner represents an Actions runner.
type ActionsRunnerLabel ¶ added in v1.0.1
type ActionsRunnerLabel struct {
ID int64 `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
}
ActionsRunnerLabel represents a runner label.
type ActionsRunnersResponse ¶ added in v1.0.1
type ActionsRunnersResponse struct {
Runners []*ActionsRunner `json:"runners"`
TotalCount int64 `json:"total_count"`
}
ActionsRunnersResponse contains a page of runners.
type ActionsService ¶
type ActionsService struct{ *Client }
ActionsService handles Gitea Actions endpoints.
func (*ActionsService) CreateGlobalRunnerRegistrationToken ¶
func (c *ActionsService) CreateGlobalRunnerRegistrationToken(ctx context.Context) (*RegistrationToken, *Response, error)
CreateGlobalRunnerRegistrationToken creates a global runner registration token.
func (*ActionsService) CreateOrgRunnerRegistrationToken ¶
func (c *ActionsService) CreateOrgRunnerRegistrationToken(ctx context.Context, org string) (*RegistrationToken, *Response, error)
CreateOrgActionRunnerRegistrationToken creates an organization runner registration token.
func (*ActionsService) CreateOrgSecret ¶
func (c *ActionsService) CreateOrgSecret(ctx context.Context, org, secretName string, opt CreateOrUpdateSecretOption) (*Response, error)
CreateOrgActionSecret creates a secret for the specified organization in the Gitea Actions.
func (*ActionsService) CreateOrgVariable ¶
func (c *ActionsService) CreateOrgVariable(ctx context.Context, org, name string, opt CreateActionsVariableOption) (*Response, error)
CreateOrgActionVariable creates a variable for the specified organization in the Gitea Actions.
func (*ActionsService) CreateRepoRunnerRegistrationToken ¶
func (c *ActionsService) CreateRepoRunnerRegistrationToken(ctx context.Context, owner, repo string) (*RegistrationToken, *Response, error)
CreateRepoActionRunnerRegistrationToken creates a repository-scope runner registration token.
func (*ActionsService) CreateRepoSecret ¶
func (c *ActionsService) CreateRepoSecret(ctx context.Context, user, repo, secretName string, opt CreateOrUpdateSecretOption) (*Response, error)
CreateRepoActionSecret creates a secret for the specified repository in the Gitea Actions.
func (*ActionsService) CreateRepoVariable ¶
func (c *ActionsService) CreateRepoVariable(ctx context.Context, user, repo, variableName, value string) (*Response, error)
CreateRepoActionVariable creates a repository variable in the Gitea Actions. It takes the repository owner, name, variable name and the variable value as parameters. The function returns the HTTP response and an error, if any.
func (*ActionsService) CreateUserRunnerRegistrationToken ¶
func (c *ActionsService) CreateUserRunnerRegistrationToken(ctx context.Context) (*RegistrationToken, *Response, error)
CreateUserActionRunnerRegistrationToken creates a user-scope runner registration token.
func (*ActionsService) CreateUserSecret ¶
func (c *ActionsService) CreateUserSecret(ctx context.Context, secretName string, opt CreateOrUpdateSecretOption) (*Response, error)
CreateUserActionSecret creates or updates a user-scope Actions secret.
func (*ActionsService) CreateUserVariable ¶
func (c *ActionsService) CreateUserVariable(ctx context.Context, variableName string, opt CreateActionsVariableOption) (*Response, error)
CreateUserActionVariable creates one user-scope Actions variable.
func (*ActionsService) DeleteGlobalRunner ¶
DeleteGlobalRunner deletes one global Actions runner.
func (*ActionsService) DeleteOrgRunner ¶
func (c *ActionsService) DeleteOrgRunner(ctx context.Context, org string, runnerID int64) (*Response, error)
DeleteOrgActionRunner deletes one organization-scoped Actions runner.
func (*ActionsService) DeleteOrgSecret ¶
func (c *ActionsService) DeleteOrgSecret(ctx context.Context, org, secretName string) (*Response, error)
DeleteOrgActionSecret deletes an organization's Actions secret.
func (*ActionsService) DeleteOrgVariable ¶
func (c *ActionsService) DeleteOrgVariable(ctx context.Context, org, name string) (*Response, error)
DeleteOrgActionVariable deletes an organization's Actions variable.
func (*ActionsService) DeleteRepoArtifact ¶
func (c *ActionsService) DeleteRepoArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Response, error)
DeleteRepoActionArtifact deletes one repository artifact.
func (*ActionsService) DeleteRepoRun ¶
func (c *ActionsService) DeleteRepoRun(ctx context.Context, owner, repo string, runID int64) (*Response, error)
DeleteRepoActionRun deletes a workflow run. Requires Gitea 1.26.0 or later.
func (*ActionsService) DeleteRepoRunner ¶
func (c *ActionsService) DeleteRepoRunner(ctx context.Context, owner, repo string, runnerID int64) (*Response, error)
DeleteRepoActionRunner deletes one repository-scope Actions runner.
func (*ActionsService) DeleteRepoSecret ¶
func (c *ActionsService) DeleteRepoSecret(ctx context.Context, user, repo, secretName string) (*Response, error)
DeleteRepoActionSecret deletes a secret from the Gitea Actions. It takes the repository owner, name and the secret name as parameters. The function returns the HTTP response and an error, if any.
func (*ActionsService) DeleteRepoVariable ¶
func (c *ActionsService) DeleteRepoVariable(ctx context.Context, user, reponame, variableName string) (*Response, error)
DeleteRepoActionVariable deletes a repository variable in the Gitea Actions. It takes the repository owner, name and the variable name as parameters. The function returns the HTTP response and an error, if any.
func (*ActionsService) DeleteUserRunner ¶
DeleteUserActionRunner deletes one user-scope Actions runner.
func (*ActionsService) DeleteUserSecret ¶
func (c *ActionsService) DeleteUserSecret(ctx context.Context, secretName string) (*Response, error)
DeleteUserActionSecret deletes a user-scope Actions secret.
func (*ActionsService) DeleteUserVariable ¶
func (c *ActionsService) DeleteUserVariable(ctx context.Context, variableName string) (*Response, error)
DeleteUserActionVariable deletes one user-scope Actions variable.
func (*ActionsService) DisableRepoWorkflow ¶
func (c *ActionsService) DisableRepoWorkflow(ctx context.Context, owner, repo, workflowID string) (*Response, error)
DisableRepoActionWorkflow disables one repository workflow.
func (*ActionsService) DispatchRepoWorkflow ¶
func (c *ActionsService) DispatchRepoWorkflow(ctx context.Context, owner, repo, workflowID string, opt CreateActionsWorkflowDispatchOption, returnRunDetails bool) (*RunDetails, *Response, error)
DispatchRepoActionWorkflow dispatches one repository workflow.
func (*ActionsService) EnableRepoWorkflow ¶
func (c *ActionsService) EnableRepoWorkflow(ctx context.Context, owner, repo, workflowID string) (*Response, error)
EnableRepoActionWorkflow enables one repository workflow.
func (*ActionsService) GetGlobalRunner ¶
func (c *ActionsService) GetGlobalRunner(ctx context.Context, runnerID int64) (*ActionsRunner, *Response, error)
GetGlobalRunner gets one global Actions runner.
func (*ActionsService) GetOrgRunner ¶
func (c *ActionsService) GetOrgRunner(ctx context.Context, org string, runnerID int64) (*ActionsRunner, *Response, error)
GetOrgActionRunner gets one organization-scoped Actions runner.
func (*ActionsService) GetOrgVariable ¶
func (c *ActionsService) GetOrgVariable(ctx context.Context, org, name string) (*ActionsVariable, *Response, error)
GetOrgActionVariable gets a single organization's action variable by name
func (*ActionsService) GetRepoArtifact ¶
func (c *ActionsService) GetRepoArtifact(ctx context.Context, owner, repo string, artifactID int64) (*ActionsArtifact, *Response, error)
GetRepoActionArtifact gets one repository artifact.
func (*ActionsService) GetRepoArtifactArchive ¶
func (c *ActionsService) GetRepoArtifactArchive(ctx context.Context, owner, repo string, artifactID int64) ([]byte, *Response, error)
GetRepoActionArtifactArchive downloads one repository artifact zip archive.
func (*ActionsService) GetRepoArtifactArchiveReader ¶
func (c *ActionsService) GetRepoArtifactArchiveReader(ctx context.Context, owner, repo string, artifactID int64) (io.ReadCloser, *Response, error)
GetRepoActionArtifactArchiveReader returns a reader for one repository artifact zip archive.
func (*ActionsService) GetRepoRun ¶
func (c *ActionsService) GetRepoRun(ctx context.Context, owner, repo string, runID int64) (*ActionsWorkflowRun, *Response, error)
GetRepoActionRun gets a single workflow run. Requires Gitea 1.26.0 or later.
func (*ActionsService) GetRepoRunJob ¶
func (c *ActionsService) GetRepoRunJob(ctx context.Context, owner, repo string, jobID int64) (*ActionsWorkflowJob, *Response, error)
GetRepoRunJob gets a single run job. Requires Gitea 1.26.0 or later.
func (*ActionsService) GetRepoRunJobLogs ¶
func (c *ActionsService) GetRepoRunJobLogs(ctx context.Context, owner, repo string, jobID int64) ([]byte, *Response, error)
GetRepoRunJobLogs gets the logs for a specific run job. Requires Gitea 1.26.0 or later.
func (*ActionsService) GetRepoRunner ¶
func (c *ActionsService) GetRepoRunner(ctx context.Context, owner, repo string, runnerID int64) (*ActionsRunner, *Response, error)
GetRepoActionRunner gets one repository-scope Actions runner.
func (*ActionsService) GetRepoVariable ¶
func (c *ActionsService) GetRepoVariable(ctx context.Context, user, repo, variableName string) (*RepoActionsVariable, *Response, error)
GetRepoActionVariable returns a repository variable in the Gitea Actions. It takes the repository owner, name and the variable name as parameters. The function returns the HTTP response and an error, if any.
func (*ActionsService) GetRepoWorkflow ¶
func (c *ActionsService) GetRepoWorkflow(ctx context.Context, owner, repo, workflowID string) (*ActionsWorkflow, *Response, error)
GetRepoActionWorkflow gets one repository workflow.
func (*ActionsService) GetUserRunner ¶
func (c *ActionsService) GetUserRunner(ctx context.Context, runnerID int64) (*ActionsRunner, *Response, error)
GetUserActionRunner gets one user-scope Actions runner.
func (*ActionsService) GetUserVariable ¶
func (c *ActionsService) GetUserVariable(ctx context.Context, variableName string) (*ActionsVariable, *Response, error)
GetUserActionVariable gets one user-scope Actions variable.
func (*ActionsService) ListGlobalRunners ¶
func (c *ActionsService) ListGlobalRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
ListGlobalRunners lists all global Actions runners.
func (*ActionsService) ListOrgRunJobs ¶
func (c *ActionsService) ListOrgRunJobs(ctx context.Context, org string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
ListOrgRunJobs lists organization-scoped Actions run jobs.
func (*ActionsService) ListOrgRunners ¶
func (c *ActionsService) ListOrgRunners(ctx context.Context, org string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
ListOrgActionRunners lists organization-scoped Actions runners.
func (*ActionsService) ListOrgRuns ¶
func (c *ActionsService) ListOrgRuns(ctx context.Context, org string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
ListOrgActionRuns lists organization-scoped Actions workflow runs.
func (*ActionsService) ListOrgSecrets ¶
func (c *ActionsService) ListOrgSecrets(ctx context.Context, org string, opt ListOrgActionsSecretOption) ([]*Secret, *Response, error)
ListOrgActionSecret list an organization's secrets
func (*ActionsService) ListOrgVariables ¶
func (c *ActionsService) ListOrgVariables(ctx context.Context, org string, opt ListOrgActionsVariableOption) ([]*ActionsVariable, *Response, error)
ListOrgActionVariable lists an organization's action variables
func (*ActionsService) ListRepoArtifacts ¶
func (c *ActionsService) ListRepoArtifacts(ctx context.Context, owner, repo string, opt ListActionsArtifactsOptions) (*ActionsArtifactsResponse, *Response, error)
ListRepoActionArtifacts lists repository artifacts.
func (*ActionsService) ListRepoJobsByRun ¶
func (c *ActionsService) ListRepoJobsByRun(ctx context.Context, owner, repo string, runID int64, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
ListRepoJobsByRun lists jobs for a workflow run. Requires Gitea 1.26.0 or later.
func (*ActionsService) ListRepoRunArtifacts ¶
func (c *ActionsService) ListRepoRunArtifacts(ctx context.Context, owner, repo string, runID int64, opt ListActionsArtifactsOptions) (*ActionsArtifactsResponse, *Response, error)
ListRepoActionRunArtifacts lists artifacts for one workflow run.
func (*ActionsService) ListRepoRunJobs ¶
func (c *ActionsService) ListRepoRunJobs(ctx context.Context, owner, repo string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
ListRepoRunJobs lists all run jobs for a repository. Requires Gitea 1.26.0 or later.
func (*ActionsService) ListRepoRunners ¶
func (c *ActionsService) ListRepoRunners(ctx context.Context, owner, repo string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
ListRepoActionRunners lists repository-scope Actions runners.
func (*ActionsService) ListRepoRuns ¶
func (c *ActionsService) ListRepoRuns(ctx context.Context, owner, repo string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
ListRepoActionRuns lists workflow runs for a repository. Requires Gitea 1.26.0 or later. For older versions, use ListRepoActionTasks.
func (*ActionsService) ListRepoSecrets ¶
func (c *ActionsService) ListRepoSecrets(ctx context.Context, user, repo string, opt ListRepoActionsSecretOption) ([]*Secret, *Response, error)
ListRepoActionSecret list a repository's secrets
func (*ActionsService) ListRepoTasks ¶
func (c *ActionsService) ListRepoTasks(ctx context.Context, owner, repo string, opt ListOptions) (*ActionsTaskResponse, *Response, error)
ListRepoActionTasks lists workflow tasks for a repository (Gitea 1.24.x and earlier) Use this for older Gitea versions that don't have /actions/runs endpoint
func (*ActionsService) ListRepoVariables ¶
func (c *ActionsService) ListRepoVariables(ctx context.Context, user, repo string, opt ListRepoActionsVariableOption) ([]*RepoActionsVariable, *Response, error)
ListRepoActionVariable lists a repository's action variables
func (*ActionsService) ListRepoWorkflows ¶
func (c *ActionsService) ListRepoWorkflows(ctx context.Context, owner, repo string) (*ActionsWorkflowResponse, *Response, error)
ListRepoActionWorkflows lists repository workflows.
func (*ActionsService) ListRunJobs ¶
func (c *ActionsService) ListRunJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
ListRunJobs lists all Actions run jobs.
func (*ActionsService) ListRuns ¶
func (c *ActionsService) ListRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
ListRuns lists all Actions workflow runs.
func (*ActionsService) ListUserRunJobs ¶
func (c *ActionsService) ListUserRunJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
ListUserRunJobs lists user-scope Actions run jobs.
func (*ActionsService) ListUserRunners ¶
func (c *ActionsService) ListUserRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
ListUserActionRunners lists user-scope Actions runners.
func (*ActionsService) ListUserRuns ¶
func (c *ActionsService) ListUserRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
ListUserActionRuns lists user-scope Actions workflow runs.
func (*ActionsService) ListUserVariables ¶
func (c *ActionsService) ListUserVariables(ctx context.Context, opt ListOptions) ([]*ActionsVariable, *Response, error)
ListUserActionVariable lists user-scope Actions variables.
func (*ActionsService) RerunRepoRun ¶
func (c *ActionsService) RerunRepoRun(ctx context.Context, owner, repo string, runID int64) (*ActionsWorkflowRun, *Response, error)
RerunRepoActionRun reruns an entire workflow run. Requires Gitea 1.26.0 or later.
func (*ActionsService) RerunRepoRunFailedJobs ¶
func (c *ActionsService) RerunRepoRunFailedJobs(ctx context.Context, owner, repo string, runID int64) (*Response, error)
RerunRepoActionRunFailedJobs reruns all failed jobs in a workflow run. Requires Gitea 1.26.0 or later.
func (*ActionsService) RerunRepoRunJob ¶
func (c *ActionsService) RerunRepoRunJob(ctx context.Context, owner, repo string, runID, jobID int64) (*ActionsWorkflowJob, *Response, error)
RerunRepoRunJob reruns a specific workflow job in a run. Requires Gitea 1.26.0 or later.
func (*ActionsService) UpdateGlobalRunner ¶
func (c *ActionsService) UpdateGlobalRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
UpdateGlobalRunner updates one global Actions runner.
func (*ActionsService) UpdateOrgRunner ¶
func (c *ActionsService) UpdateOrgRunner(ctx context.Context, org string, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
UpdateOrgActionRunner updates one organization-scoped Actions runner.
func (*ActionsService) UpdateOrgVariable ¶
func (c *ActionsService) UpdateOrgVariable(ctx context.Context, org, name string, opt UpdateActionsVariableOption) (*Response, error)
UpdateOrgActionVariable updates a variable for the specified organization in the Gitea Actions.
func (*ActionsService) UpdateRepoRunner ¶
func (c *ActionsService) UpdateRepoRunner(ctx context.Context, owner, repo string, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
UpdateRepoActionRunner updates one repository-scope Actions runner.
func (*ActionsService) UpdateRepoVariable ¶
func (c *ActionsService) UpdateRepoVariable(ctx context.Context, user, repo, variableName, value string) (*Response, error)
UpdateRepoActionVariable updates a repository variable in the Gitea Actions. It takes the repository owner, name, variable name and the variable value as parameters. The function returns the HTTP response and an error, if any.
func (*ActionsService) UpdateUserRunner ¶
func (c *ActionsService) UpdateUserRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
UpdateUserActionRunner updates one user-scope Actions runner.
func (*ActionsService) UpdateUserVariable ¶
func (c *ActionsService) UpdateUserVariable(ctx context.Context, variableName string, opt UpdateActionsVariableOption) (*Response, error)
UpdateUserActionVariable updates one user-scope Actions variable.
type ActionsTask ¶ added in v1.0.1
type ActionsTask struct {
ID int64 `json:"id"`
Name string `json:"name"` // Workflow name
HeadBranch string `json:"head_branch"`
HeadSHA string `json:"head_sha"`
RunNumber int64 `json:"run_number"`
Event string `json:"event"`
DisplayTitle string `json:"display_title"` // PR title or commit message
Status string `json:"status"`
WorkflowID string `json:"workflow_id"` // e.g. "ci.yml"
URL string `json:"url"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
RunStartedAt time.Time `json:"run_started_at"`
}
ActionsTask represents a workflow run task (from /actions/tasks endpoint) This is the format returned by older Gitea versions
type ActionsTaskResponse ¶ added in v1.0.1
type ActionsTaskResponse struct {
TotalCount int64 `json:"total_count"`
WorkflowRuns []*ActionsTask `json:"workflow_runs"`
}
ActionsTaskResponse holds the response for listing action tasks
type ActionsVariable ¶ added in v1.0.1
type ActionsVariable struct {
OwnerID int64 `json:"owner_id"`
RepoID int64 `json:"repo_id"`
Name string `json:"name"`
Data string `json:"data"`
Description string `json:"description"`
}
ActionsVariable represents an Actions variable.
type ActionsWorkflow ¶ added in v1.0.1
type ActionsWorkflow struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
State string `json:"state"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
BadgeURL string `json:"badge_url"`
DeletedAt time.Time `json:"deleted_at"`
}
ActionsWorkflow represents a repository workflow definition.
type ActionsWorkflowJob ¶ added in v1.0.1
type ActionsWorkflowJob struct {
ID int64 `json:"id"`
RunID int64 `json:"run_id"`
RunURL string `json:"run_url"`
RunAttempt int64 `json:"run_attempt"`
Name string `json:"name"`
HeadBranch string `json:"head_branch,omitempty"`
HeadSha string `json:"head_sha"`
Status string `json:"status"`
Conclusion string `json:"conclusion,omitempty"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
CreatedAt time.Time `json:"created_at"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
RunnerID int64 `json:"runner_id,omitempty"`
RunnerName string `json:"runner_name,omitempty"`
Labels []string `json:"labels"`
Steps []*ActionsWorkflowStep `json:"steps"`
}
ActionsWorkflowJob represents a job within a workflow run
type ActionsWorkflowJobsResponse ¶ added in v1.0.1
type ActionsWorkflowJobsResponse struct {
TotalCount int64 `json:"total_count"`
Jobs []*ActionsWorkflowJob `json:"jobs"`
}
ActionsWorkflowJobsResponse holds the response for listing workflow jobs
type ActionsWorkflowResponse ¶ added in v1.0.1
type ActionsWorkflowResponse struct {
Workflows []*ActionsWorkflow `json:"workflows"`
TotalCount int64 `json:"total_count"`
}
ActionsWorkflowResponse contains a workflow list response.
type ActionsWorkflowRun ¶ added in v1.0.1
type ActionsWorkflowRun struct {
ID int64 `json:"id"`
DisplayTitle string `json:"display_title"`
Event string `json:"event"`
HeadBranch string `json:"head_branch,omitempty"`
HeadSha string `json:"head_sha"`
Path string `json:"path"`
RunAttempt int64 `json:"run_attempt"`
RunNumber int64 `json:"run_number"`
Status string `json:"status"`
Conclusion string `json:"conclusion,omitempty"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
Actor *User `json:"actor,omitempty"`
TriggerActor *User `json:"trigger_actor,omitempty"`
Repository *Repository `json:"repository,omitempty"`
HeadRepository *Repository `json:"head_repository,omitempty"`
RepositoryID int64 `json:"repository_id,omitempty"`
}
ActionsWorkflowRun represents a workflow run (from /actions/runs endpoint) This is the format returned by newer Gitea versions
type ActionsWorkflowRunsResponse ¶ added in v1.0.1
type ActionsWorkflowRunsResponse struct {
TotalCount int64 `json:"total_count"`
WorkflowRuns []*ActionsWorkflowRun `json:"workflow_runs"`
}
ActionsWorkflowRunsResponse holds the response for listing workflow runs
type ActionsWorkflowStep ¶ added in v1.0.1
type ActionsWorkflowStep struct {
Name string `json:"name"`
Number int64 `json:"number"`
Status string `json:"status"`
Conclusion string `json:"conclusion,omitempty"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
}
ActionsWorkflowStep represents a step within a job
type Activity ¶
type Activity struct {
ID int64 `json:"id"`
ActUserID int64 `json:"act_user_id"`
ActUser *User `json:"act_user"`
OpType string `json:"op_type"`
Content string `json:"content"`
RepoID int64 `json:"repo_id"`
Repo *Repository `json:"repo"`
CommentID int64 `json:"comment_id"`
Comment *Comment `json:"comment"`
RefName string `json:"ref_name"`
IsPrivate bool `json:"is_private"`
UserID int64 `json:"user_id"`
Created time.Time `json:"created"`
}
Activity represents a user or organization activity
type ActivityPub ¶
type ActivityPub map[string]interface{}
ActivityPub represents an ActivityPub object
type ActivityPubService ¶
type ActivityPubService struct{ *Client }
ActivityPubService handles ActivityPub federation endpoints.
func (*ActivityPubService) GetPerson ¶
func (c *ActivityPubService) GetPerson(ctx context.Context, userID int64) (ActivityPub, *Response, error)
GetPerson returns the Person actor for a user.
func (*ActivityPubService) GetPersonResponse ¶
func (c *ActivityPubService) GetPersonResponse(ctx context.Context, userID int64) ([]byte, *Response, error)
GetPersonResponse returns the raw ActivityPub Person response.
func (*ActivityPubService) SendInbox ¶
func (c *ActivityPubService) SendInbox(ctx context.Context, userID int64, activity ActivityPub) (*Response, error)
SendInbox sends an ActivityPub message to a user's inbox.
type ActivityService ¶
type ActivityService struct{ *Client }
ActivityService handles activity feed endpoints.
func (*ActivityService) GetUserHeatmap ¶
func (c *ActivityService) GetUserHeatmap(ctx context.Context, username string) ([]*UserHeatmapData, *Response, error)
GetUserHeatmap gets a user's heatmap data.
func (*ActivityService) ListOrgFeeds ¶
func (c *ActivityService) ListOrgFeeds(ctx context.Context, org string, opt ListOrgActivityFeedsOptions) ([]*Activity, *Response, error)
ListOrgActivityFeeds lists the organization's activity feeds
func (*ActivityService) ListRepoFeeds ¶
func (c *ActivityService) ListRepoFeeds(ctx context.Context, owner, repo string, opt ListRepoActivityFeedsOptions) ([]*Activity, *Response, error)
ListRepoActivityFeeds lists activity feeds for a repository
func (*ActivityService) ListTeamFeeds ¶
func (c *ActivityService) ListTeamFeeds(ctx context.Context, teamID int64, opt ListTeamActivityFeedsOptions) ([]*Activity, *Response, error)
ListTeamActivityFeeds lists the team's activity feeds
func (*ActivityService) ListUserFeeds ¶
func (c *ActivityService) ListUserFeeds(ctx context.Context, username string, opt ListUserActivityFeedsOptions) ([]*Activity, *Response, error)
ListUserActivityFeeds lists a user's activity feeds
type AddCollaboratorOption ¶
type AddCollaboratorOption struct {
Permission *AccessMode `json:"permission"`
}
AddCollaboratorOption options when adding a user as a collaborator of a repository
func (*AddCollaboratorOption) Validate ¶
func (opt *AddCollaboratorOption) Validate() error
Validate the AddCollaboratorOption struct
type AddTimeOption ¶
type AddTimeOption struct {
// time in seconds
Time int64 `json:"time"`
// optional
Created time.Time `json:"created"`
// optional
User string `json:"user_name"`
}
AddTimeOption options for adding time to an issue
func (AddTimeOption) Validate ¶
func (opt AddTimeOption) Validate() error
Validate the AddTimeOption struct
type AdminListOrgsOptions ¶
type AdminListOrgsOptions struct {
ListOptions
}
AdminListOrgsOptions options for listing admin's organizations
type AdminListUsersOptions ¶
type AdminListUsersOptions struct {
ListOptions
SourceID int64
LoginName string
Query string
Sort string // "name", "created", "updated", "id"
Order string // "asc", "desc"
Visibility string
IsActive *bool
IsAdmin *bool
IsRestricted *bool
Is2FAEnabled *bool
IsProhibitLogin *bool
}
AdminListUsersOptions options for listing admin users
func (*AdminListUsersOptions) QueryEncode ¶
func (opt *AdminListUsersOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type AdminService ¶
type AdminService struct{ *Client }
AdminService handles admin endpoints.
func (*AdminService) AddUserBadges ¶
func (c *AdminService) AddUserBadges(ctx context.Context, username string, opt UserBadgeOption) (*Response, error)
AddUserBadges adds badges to a user by their slugs
func (*AdminService) AdoptUnadoptedRepo ¶
func (c *AdminService) AdoptUnadoptedRepo(ctx context.Context, owner, repo string) (*Response, error)
AdoptUnadoptedRepo adopts an unadopted repository
func (*AdminService) CreateOrg ¶
func (c *AdminService) CreateOrg(ctx context.Context, user string, opt CreateOrgOption) (*Organization, *Response, error)
CreateOrg create an organization
func (*AdminService) CreateRepo ¶
func (c *AdminService) CreateRepo(ctx context.Context, user string, opt CreateRepoOption) (*Repository, *Response, error)
CreateRepo create a repo
func (*AdminService) CreateUser ¶
func (c *AdminService) CreateUser(ctx context.Context, opt CreateUserOption) (*User, *Response, error)
CreateUser create a user
func (*AdminService) CreateUserPublicKey ¶
func (c *AdminService) CreateUserPublicKey(ctx context.Context, user string, opt CreateKeyOption) (*PublicKey, *Response, error)
CreateUserPublicKey adds a public key for the user
func (*AdminService) DeleteUnadoptedRepo ¶
func (c *AdminService) DeleteUnadoptedRepo(ctx context.Context, owner, repo string) (*Response, error)
DeleteUnadoptedRepo deletes an unadopted repository
func (*AdminService) DeleteUser ¶
DeleteUser delete one user according name
func (*AdminService) DeleteUserBadge ¶
func (c *AdminService) DeleteUserBadge(ctx context.Context, username string, opt UserBadgeOption) (*Response, error)
DeleteUserBadge deletes a user's badge
func (*AdminService) DeleteUserPublicKey ¶
func (c *AdminService) DeleteUserPublicKey(ctx context.Context, user string, keyID int) (*Response, error)
DeleteUserPublicKey deletes a user's public key
func (*AdminService) EditUser ¶
func (c *AdminService) EditUser(ctx context.Context, user string, opt EditUserOption) (*Response, error)
EditUser modify user informations
func (*AdminService) ListCronTasks ¶
func (c *AdminService) ListCronTasks(ctx context.Context, opt ListCronTaskOptions) ([]*CronTask, *Response, error)
ListCronTasks list available cron tasks
func (*AdminService) ListEmails ¶
func (c *AdminService) ListEmails(ctx context.Context, opt ListAdminEmailsOptions) ([]*Email, *Response, error)
ListEmails lists all email addresses
func (*AdminService) ListOrgs ¶
func (c *AdminService) ListOrgs(ctx context.Context, opt AdminListOrgsOptions) ([]*Organization, *Response, error)
ListOrgs lists all orgs
func (*AdminService) ListUnadoptedRepos ¶
func (c *AdminService) ListUnadoptedRepos(ctx context.Context, opt ListUnadoptedReposOptions) ([]string, *Response, error)
ListUnadoptedRepos lists unadopted repositories
func (*AdminService) ListUserBadges ¶
func (c *AdminService) ListUserBadges(ctx context.Context, username string) ([]*Badge, *Response, error)
ListUserBadges lists badges of a user
func (*AdminService) ListUsers ¶
func (c *AdminService) ListUsers(ctx context.Context, opt AdminListUsersOptions) ([]*User, *Response, error)
ListUsers lists all users
func (*AdminService) RenameUser ¶
func (c *AdminService) RenameUser(ctx context.Context, username string, opt RenameUserOption) (*Response, error)
RenameUser renames a user
func (*AdminService) RunCronTasks ¶
RunCronTasks run a cron task
func (*AdminService) SearchEmails ¶
func (c *AdminService) SearchEmails(ctx context.Context, opt SearchAdminEmailsOptions) ([]*Email, *Response, error)
SearchEmails searches email addresses
type AnnotatedTag ¶
type AnnotatedTag struct {
Tag string `json:"tag"`
SHA string `json:"sha"`
URL string `json:"url"`
Message string `json:"message"`
Tagger *CommitUser `json:"tagger"`
Object *AnnotatedTagObject `json:"object"`
Verification *PayloadCommitVerification `json:"verification"`
}
AnnotatedTag represents an annotated tag
type AnnotatedTagObject ¶
type AnnotatedTagObject struct {
Type string `json:"type"`
URL string `json:"url"`
SHA string `json:"sha"`
}
AnnotatedTagObject contains meta information of the tag object
type ApplyDiffPatchFileOptions ¶
type ApplyDiffPatchFileOptions struct {
FileOptions
Content string `json:"content"`
}
ApplyDiffPatchFileOptions applies a patch against repository contents.
func (ApplyDiffPatchFileOptions) Validate ¶
func (opt ApplyDiffPatchFileOptions) Validate() error
Validate checks whether the patch payload is valid.
type ArchiveType ¶
type ArchiveType string
ArchiveType represent supported archive formats by gitea
const ( // ZipArchive represent zip format ZipArchive ArchiveType = ".zip" // TarGZArchive represent tar.gz format TarGZArchive ArchiveType = ".tar.gz" )
type Attachment ¶
type Attachment struct {
ID int64 `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
DownloadCount int64 `json:"download_count"`
Created time.Time `json:"created_at"`
UUID string `json:"uuid"`
DownloadURL string `json:"browser_download_url"`
}
Attachment a generic attachment
type Badge ¶
type Badge struct {
ID int64 `json:"id"`
Slug string `json:"slug"`
Description string `json:"description"`
ImageURL string `json:"image_url"`
}
Badge represents a user badge
type Branch ¶
type Branch struct {
Name string `json:"name"`
Commit *PayloadCommit `json:"commit"`
Protected bool `json:"protected"`
RequiredApprovals int64 `json:"required_approvals"`
EnableStatusCheck bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
UserCanPush bool `json:"user_can_push"`
UserCanMerge bool `json:"user_can_merge"`
EffectiveBranchProtectionName string `json:"effective_branch_protection_name"`
}
Branch represents a repository branch
type BranchProtection ¶
type BranchProtection struct {
BranchName string `json:"branch_name"`
RuleName string `json:"rule_name"`
EnablePush bool `json:"enable_push"`
EnablePushWhitelist bool `json:"enable_push_whitelist"`
PushWhitelistUsernames []string `json:"push_whitelist_usernames"`
PushWhitelistTeams []string `json:"push_whitelist_teams"`
PushWhitelistDeployKeys bool `json:"push_whitelist_deploy_keys"`
EnableMergeWhitelist bool `json:"enable_merge_whitelist"`
MergeWhitelistUsernames []string `json:"merge_whitelist_usernames"`
MergeWhitelistTeams []string `json:"merge_whitelist_teams"`
EnableStatusCheck bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
RequiredApprovals int64 `json:"required_approvals"`
EnableApprovalsWhitelist bool `json:"enable_approvals_whitelist"`
ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"`
ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"`
BlockOnRejectedReviews bool `json:"block_on_rejected_reviews"`
BlockOnOfficialReviewRequests bool `json:"block_on_official_review_requests"`
BlockOnOutdatedBranch bool `json:"block_on_outdated_branch"`
DismissStaleApprovals bool `json:"dismiss_stale_approvals"`
RequireSignedCommits bool `json:"require_signed_commits"`
ProtectedFilePatterns string `json:"protected_file_patterns"`
UnprotectedFilePatterns string `json:"unprotected_file_patterns"`
BlockAdminMergeOverride bool `json:"block_admin_merge_override"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
}
BranchProtection represents a branch protection for a repository
type ChangeFileOperation ¶
type ChangeFileOperation struct {
Operation string `json:"operation"` // create, update, upload, rename, delete
Path string `json:"path"`
Content string `json:"content"` // base64 encoded for create/update
SHA string `json:"sha,omitempty"` // required for update/delete
FromPath string `json:"from_path,omitempty"` // for rename
}
ChangeFileOperation represents a file operation in batch
type ChangeFilesOptions ¶
type ChangeFilesOptions struct {
Files []*ChangeFileOperation `json:"files"`
Message string `json:"message"`
Branch string `json:"branch,omitempty"`
NewBranch string `json:"new_branch,omitempty"`
ForcePush bool `json:"force_push,omitempty"`
Author GitIdentity `json:"author"`
Committer GitIdentity `json:"committer"`
Dates CommitDateOptions `json:"dates"`
Signoff bool `json:"signoff,omitempty"`
}
ChangeFilesOptions options for batch file operations
type ChangedFile ¶
type ChangedFile struct {
Filename string `json:"filename"`
PreviousFilename string `json:"previous_filename"`
Status string `json:"status"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Changes int `json:"changes"`
HTMLURL string `json:"html_url"`
ContentsURL string `json:"contents_url"`
RawURL string `json:"raw_url"`
}
ChangedFile is a changed file in a diff
type Client ¶
type Client struct {
Actions *ActionsService
Activity *ActivityService
ActivityPub *ActivityPubService
Admin *AdminService
Git *GitService
Hooks *HooksService
Issues *IssuesService
Render *RenderService
Meta *MetaService
Notifications *NotificationsService
OAuth2 *OAuth2Service
Organizations *OrganizationsService
Packages *PackagesService
PullRequests *PullRequestsService
Repositories *RepositoriesService
Releases *ReleasesService
Settings *SettingsService
Templates *TemplatesService
Users *UsersService
Wiki *WikiService
// contains filtered or unexported fields
}
Client represents a thread-safe Gitea API client.
func NewClient ¶
func NewClient(url string, options ...ClientOption) (*Client, error)
NewClient initializes and returns a API client. Usage of all gitea.Client methods is concurrency-safe.
func (*Client) AcceptRepoTransfer
deprecated
func (*Client) AddCollaborator
deprecated
func (*Client) AddIssueLabels
deprecated
func (*Client) AddTime
deprecated
func (c *Client) AddTime(ctx context.Context, owner, repo string, index int64, opt AddTimeOption) (*TrackedTime, *Response, error)
Deprecated: use `client.Issues.AddTime` instead.
func (*Client) AddUserBadges
deprecated
func (*Client) AdminCreateOrg
deprecated
func (c *Client) AdminCreateOrg(ctx context.Context, user string, opt CreateOrgOption) (*Organization, *Response, error)
Deprecated: use `client.Admin.CreateOrg` instead.
func (*Client) AdminCreateRepo
deprecated
func (c *Client) AdminCreateRepo(ctx context.Context, user string, opt CreateRepoOption) (*Repository, *Response, error)
Deprecated: use `client.Admin.CreateRepo` instead.
func (*Client) AdminCreateUser
deprecated
func (*Client) AdminCreateUserPublicKey
deprecated
func (*Client) AdminEditUser
deprecated
func (*Client) AdminListOrgs
deprecated
func (c *Client) AdminListOrgs(ctx context.Context, opt AdminListOrgsOptions) ([]*Organization, *Response, error)
Deprecated: use `client.Admin.ListOrgs` instead.
func (*Client) AdminListUsers
deprecated
func (*Client) AdminRenameUser
deprecated
func (*Client) ApplyRepoDiffPatch
deprecated
func (c *Client) ApplyRepoDiffPatch(ctx context.Context, owner, repo string, opt ApplyDiffPatchFileOptions) (*FileResponse, *Response, error)
Deprecated: use `client.Repositories.ApplyRepoDiffPatch` instead.
func (*Client) ChangeFiles
deprecated
func (c *Client) ChangeFiles(ctx context.Context, owner, repo string, opt ChangeFilesOptions) (*FileResponse, *Response, error)
Deprecated: use `client.Repositories.ChangeFiles` instead.
func (*Client) CheckPinAllowed
deprecated
func (*Client) CheckServerVersionConstraint ¶
CheckServerVersionConstraint validates that the login's server satisfies a given version constraint such as ">= 1.11.0+dev"
func (*Client) CollaboratorPermission
deprecated
func (*Client) CreateAccessToken
deprecated
func (c *Client) CreateAccessToken(ctx context.Context, opt CreateAccessTokenOption) (*AccessToken, *Response, error)
Deprecated: use `client.Users.CreateAccessToken` instead.
func (*Client) CreateAdminActionRunnerRegistrationToken
deprecated
func (*Client) CreateAdminHook
deprecated
func (*Client) CreateBranch
deprecated
func (*Client) CreateBranchProtection
deprecated
func (c *Client) CreateBranchProtection(ctx context.Context, owner, repo string, opt CreateBranchProtectionOption) (*BranchProtection, *Response, error)
Deprecated: use `client.Repositories.CreateBranchProtection` instead.
func (*Client) CreateDeployKey
deprecated
func (*Client) CreateFile
deprecated
func (c *Client) CreateFile(ctx context.Context, owner, repo, filepath string, opt CreateFileOptions) (*FileResponse, *Response, error)
Deprecated: use `client.Repositories.CreateFile` instead.
func (*Client) CreateFork
deprecated
func (c *Client) CreateFork(ctx context.Context, user, repo string, form CreateForkOption) (*Repository, *Response, error)
Deprecated: use `client.Repositories.CreateFork` instead.
func (*Client) CreateGPGKey
deprecated
func (*Client) CreateIssue
deprecated
func (*Client) CreateIssueComment
deprecated
func (*Client) CreateLabel
deprecated
func (*Client) CreateMilestone
deprecated
func (*Client) CreateMyHook
deprecated
func (*Client) CreateOauth2
deprecated
func (c *Client) CreateOauth2(ctx context.Context, opt CreateApplicationOption) (*OAuth2Application, *Response, error)
Deprecated: use `client.OAuth2.CreateApplication` instead.
func (*Client) CreateOrg
deprecated
func (c *Client) CreateOrg(ctx context.Context, opt CreateOrgOption) (*Organization, *Response, error)
Deprecated: use `client.Organizations.CreateOrg` instead.
func (*Client) CreateOrgActionRunnerRegistrationToken
deprecated
func (*Client) CreateOrgActionSecret
deprecated
func (*Client) CreateOrgActionVariable
deprecated
func (*Client) CreateOrgHook
deprecated
func (*Client) CreateOrgLabel
deprecated
func (*Client) CreateOrgRepo
deprecated
func (c *Client) CreateOrgRepo(ctx context.Context, org string, opt CreateRepoOption) (*Repository, *Response, error)
Deprecated: use `client.Repositories.CreateOrgRepo` instead.
func (*Client) CreatePublicKey
deprecated
func (*Client) CreatePullRequest
deprecated
func (c *Client) CreatePullRequest(ctx context.Context, owner, repo string, opt CreatePullRequestOption) (*PullRequest, *Response, error)
Deprecated: use `client.PullRequests.CreatePullRequest` instead.
func (*Client) CreatePullReview
deprecated
func (c *Client) CreatePullReview(ctx context.Context, owner, repo string, index int64, opt CreatePullReviewOptions) (*PullReview, *Response, error)
Deprecated: use `client.PullRequests.CreatePullReview` instead.
func (*Client) CreatePullReviewCommentReply
deprecated
func (c *Client) CreatePullReviewCommentReply(ctx context.Context, owner, repo string, index, id int64, opt CreatePullReviewCommentReplyOptions) (*PullReviewComment, *Response, error)
Deprecated: use `client.PullRequests.CreatePullReviewCommentReply` instead.
func (*Client) CreateRelease
deprecated
func (*Client) CreateRepo
deprecated
func (c *Client) CreateRepo(ctx context.Context, opt CreateRepoOption) (*Repository, *Response, error)
Deprecated: use `client.Repositories.CreateRepo` instead.
func (*Client) CreateRepoActionRunnerRegistrationToken
deprecated
func (*Client) CreateRepoActionSecret
deprecated
func (*Client) CreateRepoFromTemplate
deprecated
func (c *Client) CreateRepoFromTemplate(ctx context.Context, templateOwner, templateRepo string, opt CreateRepoFromTemplateOption) (*Repository, *Response, error)
Deprecated: use `client.Repositories.CreateRepoFromTemplate` instead.
func (*Client) CreateRepoHook
deprecated
func (*Client) CreateReviewRequests
deprecated
func (*Client) CreateStatus
deprecated
func (*Client) CreateTagProtection
deprecated
func (c *Client) CreateTagProtection(ctx context.Context, owner, repo string, opt CreateTagProtectionOption) (*TagProtection, *Response, error)
Deprecated: use `client.Repositories.CreateTagProtection` instead.
func (*Client) CreateTeam
deprecated
func (*Client) CreateUserActionRunnerRegistrationToken
deprecated
func (*Client) CreateUserActionSecret
deprecated
func (*Client) CreateUserActionVariable
deprecated
func (*Client) CreateWikiPage
deprecated
func (*Client) DeleteEmail
deprecated
func (*Client) DeleteFile
deprecated
func (*Client) DeleteReviewRequests
deprecated
func (*Client) DeleteUserBadge
deprecated
func (*Client) DismissPullReview
deprecated
func (*Client) DispatchRepoActionWorkflow
deprecated
func (c *Client) DispatchRepoActionWorkflow(ctx context.Context, owner, repo, workflowID string, opt CreateActionsWorkflowDispatchOption, returnRunDetails bool) (*RunDetails, *Response, error)
Deprecated: use `client.Actions.DispatchRepoWorkflow` instead.
func (*Client) EditAdminHook
deprecated
func (*Client) EditBranchProtection
deprecated
func (c *Client) EditBranchProtection(ctx context.Context, owner, repo, name string, opt EditBranchProtectionOption) (*BranchProtection, *Response, error)
Deprecated: use `client.Repositories.EditBranchProtection` instead.
func (*Client) EditIssueAttachment
deprecated
func (c *Client) EditIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
Deprecated: use `client.Issues.EditIssueAttachment` instead.
func (*Client) EditIssueComment
deprecated
func (*Client) EditIssueCommentAttachment
deprecated
func (c *Client) EditIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
Deprecated: use `client.Issues.EditIssueCommentAttachment` instead.
func (*Client) EditMilestone
deprecated
func (*Client) EditMilestoneByName
deprecated
func (*Client) EditMyHook
deprecated
func (*Client) EditOrgHook
deprecated
func (*Client) EditOrgLabel
deprecated
func (*Client) EditPullRequest
deprecated
func (c *Client) EditPullRequest(ctx context.Context, owner, repo string, index int64, opt EditPullRequestOption) (*PullRequest, *Response, error)
Deprecated: use `client.PullRequests.EditPullRequest` instead.
func (*Client) EditRelease
deprecated
func (*Client) EditReleaseAttachment
deprecated
func (c *Client) EditReleaseAttachment(ctx context.Context, user, repo string, release, attachment int64, form EditAttachmentOptions) (*Attachment, *Response, error)
Deprecated: use `client.Releases.EditReleaseAttachment` instead.
func (*Client) EditRepo
deprecated
func (c *Client) EditRepo(ctx context.Context, owner, reponame string, opt EditRepoOption) (*Repository, *Response, error)
Deprecated: use `client.Repositories.EditRepo` instead.
func (*Client) EditRepoGitHook
deprecated
func (*Client) EditRepoHook
deprecated
func (*Client) EditTagProtection
deprecated
func (c *Client) EditTagProtection(ctx context.Context, owner, repo string, id int64, opt EditTagProtectionOption) (*TagProtection, *Response, error)
Deprecated: use `client.Repositories.EditTagProtection` instead.
func (*Client) EditWikiPage
deprecated
func (*Client) GetActivityPubPerson
deprecated
func (*Client) GetAdminActionRunner
deprecated
func (*Client) GetAnnotatedTag
deprecated
func (*Client) GetArchive
deprecated
func (*Client) GetArchiveReader
deprecated
func (c *Client) GetArchiveReader(ctx context.Context, owner, repo, ref string, ext ArchiveType) (io.ReadCloser, *Response, error)
Deprecated: use `client.Repositories.GetArchiveReader` instead.
func (*Client) GetBranchProtection
deprecated
func (*Client) GetCombinedStatus
deprecated
func (*Client) GetCommitPullRequest
deprecated
func (*Client) GetContents
deprecated
func (*Client) GetContentsExt
deprecated
func (c *Client) GetContentsExt(ctx context.Context, owner, repo, filepath string, opt GetContentsExtOptions) (*ContentsExtResponse, *Response, error)
Deprecated: use `client.Repositories.GetContentsExt` instead.
func (*Client) GetFileReader
deprecated
func (*Client) GetGitignoreTemplateInfo
deprecated
func (*Client) GetGlobalAPISettings
deprecated
func (*Client) GetGlobalAttachmentSettings
deprecated
func (*Client) GetGlobalRepoSettings
deprecated
func (*Client) GetGlobalUISettings
deprecated
func (*Client) GetIssueAttachment
deprecated
func (*Client) GetIssueCommentAttachment
deprecated
func (*Client) GetIssueConfig
deprecated
func (*Client) GetIssueLabels
deprecated
func (*Client) GetIssueTemplates
deprecated
func (*Client) GetLabelTemplate
deprecated
func (*Client) GetLicenseTemplateInfo
deprecated
func (*Client) GetMyStarredRepos
deprecated
func (*Client) GetMyWatchedRepos
deprecated
func (*Client) GetNotification
deprecated
func (*Client) GetOrgActionRunner
deprecated
func (*Client) GetOrgActionVariable
deprecated
func (*Client) GetOrgPermissions
deprecated
func (*Client) GetPullRequest
deprecated
func (*Client) GetPullRequestByBaseHead
deprecated
func (*Client) GetPullRequestDiff
deprecated
func (*Client) GetPullReview
deprecated
func (*Client) GetPushMirrorByRemoteName
deprecated
func (*Client) GetReleaseAttachment
deprecated
func (*Client) GetRepoActionArtifact
deprecated
func (*Client) GetRepoActionArtifactArchiveReader
deprecated
func (*Client) GetRepoActionJob
deprecated
func (*Client) GetRepoActionRun
deprecated
func (*Client) GetRepoActionRunner
deprecated
func (*Client) GetRepoActionVariable
deprecated
func (*Client) GetRepoActionWorkflow
deprecated
func (*Client) GetRepoByID
deprecated
func (*Client) GetRepoFileContents
deprecated
func (c *Client) GetRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)
Deprecated: use `client.Repositories.GetRepoFileContents` instead.
func (*Client) GetRepoNote
deprecated
func (*Client) GetStarredRepos
deprecated
func (*Client) GetTagProtection
deprecated
func (*Client) GetTeamRepository
deprecated
func (*Client) GetTrees
deprecated
func (c *Client) GetTrees(ctx context.Context, user, repo string, opt ListTreeOptions) (*GitTreeResponse, *Response, error)
Deprecated: use `client.Git.GetTrees` instead.
func (*Client) GetUserActionRunner
deprecated
func (*Client) GetUserActionVariable
deprecated
func (*Client) GetUserHeatmap
deprecated
func (*Client) GetUserSettings
deprecated
func (*Client) GetUserTrackedTimes
deprecated
func (*Client) GetWatchedRepos
deprecated
func (*Client) GetWikiPageRevisions
deprecated
func (c *Client) GetWikiPageRevisions(ctx context.Context, owner, repo, pageName string, opt ListWikiPageRevisionsOptions) (*WikiCommitList, *Response, error)
Deprecated: use `client.Wiki.GetPageRevisions` instead.
func (*Client) ListAccessTokens
deprecated
func (c *Client) ListAccessTokens(ctx context.Context, opts ListAccessTokensOptions) ([]*AccessToken, *Response, error)
Deprecated: use `client.Users.ListAccessTokens` instead.
func (*Client) ListAdminActionJobs
deprecated
func (c *Client) ListAdminActionJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
Deprecated: use `client.Actions.ListRunJobs` instead.
func (*Client) ListAdminActionRunners
deprecated
func (c *Client) ListAdminActionRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
Deprecated: use `client.Actions.ListGlobalRunners` instead.
func (*Client) ListAdminActionRuns
deprecated
func (c *Client) ListAdminActionRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
Deprecated: use `client.Actions.ListRuns` instead.
func (*Client) ListAdminEmails
deprecated
func (*Client) ListAdminHooks
deprecated
func (*Client) ListBranchProtections
deprecated
func (c *Client) ListBranchProtections(ctx context.Context, owner, repo string, opt ListBranchProtectionsOptions) ([]*BranchProtection, *Response, error)
Deprecated: use `client.Repositories.ListBranchProtections` instead.
func (*Client) ListCollaborators
deprecated
func (*Client) ListContents
deprecated
func (*Client) ListCronTasks
deprecated
func (*Client) ListDeployKeys
deprecated
func (*Client) ListEmails
deprecated
func (*Client) ListFollowers
deprecated
func (*Client) ListFollowing
deprecated
func (*Client) ListForks
deprecated
func (c *Client) ListForks(ctx context.Context, user, repo string, opt ListForksOptions) ([]*Repository, *Response, error)
Deprecated: use `client.Repositories.ListForks` instead.
func (*Client) ListGPGKeys
deprecated
func (*Client) ListIssueAttachments
deprecated
func (*Client) ListIssueBlocks
deprecated
func (*Client) ListIssueCommentAttachments
deprecated
func (*Client) ListIssueComments
deprecated
func (*Client) ListIssueDependencies
deprecated
func (*Client) ListIssueReactions
deprecated
func (*Client) ListIssueSubscribers
deprecated
func (*Client) ListIssueTimeline
deprecated
func (c *Client) ListIssueTimeline(ctx context.Context, owner, repo string, index int64, opt ListIssueCommentOptions) ([]*TimelineComment, *Response, error)
Deprecated: use `client.Issues.ListIssueTimeline` instead.
func (*Client) ListIssueTrackedTimes
deprecated
func (c *Client) ListIssueTrackedTimes(ctx context.Context, owner, repo string, index int64, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
Deprecated: use `client.Issues.ListIssueTrackedTimes` instead.
func (*Client) ListIssues
deprecated
func (*Client) ListLicenseTemplates
deprecated
func (*Client) ListMyBlocks
deprecated
func (*Client) ListMyFollowers
deprecated
func (*Client) ListMyFollowing
deprecated
func (*Client) ListMyGPGKeys
deprecated
func (*Client) ListMyHooks
deprecated
func (*Client) ListMyOrgs
deprecated
func (c *Client) ListMyOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)
Deprecated: use `client.Organizations.ListMyOrgs` instead.
func (*Client) ListMyPublicKeys
deprecated
func (*Client) ListMyRepos
deprecated
func (c *Client) ListMyRepos(ctx context.Context, opt ListReposOptions) ([]*Repository, *Response, error)
Deprecated: use `client.Repositories.ListMyRepos` instead.
func (*Client) ListMyStopwatches
deprecated
func (*Client) ListMyTeams
deprecated
func (*Client) ListMyTrackedTimes
deprecated
func (c *Client) ListMyTrackedTimes(ctx context.Context, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
Deprecated: use `client.Issues.ListMyTrackedTimes` instead.
func (*Client) ListNotifications
deprecated
func (c *Client) ListNotifications(ctx context.Context, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
Deprecated: use `client.Notifications.List` instead.
func (*Client) ListOauth2
deprecated
func (c *Client) ListOauth2(ctx context.Context, opt ListApplicationsOptions) ([]*OAuth2Application, *Response, error)
Deprecated: use `client.OAuth2.ListApplications` instead.
func (*Client) ListOrgActionJobs
deprecated
func (c *Client) ListOrgActionJobs(ctx context.Context, org string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
Deprecated: use `client.Actions.ListOrgRunJobs` instead.
func (*Client) ListOrgActionRunners
deprecated
func (c *Client) ListOrgActionRunners(ctx context.Context, org string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
Deprecated: use `client.Actions.ListOrgRunners` instead.
func (*Client) ListOrgActionRuns
deprecated
func (c *Client) ListOrgActionRuns(ctx context.Context, org string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
Deprecated: use `client.Actions.ListOrgRuns` instead.
func (*Client) ListOrgActionSecret
deprecated
func (*Client) ListOrgActionVariable
deprecated
func (c *Client) ListOrgActionVariable(ctx context.Context, org string, opt ListOrgActionsVariableOption) ([]*ActionsVariable, *Response, error)
Deprecated: use `client.Actions.ListOrgVariables` instead.
func (*Client) ListOrgActivityFeeds
deprecated
func (*Client) ListOrgBlocks
deprecated
func (*Client) ListOrgHooks
deprecated
func (*Client) ListOrgLabels
deprecated
func (*Client) ListOrgMembership
deprecated
func (*Client) ListOrgRepos
deprecated
func (c *Client) ListOrgRepos(ctx context.Context, org string, opt ListOrgReposOptions) ([]*Repository, *Response, error)
Deprecated: use `client.Repositories.ListOrgRepos` instead.
func (*Client) ListOrgTeams
deprecated
func (*Client) ListOrgs
deprecated
func (c *Client) ListOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)
Deprecated: use `client.Organizations.ListOrgs` instead.
func (*Client) ListPackageFiles
deprecated
func (*Client) ListPackageVersions
deprecated
func (*Client) ListPackages
deprecated
func (*Client) ListPublicKeys
deprecated
func (*Client) ListPublicOrgMembership
deprecated
func (*Client) ListPullRequestCommits
deprecated
func (*Client) ListPullRequestFiles
deprecated
func (c *Client) ListPullRequestFiles(ctx context.Context, owner, repo string, index int64, opt ListPullRequestFilesOptions) ([]*ChangedFile, *Response, error)
Deprecated: use `client.PullRequests.ListPullRequestFiles` instead.
func (*Client) ListPullReviewComments
deprecated
func (*Client) ListPullReviews
deprecated
func (c *Client) ListPullReviews(ctx context.Context, owner, repo string, index int64, opt ListPullReviewsOptions) ([]*PullReview, *Response, error)
Deprecated: use `client.PullRequests.ListPullReviews` instead.
func (*Client) ListPushMirrors
deprecated
func (c *Client) ListPushMirrors(ctx context.Context, user, repo string, opt ListOptions) ([]*PushMirrorResponse, *Response, error)
Deprecated: use `client.Repositories.ListPushMirrors` instead.
func (*Client) ListReleaseAttachments
deprecated
func (c *Client) ListReleaseAttachments(ctx context.Context, user, repo string, release int64, opt ListReleaseAttachmentsOptions) ([]*Attachment, *Response, error)
Deprecated: use `client.Releases.ListReleaseAttachments` instead.
func (*Client) ListReleases
deprecated
func (*Client) ListRepoActionArtifacts
deprecated
func (c *Client) ListRepoActionArtifacts(ctx context.Context, owner, repo string, opt ListActionsArtifactsOptions) (*ActionsArtifactsResponse, *Response, error)
Deprecated: use `client.Actions.ListRepoArtifacts` instead.
func (*Client) ListRepoActionJobs
deprecated
func (c *Client) ListRepoActionJobs(ctx context.Context, owner, repo string, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
Deprecated: use `client.Actions.ListRepoRunJobs` instead.
func (*Client) ListRepoActionRunArtifacts
deprecated
func (c *Client) ListRepoActionRunArtifacts(ctx context.Context, owner, repo string, runID int64, opt ListActionsArtifactsOptions) (*ActionsArtifactsResponse, *Response, error)
Deprecated: use `client.Actions.ListRepoRunArtifacts` instead.
func (*Client) ListRepoActionRunJobs
deprecated
func (c *Client) ListRepoActionRunJobs(ctx context.Context, owner, repo string, runID int64, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
Deprecated: use `client.Actions.ListRepoJobsByRun` instead.
func (*Client) ListRepoActionRunners
deprecated
func (c *Client) ListRepoActionRunners(ctx context.Context, owner, repo string, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
Deprecated: use `client.Actions.ListRepoRunners` instead.
func (*Client) ListRepoActionRuns
deprecated
func (c *Client) ListRepoActionRuns(ctx context.Context, owner, repo string, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
Deprecated: use `client.Actions.ListRepoRuns` instead.
func (*Client) ListRepoActionSecret
deprecated
func (*Client) ListRepoActionTasks
deprecated
func (c *Client) ListRepoActionTasks(ctx context.Context, owner, repo string, opt ListOptions) (*ActionsTaskResponse, *Response, error)
Deprecated: use `client.Actions.ListRepoTasks` instead.
func (*Client) ListRepoActionVariable
deprecated
func (c *Client) ListRepoActionVariable(ctx context.Context, user, repo string, opt ListRepoActionsVariableOption) ([]*RepoActionsVariable, *Response, error)
Deprecated: use `client.Actions.ListRepoVariables` instead.
func (*Client) ListRepoActionWorkflows
deprecated
func (*Client) ListRepoActivityFeeds
deprecated
func (*Client) ListRepoBranches
deprecated
func (*Client) ListRepoCommits
deprecated
func (*Client) ListRepoGitHooks
deprecated
func (*Client) ListRepoHooks
deprecated
func (*Client) ListRepoIssueComments
deprecated
func (*Client) ListRepoIssues
deprecated
func (*Client) ListRepoLabels
deprecated
func (*Client) ListRepoMilestones
deprecated
func (*Client) ListRepoNotifications
deprecated
func (c *Client) ListRepoNotifications(ctx context.Context, owner, repo string, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
Deprecated: use `client.Notifications.ListByRepo` instead.
func (*Client) ListRepoPinnedPullRequests
deprecated
func (*Client) ListRepoPullRequests
deprecated
func (c *Client) ListRepoPullRequests(ctx context.Context, owner, repo string, opt ListPullRequestsOptions) ([]*PullRequest, *Response, error)
Deprecated: use `client.PullRequests.ListRepoPullRequests` instead.
func (*Client) ListRepoStargazers
deprecated
func (*Client) ListRepoSubscribers
deprecated
func (*Client) ListRepoTags
deprecated
func (*Client) ListRepoTopics
deprecated
func (*Client) ListRepoTrackedTimes
deprecated
func (c *Client) ListRepoTrackedTimes(ctx context.Context, owner, repo string, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
Deprecated: use `client.Issues.ListRepoTrackedTimes` instead.
func (*Client) ListStatuses
deprecated
func (*Client) ListTagProtection
deprecated
func (c *Client) ListTagProtection(ctx context.Context, owner, repo string, opt ListRepoTagProtectionsOptions) ([]*TagProtection, *Response, error)
Deprecated: use `client.Repositories.ListTagProtection` instead.
func (*Client) ListTeamActivityFeeds
deprecated
func (*Client) ListTeamMembers
deprecated
func (*Client) ListTeamRepositories
deprecated
func (c *Client) ListTeamRepositories(ctx context.Context, id int64, opt ListTeamRepositoriesOptions) ([]*Repository, *Response, error)
Deprecated: use `client.Organizations.ListTeamRepositories` instead.
func (*Client) ListUnadoptedRepos
deprecated
func (*Client) ListUserActionJobs
deprecated
func (c *Client) ListUserActionJobs(ctx context.Context, opt ListRepoActionsJobsOptions) (*ActionsWorkflowJobsResponse, *Response, error)
Deprecated: use `client.Actions.ListUserRunJobs` instead.
func (*Client) ListUserActionRunners
deprecated
func (c *Client) ListUserActionRunners(ctx context.Context, opt ListActionsRunnersOptions) (*ActionsRunnersResponse, *Response, error)
Deprecated: use `client.Actions.ListUserRunners` instead.
func (*Client) ListUserActionRuns
deprecated
func (c *Client) ListUserActionRuns(ctx context.Context, opt ListRepoActionsRunsOptions) (*ActionsWorkflowRunsResponse, *Response, error)
Deprecated: use `client.Actions.ListUserRuns` instead.
func (*Client) ListUserActionVariable
deprecated
func (c *Client) ListUserActionVariable(ctx context.Context, opt ListOptions) ([]*ActionsVariable, *Response, error)
Deprecated: use `client.Actions.ListUserVariables` instead.
func (*Client) ListUserActivityFeeds
deprecated
func (*Client) ListUserOrgs
deprecated
func (c *Client) ListUserOrgs(ctx context.Context, user string, opt ListOrgsOptions) ([]*Organization, *Response, error)
Deprecated: use `client.Organizations.ListUserOrgs` instead.
func (*Client) ListUserRepos
deprecated
func (c *Client) ListUserRepos(ctx context.Context, user string, opt ListReposOptions) ([]*Repository, *Response, error)
Deprecated: use `client.Repositories.ListUserRepos` instead.
func (*Client) ListWikiPages
deprecated
func (c *Client) ListWikiPages(ctx context.Context, owner, repo string, opt ListWikiPagesOptions) ([]*WikiPageMetaData, *Response, error)
Deprecated: use `client.Wiki.ListPages` instead.
func (*Client) MergePullRequest
deprecated
func (*Client) MergeUpstream
deprecated
func (c *Client) MergeUpstream(ctx context.Context, owner, repo string, opt MergeUpstreamRequest) (*MergeUpstreamResponse, *Response, error)
Deprecated: use `client.Repositories.MergeUpstream` instead.
func (*Client) MigrateRepo
deprecated
func (c *Client) MigrateRepo(ctx context.Context, opt MigrateRepoOption) (*Repository, *Response, error)
Deprecated: use `client.Repositories.MigrateRepo` instead.
func (*Client) PostRepoFileContents
deprecated
func (c *Client) PostRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)
Deprecated: use `client.Repositories.PostRepoFileContents` instead.
func (*Client) PushMirrors
deprecated
func (c *Client) PushMirrors(ctx context.Context, user, repo string, opt CreatePushMirrorOption) (*PushMirrorResponse, *Response, error)
Deprecated: use `client.Repositories.PushMirrors` instead.
func (*Client) ReadNotification
deprecated
func (c *Client) ReadNotification(ctx context.Context, id int64, status ...NotificationStatus) (*NotificationThread, *Response, error)
Deprecated: use `client.Notifications.MarkReadByID` instead.
func (*Client) ReadNotifications
deprecated
func (c *Client) ReadNotifications(ctx context.Context, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
Deprecated: use `client.Notifications.MarkRead` instead.
func (*Client) ReadRepoNotifications
deprecated
func (c *Client) ReadRepoNotifications(ctx context.Context, owner, repo string, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
Deprecated: use `client.Notifications.MarkReadByRepo` instead.
func (*Client) RejectRepoTransfer
deprecated
func (*Client) RenameRepoBranch
deprecated
func (*Client) RenderMarkdown
deprecated
func (*Client) RenderMarkup
deprecated
func (*Client) ReplaceIssueLabels
deprecated
func (*Client) RerunRepoActionJob
deprecated
func (*Client) RerunRepoActionRun
deprecated
func (*Client) SearchAdminEmails
deprecated
func (*Client) SearchOrgTeams
deprecated
func (*Client) SearchRepos
deprecated
func (c *Client) SearchRepos(ctx context.Context, opt SearchRepoOptions) ([]*Repository, *Response, error)
Deprecated: use `client.Repositories.SearchRepos` instead.
func (*Client) SearchTopics
deprecated
func (c *Client) SearchTopics(ctx context.Context, opt TopicSearchOptions) (*TopicSearchResult, *Response, error)
Deprecated: use `client.Repositories.SearchTopics` instead.
func (*Client) SearchUsers
deprecated
func (*Client) SendActivityPubInbox
deprecated
func (*Client) SetBasicAuth ¶
SetBasicAuth sets username and password Deprecated: use SetBasicAuth when initializing the client instead of calling this method on an existing client.
func (*Client) SetHTTPClient ¶
SetHTTPClient replaces default http.Client with user given one. Deprecated: use SetHTTPClient when initializing the client instead of calling this method on an existing client.
func (*Client) SetOTP ¶
SetOTP sets OTP for 2FA Deprecated: use SetOTP when initializing the client instead of calling this method on an existing client.
func (*Client) SetUserAgent ¶
SetUserAgent sets the user-agent to send with every request.
func (*Client) SubmitPullReview
deprecated
func (c *Client) SubmitPullReview(ctx context.Context, owner, repo string, index, id int64, opt SubmitPullReviewOptions) (*PullReview, *Response, error)
Deprecated: use `client.PullRequests.SubmitPullReview` instead.
func (*Client) TransferRepo
deprecated
func (c *Client) TransferRepo(ctx context.Context, owner, reponame string, opt TransferRepoOption) (*Repository, *Response, error)
Deprecated: use `client.Repositories.TransferRepo` instead.
func (*Client) UpdateAdminActionRunner
deprecated
func (c *Client) UpdateAdminActionRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
Deprecated: use `client.Actions.UpdateGlobalRunner` instead.
func (*Client) UpdateFile
deprecated
func (c *Client) UpdateFile(ctx context.Context, owner, repo, filepath string, opt UpdateFileOptions) (*FileResponse, *Response, error)
Deprecated: use `client.Repositories.UpdateFile` instead.
func (*Client) UpdateIssueDeadline
deprecated
func (*Client) UpdateOauth2
deprecated
func (c *Client) UpdateOauth2(ctx context.Context, oauth2id int64, opt CreateApplicationOption) (*OAuth2Application, *Response, error)
Deprecated: use `client.OAuth2.UpdateApplication` instead.
func (*Client) UpdateOrgActionRunner
deprecated
func (c *Client) UpdateOrgActionRunner(ctx context.Context, org string, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
Deprecated: use `client.Actions.UpdateOrgRunner` instead.
func (*Client) UpdateOrgActionVariable
deprecated
func (*Client) UpdateOrgAvatar
deprecated
func (*Client) UpdateRepoActionRunner
deprecated
func (c *Client) UpdateRepoActionRunner(ctx context.Context, owner, repo string, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
Deprecated: use `client.Actions.UpdateRepoRunner` instead.
func (*Client) UpdateRepoAvatar
deprecated
func (*Client) UpdateRepoBranchRef
deprecated
func (*Client) UpdateUserActionRunner
deprecated
func (c *Client) UpdateUserActionRunner(ctx context.Context, runnerID int64, opt EditActionsRunnerOption) (*ActionsRunner, *Response, error)
Deprecated: use `client.Actions.UpdateUserRunner` instead.
func (*Client) UpdateUserActionVariable
deprecated
func (*Client) UpdateUserAvatar
deprecated
func (*Client) UpdateUserSettings
deprecated
func (c *Client) UpdateUserSettings(ctx context.Context, opt UserSettingsOptions) (*UserSettings, *Response, error)
Deprecated: use `client.Users.UpdateUserSettings` instead.
func (*Client) ValidateIssueConfig
deprecated
func (*Client) VerifyGPGKey
deprecated
type ClientOption ¶
ClientOption are functions used to init a new client
func SetBasicAuth ¶
func SetBasicAuth(username, password string) ClientOption
SetBasicAuth is an option for NewClient to set username and password
func SetDebugMode ¶
func SetDebugMode() ClientOption
SetDebugMode is an option for NewClient to enable debug mode
func SetGiteaVersion ¶
func SetGiteaVersion(v string) ClientOption
SetGiteaVersion configures the Client to assume the given version of the Gitea server, instead of querying the server for it when initializing. Use "" to skip all canonical ways in the SDK to check for versions
func SetHTTPClient ¶
func SetHTTPClient(httpClient *http.Client) ClientOption
SetHTTPClient is an option for NewClient to set custom http client
func SetOTP ¶
func SetOTP(otp string) ClientOption
SetOTP is an option for NewClient to set OTP for 2FA
func SetSudo ¶
func SetSudo(sudo string) ClientOption
SetSudo is an option for NewClient to set sudo header
func SetToken ¶
func SetToken(token string) ClientOption
SetToken is an option for NewClient to set token
func SetUserAgent ¶
func SetUserAgent(userAgent string) ClientOption
SetUserAgent is an option for NewClient to set user-agent header
func UseSSHCert ¶
func UseSSHCert(principal, sshKey, passphrase string) ClientOption
UseSSHCert is an option for NewClient to enable SSH certificate authentication via HTTPSign If you want to auth against the ssh-agent you'll need to set a principal, if you want to use a file on disk you'll need to specify sshKey. If you have an encrypted sshKey you'll need to also set the passphrase.
func UseSSHPubkey ¶
func UseSSHPubkey(fingerprint, sshKey, passphrase string) ClientOption
UseSSHPubkey is an option for NewClient to enable SSH pubkey authentication via HTTPSign If you want to auth against the ssh-agent you'll need to set a fingerprint, if you want to use a file on disk you'll need to specify sshKey. If you have an encrypted sshKey you'll need to also set the passphrase.
type CollaboratorPermissionResult ¶
type CollaboratorPermissionResult struct {
Permission AccessMode `json:"permission"`
Role string `json:"role_name"`
User *User `json:"user"`
}
CollaboratorPermissionResult result type for CollaboratorPermission
type CombinedStatus ¶
type CombinedStatus struct {
State StatusState `json:"state"`
SHA string `json:"sha"`
TotalCount int `json:"total_count"`
Statuses []*Status `json:"statuses"`
Repository *Repository `json:"repository"`
CommitURL string `json:"commit_url"`
URL string `json:"url"`
}
CombinedStatus holds the combined state of several statuses for a single commit
type Comment ¶
type Comment struct {
ID int64 `json:"id"`
HTMLURL string `json:"html_url"`
PRURL string `json:"pull_request_url"`
IssueURL string `json:"issue_url"`
Poster *User `json:"user"`
OriginalAuthor string `json:"original_author"`
OriginalAuthorID int64 `json:"original_author_id"`
Body string `json:"body"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Attachments []*Attachment `json:"assets"`
}
Comment represents a comment on a commit or issue
type Commit ¶
type Commit struct {
*CommitMeta
HTMLURL string `json:"html_url"`
RepoCommit *RepoCommit `json:"commit"`
Author *User `json:"author"`
Committer *User `json:"committer"`
Parents []*CommitMeta `json:"parents"`
Files []*CommitAffectedFiles `json:"files"`
Stats *CommitStats `json:"stats"`
}
Commit contains information generated from a Git commit.
type CommitAffectedFiles ¶
type CommitAffectedFiles struct {
Filename string `json:"filename"`
}
CommitAffectedFiles store information about files affected by the commit
type CommitDateOptions ¶
type CommitDateOptions struct {
Author time.Time `json:"author"`
Committer time.Time `json:"committer"`
}
CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
type CommitMeta ¶
type CommitMeta struct {
URL string `json:"url"`
SHA string `json:"sha"`
Created time.Time `json:"created"`
}
CommitMeta contains meta information of a commit in terms of API.
type CommitStats ¶
type CommitStats struct {
Total int `json:"total"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
}
CommitStats contains stats from a Git commit
type CommitUser ¶
type CommitUser struct {
GitIdentity
Date string `json:"date"`
}
CommitUser contains information of a user in the context of a commit.
type Compare ¶
type Compare struct {
TotalCommits int `json:"total_commits"` // Total number of commits in the comparison.
Commits []*Commit `json:"commits"` // List of commits in the comparison.
}
Compare represents a comparison between two commits.
type ContentsExtResponse ¶
type ContentsExtResponse struct {
DirContents []*ContentsResponse `json:"dir_contents,omitempty"`
FileContents *ContentsResponse `json:"file_contents,omitempty"`
}
ContentsExtResponse contains extended information about a repo's contents
type ContentsResponse ¶
type ContentsResponse struct {
Name string `json:"name"`
Path string `json:"path"`
SHA string `json:"sha"`
LastCommitSha *string `json:"last_commit_sha,omitempty"`
// swagger:strfmt date-time
LastCommitterDate *time.Time `json:"last_committer_date,omitempty"`
// swagger:strfmt date-time
LastAuthorDate *time.Time `json:"last_author_date,omitempty"`
LastCommitMessage *string `json:"last_commit_message,omitempty"`
// `type` will be `file`, `dir`, `symlink`, or `submodule`
Type string `json:"type"`
Size int64 `json:"size"`
// `encoding` is populated when `type` is `file`, otherwise null
Encoding *string `json:"encoding"`
// `content` is populated when `type` is `file`, otherwise null
Content *string `json:"content"`
// `target` is populated when `type` is `symlink`, otherwise null
Target *string `json:"target"`
URL *string `json:"url"`
HTMLURL *string `json:"html_url"`
GitURL *string `json:"git_url"`
DownloadURL *string `json:"download_url"`
// `submodule_git_url` is populated when `type` is `submodule`, otherwise null
SubmoduleGitURL *string `json:"submodule_git_url"`
Links *FileLinksResponse `json:"_links"`
LfsOid *string `json:"lfs_oid,omitempty"`
LfsSize *int64 `json:"lfs_size,omitempty"`
}
ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
type CreateAccessTokenOption ¶
type CreateAccessTokenOption struct {
Name string `json:"name"`
Scopes []AccessTokenScope `json:"scopes"`
}
CreateAccessTokenOption options when create access token
type CreateActionVariableOption
deprecated
type CreateActionVariableOption = CreateActionsVariableOption
Deprecated: use CreateActionsVariableOption instead.
type CreateActionWorkflowDispatchOption
deprecated
type CreateActionWorkflowDispatchOption = CreateActionsWorkflowDispatchOption
Deprecated: use CreateActionsWorkflowDispatchOption instead.
type CreateActionsVariableOption ¶ added in v1.0.1
type CreateActionsVariableOption struct {
Value string `json:"value"`
Description string `json:"description"`
}
CreateActionsVariableOption is used to create an Actions variable.
func (CreateActionsVariableOption) Validate ¶ added in v1.0.1
func (opt CreateActionsVariableOption) Validate() error
Validate checks whether the variable create payload is valid.
type CreateActionsWorkflowDispatchOption ¶ added in v1.0.1
type CreateActionsWorkflowDispatchOption struct {
Ref string `json:"ref"`
Inputs map[string]string `json:"inputs,omitempty"`
}
CreateActionsWorkflowDispatchOption triggers a workflow_dispatch event.
func (CreateActionsWorkflowDispatchOption) Validate ¶ added in v1.0.1
func (opt CreateActionsWorkflowDispatchOption) Validate() error
Validate checks whether the dispatch payload is valid.
type CreateApplicationOption ¶
type CreateApplicationOption struct {
Name string `json:"name"`
ConfidentialClient bool `json:"confidential_client"`
RedirectURIs []string `json:"redirect_uris"`
}
CreateApplicationOption contains the options for creating an application.
type CreateBranchOption ¶
type CreateBranchOption struct {
// Name of the branch to create
BranchName string `json:"new_branch_name"`
// Name of the old branch to create from (optional)
OldBranchName string `json:"old_branch_name"`
}
CreateBranchOption options when creating a branch in a repository
func (CreateBranchOption) Validate ¶
func (opt CreateBranchOption) Validate() error
Validate the CreateBranchOption struct
type CreateBranchProtectionOption ¶
type CreateBranchProtectionOption struct {
BranchName string `json:"branch_name"`
RuleName string `json:"rule_name"`
EnablePush bool `json:"enable_push"`
EnablePushWhitelist bool `json:"enable_push_whitelist"`
PushWhitelistUsernames []string `json:"push_whitelist_usernames"`
PushWhitelistTeams []string `json:"push_whitelist_teams"`
PushWhitelistDeployKeys bool `json:"push_whitelist_deploy_keys"`
EnableMergeWhitelist bool `json:"enable_merge_whitelist"`
MergeWhitelistUsernames []string `json:"merge_whitelist_usernames"`
MergeWhitelistTeams []string `json:"merge_whitelist_teams"`
EnableStatusCheck bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
RequiredApprovals int64 `json:"required_approvals"`
EnableApprovalsWhitelist bool `json:"enable_approvals_whitelist"`
ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"`
ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"`
BlockOnRejectedReviews bool `json:"block_on_rejected_reviews"`
BlockOnOfficialReviewRequests bool `json:"block_on_official_review_requests"`
BlockOnOutdatedBranch bool `json:"block_on_outdated_branch"`
DismissStaleApprovals bool `json:"dismiss_stale_approvals"`
RequireSignedCommits bool `json:"require_signed_commits"`
ProtectedFilePatterns string `json:"protected_file_patterns"`
UnprotectedFilePatterns string `json:"unprotected_file_patterns"`
BlockAdminMergeOverride bool `json:"block_admin_merge_override"`
}
CreateBranchProtectionOption options for creating a branch protection
type CreateEmailOption ¶
type CreateEmailOption struct {
// email addresses to add
Emails []string `json:"emails"`
}
CreateEmailOption options when creating email addresses
type CreateFileOptions ¶
type CreateFileOptions struct {
FileOptions
// content must be base64 encoded
// required: true
Content string `json:"content"`
}
CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
type CreateForkOption ¶
type CreateForkOption struct {
// organization name, if forking into an organization
Organization *string `json:"organization"`
// name of the forked repository
Name *string `json:"name"`
}
CreateForkOption options for creating a fork
type CreateGPGKeyOption ¶
type CreateGPGKeyOption struct {
// An armored GPG key to add
ArmoredKey string `json:"armored_public_key"`
// An optional armored signature for the GPG key
Signature string `json:"armored_signature,omitempty"`
}
CreateGPGKeyOption options create user GPG key
type CreateHookOption ¶
type CreateHookOption struct {
Type HookType `json:"type"`
Config map[string]string `json:"config"`
Events []string `json:"events"`
BranchFilter string `json:"branch_filter"`
Active bool `json:"active"`
AuthorizationHeader string `json:"authorization_header"`
}
CreateHookOption options when create a hook
func (CreateHookOption) Validate ¶
func (opt CreateHookOption) Validate() error
Validate the CreateHookOption struct
type CreateIssueCommentOption ¶
type CreateIssueCommentOption struct {
Body string `json:"body"`
}
CreateIssueCommentOption options for creating a comment on an issue
func (CreateIssueCommentOption) Validate ¶
func (opt CreateIssueCommentOption) Validate() error
Validate the CreateIssueCommentOption struct
type CreateIssueOption ¶
type CreateIssueOption struct {
Title string `json:"title"`
Body string `json:"body"`
Ref string `json:"ref"`
Assignees []string `json:"assignees"`
Deadline *time.Time `json:"due_date"`
// milestone id
Milestone int64 `json:"milestone"`
// list of label ids
Labels []int64 `json:"labels"`
Closed bool `json:"closed"`
}
CreateIssueOption options to create one issue
func (CreateIssueOption) Validate ¶
func (opt CreateIssueOption) Validate() error
Validate the CreateIssueOption struct
type CreateKeyOption ¶
type CreateKeyOption struct {
// Title of the key to add
Title string `json:"title"`
// An armored SSH key to add
Key string `json:"key"`
// Describe if the key has only read access or read/write
ReadOnly bool `json:"read_only"`
}
CreateKeyOption options when creating a key
type CreateLabelOption ¶
type CreateLabelOption struct {
Name string `json:"name"`
// example: #00aabb
Color string `json:"color"`
Description string `json:"description"`
Exclusive bool `json:"exclusive"`
IsArchived bool `json:"is_archived"`
}
CreateLabelOption options for creating a label
func (CreateLabelOption) Validate ¶
func (opt CreateLabelOption) Validate() error
Validate the CreateLabelOption struct
type CreateMilestoneOption ¶
type CreateMilestoneOption struct {
Title string `json:"title"`
Description string `json:"description"`
State StateType `json:"state"`
Deadline *time.Time `json:"due_on"`
}
CreateMilestoneOption options for creating a milestone
func (CreateMilestoneOption) Validate ¶
func (opt CreateMilestoneOption) Validate() error
Validate the CreateMilestoneOption struct
type CreateOauth2Option
deprecated
type CreateOauth2Option = CreateApplicationOption
Deprecated: use CreateApplicationOption.
type CreateOrUpdateSecretOption ¶
type CreateOrUpdateSecretOption struct {
Data string `json:"data"`
Description string `json:"description"`
}
CreateOrUpdateSecretOption contains the data for creating or updating an Actions secret.
func (CreateOrUpdateSecretOption) Validate ¶
func (opt CreateOrUpdateSecretOption) Validate() error
Validate checks whether a secret payload can be sent to the API.
type CreateOrgLabelOption ¶
type CreateOrgLabelOption struct {
// Name of the label
Name string `json:"name"`
// Color of the label in hex format without #
Color string `json:"color"`
// Description of the label
Description string `json:"description"`
// Whether this is an exclusive label
Exclusive bool `json:"exclusive"`
}
func (CreateOrgLabelOption) Validate ¶
func (opt CreateOrgLabelOption) Validate() error
Validate the CreateLabelOption struct
type CreateOrgOption ¶
type CreateOrgOption struct {
Name string `json:"username"`
FullName string `json:"full_name"`
Email string `json:"email"`
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
Visibility VisibleType `json:"visibility"`
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
}
CreateOrgOption options for creating an organization
func (CreateOrgOption) Validate ¶
func (opt CreateOrgOption) Validate() error
Validate the CreateOrgOption struct
type CreatePullRequestOption ¶
type CreatePullRequestOption struct {
Head string `json:"head"`
Base string `json:"base"`
Title string `json:"title"`
Body string `json:"body"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
Reviewers []string `json:"reviewers"`
TeamReviewers []string `json:"team_reviewers"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
Deadline *time.Time `json:"due_date"`
}
CreatePullRequestOption options when creating a pull request
type CreatePullReviewComment ¶
type CreatePullReviewComment struct {
// the tree path
Path string `json:"path"`
Body string `json:"body"`
// if comment to old file line or 0
OldLineNum int64 `json:"old_position"`
// if comment to new file line or 0
NewLineNum int64 `json:"new_position"`
}
CreatePullReviewComment represent a review comment for creation api
func (CreatePullReviewComment) Validate ¶
func (opt CreatePullReviewComment) Validate() error
Validate the CreatePullReviewComment struct
type CreatePullReviewCommentReplyOptions ¶
type CreatePullReviewCommentReplyOptions struct {
Body string `json:"body"`
}
CreatePullReviewCommentReplyOptions are options to reply to a pull request review comment.
func (CreatePullReviewCommentReplyOptions) Validate ¶
func (opt CreatePullReviewCommentReplyOptions) Validate() error
Validate the CreatePullReviewCommentReplyOptions struct.
type CreatePullReviewOptions ¶
type CreatePullReviewOptions struct {
State ReviewStateType `json:"event"`
Body string `json:"body"`
CommitID string `json:"commit_id"`
Comments []CreatePullReviewComment `json:"comments"`
}
CreatePullReviewOptions are options to create a pull review
func (CreatePullReviewOptions) Validate ¶
func (opt CreatePullReviewOptions) Validate() error
Validate the CreatePullReviewOptions struct
type CreatePushMirrorOption ¶
type CreateReleaseOption ¶
type CreateReleaseOption struct {
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
IsDraft bool `json:"draft"`
IsPrerelease bool `json:"prerelease"`
}
CreateReleaseOption options when creating a release
func (CreateReleaseOption) Validate ¶
func (opt CreateReleaseOption) Validate() error
Validate the CreateReleaseOption struct
type CreateRepoActionsVariable ¶
type CreateRepoActionsVariable struct {
Value string `json:"value"`
}
CreateActionsVariable represents body for creating a action variable.
type CreateRepoFromTemplateOption ¶
type CreateRepoFromTemplateOption struct {
// Owner is the organization or person who will own the new repository
Owner string `json:"owner"`
// Name of the repository to create
Name string `json:"name"`
// Description of the repository to create
Description string `json:"description"`
// Private is whether the repository is private
Private bool `json:"private"`
// GitContent include git content of default branch in template repo
GitContent bool `json:"git_content"`
// Topics include topics of template repo
Topics bool `json:"topics"`
// GitHooks include git hooks of template repo
GitHooks bool `json:"git_hooks"`
// Webhooks include webhooks of template repo
Webhooks bool `json:"webhooks"`
// Avatar include avatar of the template repo
Avatar bool `json:"avatar"`
// Labels include labels of template repo
Labels bool `json:"labels"`
}
CreateRepoFromTemplateOption options when creating repository using a template
func (CreateRepoFromTemplateOption) Validate ¶
func (opt CreateRepoFromTemplateOption) Validate() error
Validate validates CreateRepoFromTemplateOption
type CreateRepoOption ¶
type CreateRepoOption struct {
// Name of the repository to create
Name string `json:"name"`
// Description of the repository to create
Description string `json:"description"`
// Whether the repository is private
Private bool `json:"private"`
// Issue Label set to use
IssueLabels string `json:"issue_labels"`
// Whether the repository should be auto-intialized?
AutoInit bool `json:"auto_init"`
// Whether the repository is template
Template bool `json:"template"`
// Gitignores to use
Gitignores string `json:"gitignores"`
// License to use
License string `json:"license"`
// Readme of the repository to create
Readme string `json:"readme"`
// DefaultBranch of the repository (used when initializes and in template)
DefaultBranch string `json:"default_branch"`
// TrustModel of the repository
TrustModel TrustModel `json:"trust_model"`
// ObjectFormatName of the repository, could be sha1 or sha256, depends on Gitea version
ObjectFormatName string `json:"object_format_name"`
}
CreateRepoOption options when creating repository
type CreateStatusOption ¶
type CreateStatusOption struct {
State StatusState `json:"state"`
TargetURL string `json:"target_url"`
Description string `json:"description"`
Context string `json:"context"`
}
CreateStatusOption holds the information needed to create a new Status for a Commit
type CreateTagOption ¶
type CreateTagOption struct {
TagName string `json:"tag_name"`
Message string `json:"message"`
Target string `json:"target"`
}
CreateTagOption options when creating a tag
func (CreateTagOption) Validate ¶
func (opt CreateTagOption) Validate() error
Validate validates CreateTagOption
type CreateTagProtectionOption ¶
type CreateTagProtectionOption struct {
NamePattern string `json:"name_pattern"`
WhitelistUsernames []string `json:"whitelist_usernames"`
WhitelistTeams []string `json:"whitelist_teams"`
}
CreateTagProtectionOption options for creating a tag protection
type CreateTeamOption ¶
type CreateTeamOption struct {
Name string `json:"name"`
Description string `json:"description"`
Permission AccessMode `json:"permission"`
CanCreateOrgRepo bool `json:"can_create_org_repo"`
IncludesAllRepositories bool `json:"includes_all_repositories"`
Units []RepoUnitType `json:"units"`
UnitsMap map[string]string `json:"units_map"`
}
CreateTeamOption options for creating a team
func (*CreateTeamOption) Validate ¶
func (opt *CreateTeamOption) Validate() error
Validate the CreateTeamOption struct
type CreateUserOption ¶
type CreateUserOption struct {
SourceID int64 `json:"source_id"`
LoginName string `json:"login_name"`
Username string `json:"username"`
FullName string `json:"full_name"`
Email string `json:"email"`
Password string `json:"password"`
MustChangePassword *bool `json:"must_change_password"`
SendNotify bool `json:"send_notify"`
Visibility *VisibleType `json:"visibility"`
}
CreateUserOption create user options
func (CreateUserOption) Validate ¶
func (opt CreateUserOption) Validate() error
Validate the CreateUserOption struct
type CreateWikiPageOptions ¶
type CreateWikiPageOptions struct {
Title string `json:"title,omitempty"`
ContentBase64 string `json:"content_base64,omitempty"`
Message string `json:"message,omitempty"`
}
CreateWikiPageOptions options for creating or editing a wiki page
type CronTask ¶
type CronTask struct {
Name string `json:"name"`
Schedule string `json:"schedule"`
Next time.Time `json:"next"`
Prev time.Time `json:"prev"`
ExecTimes int64 `json:"exec_times"`
}
CronTask represents a Cron task
type DeleteEmailOption ¶
type DeleteEmailOption struct {
// email addresses to delete
Emails []string `json:"emails"`
}
DeleteEmailOption options when deleting email addresses
type DeleteFileOptions ¶
type DeleteFileOptions struct {
FileOptions
// sha is the SHA for the file that already exists
// required: true
SHA string `json:"sha"`
}
DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
type DeployKey ¶
type DeployKey struct {
ID int64 `json:"id"`
KeyID int64 `json:"key_id"`
Key string `json:"key"`
URL string `json:"url"`
Title string `json:"title"`
Fingerprint string `json:"fingerprint"`
Created time.Time `json:"created_at"`
ReadOnly bool `json:"read_only"`
Repository *Repository `json:"repository,omitempty"`
}
DeployKey a deploy key
type DismissPullReviewOptions ¶
type DismissPullReviewOptions struct {
Message string `json:"message"`
}
DismissPullReviewOptions are options to dismiss a pull review
type EditActionRunnerOption
deprecated
type EditActionRunnerOption = EditActionsRunnerOption
Deprecated: use EditActionsRunnerOption instead.
type EditActionsRunnerOption ¶ added in v1.0.1
type EditActionsRunnerOption struct {
Disabled *bool `json:"disabled"`
}
EditActionsRunnerOption contains editable runner fields.
func (EditActionsRunnerOption) Validate ¶ added in v1.0.1
func (opt EditActionsRunnerOption) Validate() error
Validate checks whether the runner update payload is valid.
type EditAttachmentOptions ¶
type EditAttachmentOptions struct {
Name string `json:"name"`
}
EditAttachmentOptions options for editing attachments
type EditBranchProtectionOption ¶
type EditBranchProtectionOption struct {
EnablePush *bool `json:"enable_push"`
EnablePushWhitelist *bool `json:"enable_push_whitelist"`
PushWhitelistUsernames []string `json:"push_whitelist_usernames"`
PushWhitelistTeams []string `json:"push_whitelist_teams"`
PushWhitelistDeployKeys *bool `json:"push_whitelist_deploy_keys"`
EnableMergeWhitelist *bool `json:"enable_merge_whitelist"`
MergeWhitelistUsernames []string `json:"merge_whitelist_usernames"`
MergeWhitelistTeams []string `json:"merge_whitelist_teams"`
EnableStatusCheck *bool `json:"enable_status_check"`
StatusCheckContexts []string `json:"status_check_contexts"`
RequiredApprovals *int64 `json:"required_approvals"`
EnableApprovalsWhitelist *bool `json:"enable_approvals_whitelist"`
ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"`
ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"`
BlockOnRejectedReviews *bool `json:"block_on_rejected_reviews"`
BlockOnOfficialReviewRequests *bool `json:"block_on_official_review_requests"`
BlockOnOutdatedBranch *bool `json:"block_on_outdated_branch"`
DismissStaleApprovals *bool `json:"dismiss_stale_approvals"`
RequireSignedCommits *bool `json:"require_signed_commits"`
ProtectedFilePatterns *string `json:"protected_file_patterns"`
UnprotectedFilePatterns *string `json:"unprotected_file_patterns"`
BlockAdminMergeOverride *bool `json:"block_admin_merge_override"`
}
EditBranchProtectionOption options for editing a branch protection
type EditDeadlineOption ¶
EditDeadlineOption represents options for updating issue deadline
type EditGitHookOption ¶
type EditGitHookOption struct {
Content string `json:"content"`
}
EditGitHookOption options when modifying one Git hook
type EditHookOption ¶
type EditHookOption struct {
Config map[string]string `json:"config"`
Events []string `json:"events"`
BranchFilter string `json:"branch_filter"`
Active *bool `json:"active"`
AuthorizationHeader string `json:"authorization_header"`
}
EditHookOption options when modify one hook
type EditIssueCommentOption ¶
type EditIssueCommentOption struct {
Body string `json:"body"`
}
EditIssueCommentOption options for editing a comment
func (EditIssueCommentOption) Validate ¶
func (opt EditIssueCommentOption) Validate() error
Validate the EditIssueCommentOption struct
type EditIssueOption ¶
type EditIssueOption struct {
Title string `json:"title"`
Body *string `json:"body"`
Ref *string `json:"ref"`
Assignees []string `json:"assignees"`
Milestone *int64 `json:"milestone"`
State *StateType `json:"state"`
Deadline *time.Time `json:"due_date"`
RemoveDeadline *bool `json:"unset_due_date"`
}
EditIssueOption options for editing an issue
func (EditIssueOption) Validate ¶
func (opt EditIssueOption) Validate() error
Validate the EditIssueOption struct
type EditLabelOption ¶
type EditLabelOption struct {
Name *string `json:"name"`
Color *string `json:"color"`
Description *string `json:"description"`
Exclusive *bool `json:"exclusive"`
IsArchived *bool `json:"is_archived"`
}
EditLabelOption options for editing a label
func (EditLabelOption) Validate ¶
func (opt EditLabelOption) Validate() error
Validate the EditLabelOption struct
type EditMilestoneOption ¶
type EditMilestoneOption struct {
Title string `json:"title"`
Description *string `json:"description"`
State *StateType `json:"state"`
Deadline *time.Time `json:"due_on"`
}
EditMilestoneOption options for editing a milestone
func (EditMilestoneOption) Validate ¶
func (opt EditMilestoneOption) Validate() error
Validate the EditMilestoneOption struct
type EditOrgLabelOption ¶
type EditOrgLabelOption struct {
// New name of the label
Name *string `json:"name"`
// New color of the label in hex format without #
Color *string `json:"color"`
// New description of the label
Description *string `json:"description"`
// Whether this is an exclusive label
Exclusive *bool `json:"exclusive,omitempty"`
}
type EditOrgOption ¶
type EditOrgOption struct {
FullName string `json:"full_name"`
Email string `json:"email"`
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
Visibility VisibleType `json:"visibility"`
RepoAdminChangeTeamAccess *bool `json:"repo_admin_change_team_access"`
}
EditOrgOption options for editing an organization
func (EditOrgOption) Validate ¶
func (opt EditOrgOption) Validate() error
Validate the EditOrgOption struct
type EditPullRequestOption ¶
type EditPullRequestOption struct {
Title string `json:"title"`
Body *string `json:"body"`
Base string `json:"base"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
State *StateType `json:"state"`
Deadline *time.Time `json:"due_date"`
RemoveDeadline *bool `json:"unset_due_date"`
AllowMaintainerEdit *bool `json:"allow_maintainer_edit"`
}
EditPullRequestOption options when modify pull request
type EditReleaseOption ¶
type EditReleaseOption struct {
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
IsDraft *bool `json:"draft"`
IsPrerelease *bool `json:"prerelease"`
}
EditReleaseOption options when editing a release
type EditRepoOption ¶
type EditRepoOption struct {
// name of the repository
Name *string `json:"name,omitempty"`
// a short description of the repository.
Description *string `json:"description,omitempty"`
// a URL with more information about the repository.
Website *string `json:"website,omitempty"`
// either `true` to make the repository private or `false` to make it public.
// Note: you will get a 422 error if the organization restricts changing repository visibility to organization
// owners and a non-owner tries to change the value of private.
Private *bool `json:"private,omitempty"`
// either `true` to make this repository a template or `false` to make it a normal repository
Template *bool `json:"template,omitempty"`
// either `true` to enable issues for this repository or `false` to disable them.
HasIssues *bool `json:"has_issues,omitempty"`
// set this structure to configure internal issue tracker (requires has_issues)
InternalTracker *InternalTracker `json:"internal_tracker,omitempty"`
// set this structure to use external issue tracker (requires has_issues)
ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"`
// either `true` to enable the wiki for this repository or `false` to disable it.
HasWiki *bool `json:"has_wiki,omitempty"`
// set this structure to use external wiki instead of internal (requires has_wiki)
ExternalWiki *ExternalWiki `json:"external_wiki,omitempty"`
// sets the default branch for this repository.
DefaultBranch *string `json:"default_branch,omitempty"`
// either `true` to allow pull requests, or `false` to prevent pull request.
HasPullRequests *bool `json:"has_pull_requests,omitempty"`
// either `true` to enable project unit, or `false` to disable them.
HasProjects *bool `json:"has_projects,omitempty"`
// either `true` to enable release, or `false` to disable them.
HasReleases *bool `json:"has_releases,omitempty"`
// either `true` to enable packages, or `false` to disable them.
HasPackages *bool `json:"has_packages,omitempty"`
// either `true` to enable actions, or `false` to disable them.
HasActions *bool `json:"has_actions,omitempty"`
// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.
IgnoreWhitespaceConflicts *bool `json:"ignore_whitespace_conflicts,omitempty"`
// either `true` to allow merging pull requests with fast-forward only strategy, or `false` to prevent merging pull requests with a fast-forward only strategy. `has_pull_requests` must be `true`.
AllowFastForwardOnlyMerge *bool `json:"allow_fast_forward_only_merge"`
// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.
AllowMerge *bool `json:"allow_merge_commits,omitempty"`
// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.
AllowRebase *bool `json:"allow_rebase,omitempty"`
// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.
AllowRebaseMerge *bool `json:"allow_rebase_explicit,omitempty"`
// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.
AllowSquash *bool `json:"allow_squash_merge,omitempty"`
// set to `true` to archive this repository.
Archived *bool `json:"archived,omitempty"`
// set to a string like `8h30m0s` to set the mirror interval time
MirrorInterval *string `json:"mirror_interval,omitempty"`
// either `true` to allow mark pr as merged manually, or `false` to prevent it. `has_pull_requests` must be `true`.
AllowManualMerge *bool `json:"allow_manual_merge,omitempty"`
// either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.
AutodetectManualMerge *bool `json:"autodetect_manual_merge,omitempty"`
// set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", or "squash". `has_pull_requests` must be `true`.
DefaultMergeStyle *MergeStyle `json:"default_merge_style,omitempty"`
// set to a projects mode to be used by this repository, to specify which kinds of projects to show: "repo" to only allow repo-level projects, "owner" to only allow owner projects, "all" to allow all projects. `has_projects` must be `true`.
ProjectsMode *ProjectsMode `json:"projects_mode"`
// set to `true` to delete the pull request branch after merge by default. `has_pull_requests` must be `true`.
DefaultDeleteBranchAfterMerge *bool `json:"default_delete_branch_after_merge"`
}
EditRepoOption options when editing a repository's properties
type EditTagProtectionOption ¶
type EditTagProtectionOption struct {
NamePattern *string `json:"name_pattern"`
WhitelistUsernames []string `json:"whitelist_usernames"`
WhitelistTeams []string `json:"whitelist_teams"`
}
EditTagProtectionOption options for editing a tag protection
type EditTeamOption ¶
type EditTeamOption struct {
Name string `json:"name"`
Description *string `json:"description"`
Permission AccessMode `json:"permission"`
CanCreateOrgRepo *bool `json:"can_create_org_repo"`
IncludesAllRepositories *bool `json:"includes_all_repositories"`
Units []RepoUnitType `json:"units"`
UnitsMap map[string]string `json:"units_map"`
}
EditTeamOption options for editing a team
func (*EditTeamOption) Validate ¶
func (opt *EditTeamOption) Validate() error
Validate the EditTeamOption struct
type EditUserOption ¶
type EditUserOption struct {
SourceID int64 `json:"source_id"`
LoginName string `json:"login_name"`
Email *string `json:"email"`
FullName *string `json:"full_name"`
Password string `json:"password"`
Description *string `json:"description"`
MustChangePassword *bool `json:"must_change_password"`
Website *string `json:"website"`
Location *string `json:"location"`
Active *bool `json:"active"`
Admin *bool `json:"admin"`
AllowGitHook *bool `json:"allow_git_hook"`
AllowImportLocal *bool `json:"allow_import_local"`
MaxRepoCreation *int `json:"max_repo_creation"`
ProhibitLogin *bool `json:"prohibit_login"`
AllowCreateOrganization *bool `json:"allow_create_organization"`
Restricted *bool `json:"restricted"`
Visibility *VisibleType `json:"visibility"`
}
EditUserOption edit user options
type Email ¶
type Email struct {
Email string `json:"email"`
Verified bool `json:"verified"`
Primary bool `json:"primary"`
UserID int64 `json:"user_id,omitempty"`
Username string `json:"username,omitempty"`
}
Email an email address belonging to a user
type ErrUnknownVersion ¶
type ErrUnknownVersion struct {
// contains filtered or unexported fields
}
ErrUnknownVersion is an unknown version from the API
func (*ErrUnknownVersion) Is ¶
func (*ErrUnknownVersion) Is(target error) bool
type ExternalTracker ¶
type ExternalTracker struct {
// URL of external issue tracker.
ExternalTrackerURL string `json:"external_tracker_url"`
// External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.
ExternalTrackerFormat string `json:"external_tracker_format"`
// External Issue Tracker Number Format, either `numeric` or `alphanumeric`
ExternalTrackerStyle string `json:"external_tracker_style"`
}
ExternalTracker represents settings for external tracker
type ExternalWiki ¶
type ExternalWiki struct {
// URL of external wiki.
ExternalWikiURL string `json:"external_wiki_url"`
}
ExternalWiki represents setting for external wiki
type FileCommitResponse ¶
type FileCommitResponse struct {
CommitMeta
HTMLURL string `json:"html_url"`
Author *CommitUser `json:"author"`
Committer *CommitUser `json:"committer"`
Parents []*CommitMeta `json:"parents"`
Message string `json:"message"`
Tree *CommitMeta `json:"tree"`
}
FileCommitResponse contains information generated from a Git commit for a repo's file.
type FileDeleteResponse ¶
type FileDeleteResponse struct {
Content interface{} `json:"content"` // to be set to nil
Commit *FileCommitResponse `json:"commit"`
Verification *PayloadCommitVerification `json:"verification"`
}
FileDeleteResponse contains information about a repo's file that was deleted
type FileLinksResponse ¶
type FileLinksResponse struct {
Self *string `json:"self"`
GitURL *string `json:"git"`
HTMLURL *string `json:"html"`
}
FileLinksResponse contains the links for a repo's file
type FileOptions ¶
type FileOptions struct {
// message (optional) for the commit of this file. if not supplied, a default message will be used
Message string `json:"message"`
// branch (optional) to base this file from. if not given, the default branch is used
BranchName string `json:"branch"`
// new_branch (optional) will make a new branch from `branch` before creating the file
NewBranchName string `json:"new_branch"`
// force_push (optional) will do a force-push if the new branch already exists
ForcePush bool `json:"force_push"`
// `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
Author GitIdentity `json:"author"`
Committer GitIdentity `json:"committer"`
Dates CommitDateOptions `json:"dates"`
// Add a Signed-off-by trailer by the committer at the end of the commit log message.
Signoff bool `json:"signoff"`
}
FileOptions options for all file APIs
type FileResponse ¶
type FileResponse struct {
Content *ContentsResponse `json:"content"`
Commit *FileCommitResponse `json:"commit"`
Verification *PayloadCommitVerification `json:"verification"`
}
FileResponse contains information about a repo's file
type GPGKey ¶
type GPGKey struct {
ID int64 `json:"id"`
PrimaryKeyID string `json:"primary_key_id"`
KeyID string `json:"key_id"`
PublicKey string `json:"public_key"`
Emails []*GPGKeyEmail `json:"emails"`
SubsKey []*GPGKey `json:"subkeys"`
CanSign bool `json:"can_sign"`
CanEncryptComms bool `json:"can_encrypt_comms"`
CanEncryptStorage bool `json:"can_encrypt_storage"`
CanCertify bool `json:"can_certify"`
Verified bool `json:"verified"`
Created time.Time `json:"created_at,omitempty"`
Expires time.Time `json:"expires_at,omitempty"`
}
GPGKey a user GPG key to sign commit and tag in repository
type GPGKeyEmail ¶
GPGKeyEmail an email attached to a GPGKey
type GetContentsExtOptions ¶
type GetContentsExtOptions struct {
// The name of the commit/branch/tag. Default to the repository's default branch
Ref string `json:"ref,omitempty"`
// Comma-separated includes options: file_content, lfs_metadata, commit_metadata, commit_message
Includes string `json:"includes,omitempty"`
}
GetContentsExtOptions options for getting extended contents
type GetFilesOptions ¶
type GetFilesOptions struct {
Files []string `json:"files"`
}
GetFilesOptions controls batch file-content lookup requests.
func (GetFilesOptions) Validate ¶
func (opt GetFilesOptions) Validate() error
Validate checks whether the batch file lookup request is valid.
type GetRepoNoteOptions ¶
type GetRepoNoteOptions struct {
// include verification for every commit (disable for speedup, default 'true')
Verification *bool `json:"verification,omitempty"`
// include a list of affected files for every commit (disable for speedup, default 'true')
Files *bool `json:"files,omitempty"`
}
GetRepoNoteOptions options for getting a note
type GitBlobResponse ¶
type GitBlobResponse struct {
Content string `json:"content"`
Encoding string `json:"encoding"`
URL string `json:"url"`
SHA string `json:"sha"`
Size int64 `json:"size"`
}
GitBlobResponse represents a git blob
type GitEntry ¶
type GitEntry struct {
Path string `json:"path"`
Mode string `json:"mode"`
Type string `json:"type"`
Size int64 `json:"size"`
SHA string `json:"sha"`
URL string `json:"url"`
}
GitEntry represents a git tree
type GitHook ¶
type GitHook struct {
Name string `json:"name"`
IsActive bool `json:"is_active"`
Content string `json:"content,omitempty"`
}
GitHook represents a Git repository hook
type GitIdentity ¶ added in v1.0.1
GitIdentity for a person's identity like an author or committer.
type GitService ¶
type GitService struct{ *Client }
GitService handles low-level git data endpoints.
func (*GitService) DeleteRepoGitHook ¶
func (c *GitService) DeleteRepoGitHook(ctx context.Context, user, repo, id string) (*Response, error)
DeleteRepoGitHook delete one Git hook from a repository
func (*GitService) EditRepoGitHook ¶
func (c *GitService) EditRepoGitHook(ctx context.Context, user, repo, id string, opt EditGitHookOption) (*Response, error)
EditRepoGitHook modify one Git hook of a repository
func (*GitService) GetBlob ¶
func (c *GitService) GetBlob(ctx context.Context, user, repo, sha string) (*GitBlobResponse, *Response, error)
GetBlob get the blob of a repository file
func (*GitService) GetRepoGitHook ¶
func (c *GitService) GetRepoGitHook(ctx context.Context, user, repo, id string) (*GitHook, *Response, error)
GetRepoGitHook get a Git hook of a repository
func (*GitService) GetRepoNote ¶
func (c *GitService) GetRepoNote(ctx context.Context, owner, repo, sha string, opt GetRepoNoteOptions) (*GitNote, *Response, error)
GetRepoNote gets a note corresponding to a single commit from a repository
func (*GitService) GetRepoRef ¶
func (c *GitService) GetRepoRef(ctx context.Context, user, repo, ref string) (*Reference, *Response, error)
GetRepoRef gets one exact ref from a repository.
The underlying API returns a filtered list for /git/refs/{ref}, so this method resolves the exact ref from that list. It may return HTTP errors from the underlying API call, or an error when the server response only contains partial matches.
func (*GitService) GetRepoRefs ¶
func (c *GitService) GetRepoRefs(ctx context.Context, user, repo, ref string) ([]*Reference, *Response, error)
GetRepoRefs gets the refs from a repository that match a partial or full ref.
func (*GitService) GetTrees ¶
func (c *GitService) GetTrees(ctx context.Context, user, repo string, opt ListTreeOptions) (*GitTreeResponse, *Response, error)
GetTrees get trees of repository,
func (*GitService) ListAllGitRefs ¶
func (c *GitService) ListAllGitRefs(ctx context.Context, owner, repo string) ([]*Reference, *Response, error)
ListAllGitRefs gets all refs from a repository without filtering.
func (*GitService) ListRepoGitHooks ¶
func (c *GitService) ListRepoGitHooks(ctx context.Context, user, repo string, opt ListRepoGitHooksOptions) ([]*GitHook, *Response, error)
ListRepoGitHooks list all the Git hooks of one repository
type GitServiceType ¶
type GitServiceType string
GitServiceType represents a git service
const ( // GitServicePlain represents a plain git service GitServicePlain GitServiceType = "git" // GitServiceGithub represents github.com GitServiceGithub GitServiceType = "github" // GitServiceGitlab represents a gitlab service GitServiceGitlab GitServiceType = "gitlab" // GitServiceGitea represents a gitea service GitServiceGitea GitServiceType = "gitea" // GitServiceGogs represents a gogs service GitServiceGogs GitServiceType = "gogs" )
type GitTreeResponse ¶
type GitTreeResponse struct {
SHA string `json:"sha"`
URL string `json:"url"`
Entries []GitEntry `json:"tree"`
Truncated bool `json:"truncated"`
Page int `json:"page"`
TotalCount int `json:"total_count"`
}
GitTreeResponse returns a git tree
type GitignoreTemplateInfo ¶
GitignoreTemplateInfo represents a gitignore template
type GlobalAPISettings ¶
type GlobalAPISettings struct {
MaxResponseItems int `json:"max_response_items"`
DefaultPagingNum int `json:"default_paging_num"`
DefaultGitTreesPerPage int `json:"default_git_trees_per_page"`
DefaultMaxBlobSize int64 `json:"default_max_blob_size"`
}
GlobalAPISettings contains global api settings exposed by it
type GlobalAttachmentSettings ¶
type GlobalAttachmentSettings struct {
Enabled bool `json:"enabled"`
AllowedTypes string `json:"allowed_types"`
MaxSize int64 `json:"max_size"`
MaxFiles int `json:"max_files"`
}
GlobalAttachmentSettings contains global Attachment settings exposed by API
type GlobalRepoSettings ¶
type GlobalRepoSettings struct {
MirrorsDisabled bool `json:"mirrors_disabled"`
HTTPGitDisabled bool `json:"http_git_disabled"`
MigrationsDisabled bool `json:"migrations_disabled"`
StarsDisabled bool `json:"stars_disabled"`
TimeTrackingDisabled bool `json:"time_tracking_disabled"`
LFSDisabled bool `json:"lfs_disabled"`
}
GlobalRepoSettings represent the global repository settings of a gitea instance witch is exposed by API
type GlobalUISettings ¶
type GlobalUISettings struct {
DefaultTheme string `json:"default_theme"`
AllowedReactions []string `json:"allowed_reactions"`
CustomEmojis []string `json:"custom_emojis"`
}
GlobalUISettings represent the global ui settings of a gitea instance witch is exposed by API
type HTTPSign ¶
HTTPSign contains the signer used for signing requests
func NewHTTPSignWithCert ¶
NewHTTPSignWithCert can be used to create a HTTPSign with a certificate if no principal is specified it returns the first certificate found
func NewHTTPSignWithPubkey ¶
NewHTTPSignWithPubkey can be used to create a HTTPSign with a public key if no fingerprint is specified it returns the first public key found
type HTTPSignConfig ¶
type HTTPSignConfig struct {
// contains filtered or unexported fields
}
HTTPSignConfig contains the configuration for creating a HTTPSign
type Hook ¶
type Hook struct {
ID int64 `json:"id"`
Type string `json:"type"`
URL string `json:"-"`
BranchFilter string `json:"branch_filter"`
Config map[string]string `json:"config"`
Events []string `json:"events"`
AuthorizationHeader string `json:"authorization_header"`
Active bool `json:"active"`
Updated time.Time `json:"updated_at"`
Created time.Time `json:"created_at"`
}
Hook a hook is a web hook when one repository changed
type HookType ¶
type HookType string
HookType represent all webhook types gitea currently offer
const ( // HookTypeDingtalk webhook that dingtalk understand HookTypeDingtalk HookType = "dingtalk" // HookTypeDiscord webhook that discord understand HookTypeDiscord HookType = "discord" // HookTypeGitea webhook that gitea understand HookTypeGitea HookType = "gitea" // HookTypeGogs webhook that gogs understand HookTypeGogs HookType = "gogs" // HookTypeMsteams webhook that msteams understand HookTypeMsteams HookType = "msteams" // HookTypeSlack webhook that slack understand HookTypeSlack HookType = "slack" // HookTypeTelegram webhook that telegram understand HookTypeTelegram HookType = "telegram" // HookTypeFeishu webhook that feishu understand HookTypeFeishu HookType = "feishu" )
type HooksService ¶
type HooksService struct{ *Client }
HooksService handles hook endpoints.
func (*HooksService) CreateGlobalHook ¶
func (c *HooksService) CreateGlobalHook(ctx context.Context, opt CreateHookOption) (*Hook, *Response, error)
CreateGlobalHook creates a global webhook.
func (*HooksService) CreateMyHook ¶
func (c *HooksService) CreateMyHook(ctx context.Context, opt CreateHookOption) (*Hook, *Response, error)
CreateMyHook create one hook for the authenticated user, with options
func (*HooksService) CreateOrgHook ¶
func (c *HooksService) CreateOrgHook(ctx context.Context, org string, opt CreateHookOption) (*Hook, *Response, error)
CreateOrgHook create one hook for an organization, with options
func (*HooksService) CreateRepoHook ¶
func (c *HooksService) CreateRepoHook(ctx context.Context, user, repo string, opt CreateHookOption) (*Hook, *Response, error)
CreateRepoHook create one hook for a repository, with options
func (*HooksService) DeleteGlobalHook ¶
DeleteGlobalHook deletes a global webhook.
func (*HooksService) DeleteMyHook ¶
DeleteMyHook delete one hook from the authenticated user, with hook id
func (*HooksService) DeleteOrgHook ¶
DeleteOrgHook delete one hook from an organization, with hook id
func (*HooksService) DeleteRepoHook ¶
func (c *HooksService) DeleteRepoHook(ctx context.Context, user, repo string, id int64) (*Response, error)
DeleteRepoHook delete one hook from a repository, with hook id
func (*HooksService) EditGlobalHook ¶
func (c *HooksService) EditGlobalHook(ctx context.Context, id int64, opt EditHookOption) (*Hook, *Response, error)
EditGlobalHook edits a global webhook.
func (*HooksService) EditMyHook ¶
func (c *HooksService) EditMyHook(ctx context.Context, id int64, opt EditHookOption) (*Response, error)
EditMyHook modify one hook of the authenticated user, with hook id and options
func (*HooksService) EditOrgHook ¶
func (c *HooksService) EditOrgHook(ctx context.Context, org string, id int64, opt EditHookOption) (*Response, error)
EditOrgHook modify one hook of an organization, with hook id and options
func (*HooksService) EditRepoHook ¶
func (c *HooksService) EditRepoHook(ctx context.Context, user, repo string, id int64, opt EditHookOption) (*Response, error)
EditRepoHook modify one hook of a repository, with hook id and options
func (*HooksService) GetGlobalHook ¶
GetGlobalHook gets a global webhook by ID.
func (*HooksService) GetOrgHook ¶
func (c *HooksService) GetOrgHook(ctx context.Context, org string, id int64) (*Hook, *Response, error)
GetOrgHook get a hook of an organization
func (*HooksService) GetRepoHook ¶
func (c *HooksService) GetRepoHook(ctx context.Context, user, repo string, id int64) (*Hook, *Response, error)
GetRepoHook get a hook of a repository
func (*HooksService) ListGlobalHooks ¶
func (c *HooksService) ListGlobalHooks(ctx context.Context, opt ListGlobalHooksOptions) ([]*Hook, *Response, error)
ListGlobalHooks lists all global webhooks.
func (*HooksService) ListMyHooks ¶
func (c *HooksService) ListMyHooks(ctx context.Context, opt ListHooksOptions) ([]*Hook, *Response, error)
ListMyHooks list all the hooks of the authenticated user
func (*HooksService) ListOrgHooks ¶
func (c *HooksService) ListOrgHooks(ctx context.Context, org string, opt ListHooksOptions) ([]*Hook, *Response, error)
ListOrgHooks list all the hooks of one organization
func (*HooksService) ListRepoHooks ¶
func (c *HooksService) ListRepoHooks(ctx context.Context, user, repo string, opt ListHooksOptions) ([]*Hook, *Response, error)
ListRepoHooks list all the hooks of one repository
func (*HooksService) TestWebhook ¶
func (c *HooksService) TestWebhook(ctx context.Context, owner, repo string, hookID int64, ref string) (*Response, error)
TestWebhook tests a webhook.
type Identity
deprecated
type Identity = GitIdentity
Deprecated: use GitIdentity instead.
type InternalTracker ¶
type InternalTracker struct {
// Enable time tracking (Built-in issue tracker)
EnableTimeTracker bool `json:"enable_time_tracker"`
// Let only contributors track time (Built-in issue tracker)
AllowOnlyContributorsToTrackTime bool `json:"allow_only_contributors_to_track_time"`
// Enable dependencies for issues and pull requests (Built-in issue tracker)
EnableIssueDependencies bool `json:"enable_issue_dependencies"`
}
InternalTracker represents settings for internal tracker
type Issue ¶
type Issue struct {
ID int64 `json:"id"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
Index int64 `json:"number"`
Poster *User `json:"user"`
OriginalAuthor string `json:"original_author"`
OriginalAuthorID int64 `json:"original_author_id"`
Title string `json:"title"`
Body string `json:"body"`
Ref string `json:"ref"`
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignees []*User `json:"assignees"`
// Whether the issue is open or closed
State StateType `json:"state"`
IsLocked bool `json:"is_locked"`
Comments int `json:"comments"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Closed *time.Time `json:"closed_at"`
Deadline *time.Time `json:"due_date"`
PullRequest *PullRequestMeta `json:"pull_request"`
Repository *RepositoryMeta `json:"repository"`
}
Issue represents an issue in a repository
type IssueBlockedBy ¶
type IssueBlockedBy struct {
Index int64 `json:"index"`
Title string `json:"title"`
State string `json:"state"`
CreatedAt time.Time `json:"created_at"`
}
IssueBlockedBy represents an issue that blocks another issue
type IssueConfig ¶
type IssueConfig struct {
BlankIssuesEnabled bool `json:"blank_issues_enabled"`
ContactLinks []IssueConfigContactLink `json:"contact_links"`
}
IssueConfig represents the parsed issue config for a repository.
type IssueConfigContactLink ¶
type IssueConfigContactLink struct {
Name string `json:"name"`
URL string `json:"url"`
About string `json:"about"`
}
IssueConfigContactLink represents an issue config contact link.
type IssueConfigValidation ¶
IssueConfigValidation represents the validation result for issue config
type IssueFormElement ¶
type IssueFormElement struct {
ID string `json:"id"`
Type IssueFormElementType `json:"type"`
Attributes IssueFormElementAttributes `json:"attributes"`
Validations IssueFormElementValidations `json:"validations"`
}
IssueFormElement describes a part of a IssueTemplate form
type IssueFormElementAttributes ¶
type IssueFormElementAttributes struct {
// required for all element types.
// A brief description of the expected user input, which is also displayed in the form.
Label string `json:"label"`
// required for element types "dropdown", "checkboxes"
// for dropdown, contains the available options
Options []string `json:"options"`
// for element types "markdown", "textarea", "input"
// Text that is pre-filled in the input
Value string `json:"value"`
// for element types "textarea", "input", "dropdown", "checkboxes"
// A description of the text area to provide context or guidance, which is displayed in the form.
Description string `json:"description"`
// for element types "textarea", "input"
// A semi-opaque placeholder that renders in the text area when empty.
Placeholder string `json:"placeholder"`
// for element types "textarea"
// A language specifier. If set, the input is rendered as codeblock with syntax highlighting.
SyntaxHighlighting string `json:"render"`
// for element types "dropdown"
Multiple bool `json:"multiple"`
}
IssueFormElementAttributes contains the combined set of attributes available on all element types.
type IssueFormElementType ¶
type IssueFormElementType string
IssueFormElementType is an enum
const ( // IssueFormElementMarkdown is markdown rendered to the form for context, but omitted in the resulting issue IssueFormElementMarkdown IssueFormElementType = "markdown" // IssueFormElementTextarea is a multi line input IssueFormElementTextarea IssueFormElementType = "textarea" // IssueFormElementInput is a single line input IssueFormElementInput IssueFormElementType = "input" // IssueFormElementDropdown is a select form IssueFormElementDropdown IssueFormElementType = "dropdown" // IssueFormElementCheckboxes are a multi checkbox input IssueFormElementCheckboxes IssueFormElementType = "checkboxes" )
type IssueFormElementValidations ¶
type IssueFormElementValidations struct {
// for all element types
Required bool `json:"required"`
// for element types "input"
IsNumber bool `json:"is_number"`
// for element types "input"
Regex string `json:"regex"`
}
IssueFormElementValidations contains the combined set of validations available on all element types.
type IssueLabelsOption ¶
type IssueLabelsOption struct {
// list of label IDs
Labels []int64 `json:"labels"`
}
IssueLabelsOption a collection of labels
type IssueMeta ¶
type IssueMeta struct {
Index int64 `json:"index"`
}
IssueMeta represents issue reference for blocking/dependency operations
type IssueTemplate ¶
type IssueTemplate struct {
Name string `json:"name"`
About string `json:"about"`
Filename string `json:"file_name"`
IssueTitle string `json:"title"`
IssueLabels []string `json:"labels"`
IssueRef string `json:"ref"`
// If non-nil, this is a form-based template
Form []IssueFormElement `json:"body"`
// Should only be used when .Form is nil.
MarkdownContent string `json:"content"`
}
IssueTemplate provides metadata and content on an issue template. There are two types of issue templates: .Markdown- and .Form-based.
func (IssueTemplate) IsForm ¶
func (t IssueTemplate) IsForm() bool
IsForm tells if this template is a form instead of a markdown-based template.
type IssuesService ¶
type IssuesService struct{ *Client }
IssuesService handles issue endpoints.
func (*IssuesService) AddIssueLabels ¶
func (c *IssuesService) AddIssueLabels(ctx context.Context, owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
AddIssueLabels add one or more labels to one issue
func (*IssuesService) AddIssueSubscription ¶
func (c *IssuesService) AddIssueSubscription(ctx context.Context, owner, repo string, index int64, user string) (*Response, error)
AddIssueSubscription Subscribe user to issue
func (*IssuesService) AddTime ¶
func (c *IssuesService) AddTime(ctx context.Context, owner, repo string, index int64, opt AddTimeOption) (*TrackedTime, *Response, error)
AddTime adds time to issue with the given index
func (*IssuesService) CheckIssueSubscription ¶
func (c *IssuesService) CheckIssueSubscription(ctx context.Context, owner, repo string, index int64) (*WatchInfo, *Response, error)
CheckIssueSubscription check if current user is subscribed to an issue
func (*IssuesService) ClearIssueLabels ¶
func (c *IssuesService) ClearIssueLabels(ctx context.Context, owner, repo string, index int64) (*Response, error)
ClearIssueLabels delete all the labels of one issue.
func (*IssuesService) CreateIssue ¶
func (c *IssuesService) CreateIssue(ctx context.Context, owner, repo string, opt CreateIssueOption) (*Issue, *Response, error)
CreateIssue create a new issue for a given repository
func (*IssuesService) CreateIssueAttachment ¶
func (c *IssuesService) CreateIssueAttachment(ctx context.Context, owner, repo string, index int64, file io.Reader, filename string) (*Attachment, *Response, error)
CreateIssueAttachment uploads an attachment for an issue.
func (*IssuesService) CreateIssueBlocking ¶
func (c *IssuesService) CreateIssueBlocking(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
CreateIssueBlocking blocks an issue with another issue
func (*IssuesService) CreateIssueComment ¶
func (c *IssuesService) CreateIssueComment(ctx context.Context, owner, repo string, index int64, opt CreateIssueCommentOption) (*Comment, *Response, error)
CreateIssueComment create comment on an issue.
func (*IssuesService) CreateIssueCommentAttachment ¶
func (c *IssuesService) CreateIssueCommentAttachment(ctx context.Context, owner, repo string, commentID int64, file io.Reader, filename string) (*Attachment, *Response, error)
CreateIssueCommentAttachment uploads an attachment for a comment.
func (*IssuesService) CreateIssueDependency ¶
func (c *IssuesService) CreateIssueDependency(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
CreateIssueDependency creates a new issue dependency
func (*IssuesService) DeleteIssue ¶
func (c *IssuesService) DeleteIssue(ctx context.Context, user, repo string, id int64) (*Response, error)
DeleteIssue delete a issue from a repository
func (*IssuesService) DeleteIssueAttachment ¶
func (c *IssuesService) DeleteIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64) (*Response, error)
DeleteIssueAttachment deletes an issue attachment.
func (*IssuesService) DeleteIssueComment ¶
func (c *IssuesService) DeleteIssueComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)
DeleteIssueComment deletes an issue comment.
func (*IssuesService) DeleteIssueCommentAttachment ¶
func (c *IssuesService) DeleteIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64) (*Response, error)
DeleteIssueCommentAttachment deletes a comment attachment
func (*IssuesService) DeleteIssueCommentReaction ¶
func (c *IssuesService) DeleteIssueCommentReaction(ctx context.Context, owner, repo string, commentID int64, reaction string) (*Response, error)
DeleteIssueCommentReaction remove a reaction from a comment of an issue
func (*IssuesService) DeleteIssueLabel ¶
func (c *IssuesService) DeleteIssueLabel(ctx context.Context, owner, repo string, index, label int64) (*Response, error)
DeleteIssueLabel delete one label of one issue by issue id and label id TODO: maybe we need delete by label name and issue id
func (*IssuesService) DeleteIssueReaction ¶
func (c *IssuesService) DeleteIssueReaction(ctx context.Context, owner, repo string, index int64, reaction string) (*Response, error)
DeleteIssueReaction remove a reaction from an issue
func (*IssuesService) DeleteIssueStopwatch ¶
func (c *IssuesService) DeleteIssueStopwatch(ctx context.Context, owner, repo string, index int64) (*Response, error)
DeleteIssueStopwatch delete / cancel a specific stopwatch
func (*IssuesService) DeleteIssueSubscription ¶
func (c *IssuesService) DeleteIssueSubscription(ctx context.Context, owner, repo string, index int64, user string) (*Response, error)
DeleteIssueSubscription unsubscribe user from issue
func (*IssuesService) DeleteTime ¶
func (c *IssuesService) DeleteTime(ctx context.Context, owner, repo string, index, timeID int64) (*Response, error)
DeleteTime delete a specific tracked time by id of a single issue for a given repository
func (*IssuesService) EditIssue ¶
func (c *IssuesService) EditIssue(ctx context.Context, owner, repo string, index int64, opt EditIssueOption) (*Issue, *Response, error)
EditIssue modify an existing issue for a given repository
func (*IssuesService) EditIssueAttachment ¶
func (c *IssuesService) EditIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
EditIssueAttachment updates an issue attachment.
func (*IssuesService) EditIssueComment ¶
func (c *IssuesService) EditIssueComment(ctx context.Context, owner, repo string, commentID int64, opt EditIssueCommentOption) (*Comment, *Response, error)
EditIssueComment edits an issue comment.
func (*IssuesService) EditIssueCommentAttachment ¶
func (c *IssuesService) EditIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error)
EditIssueCommentAttachment updates a comment attachment
func (*IssuesService) GetIssue ¶
func (c *IssuesService) GetIssue(ctx context.Context, owner, repo string, index int64) (*Issue, *Response, error)
GetIssue returns a single issue for a given repository
func (*IssuesService) GetIssueAttachment ¶
func (c *IssuesService) GetIssueAttachment(ctx context.Context, owner, repo string, index, attachmentID int64) (*Attachment, *Response, error)
GetIssueAttachment gets an issue attachment.
func (*IssuesService) GetIssueComment ¶
func (c *IssuesService) GetIssueComment(ctx context.Context, owner, repo string, id int64) (*Comment, *Response, error)
GetIssueComment get a comment for a given repo by id.
func (*IssuesService) GetIssueCommentAttachment ¶
func (c *IssuesService) GetIssueCommentAttachment(ctx context.Context, owner, repo string, commentID, attachmentID int64) (*Attachment, *Response, error)
GetIssueCommentAttachment gets a comment attachment
func (*IssuesService) GetIssueCommentReactions ¶
func (c *IssuesService) GetIssueCommentReactions(ctx context.Context, owner, repo string, commentID int64) ([]*Reaction, *Response, error)
GetIssueCommentReactions get a list of reactions from a comment of an issue
func (*IssuesService) GetIssueLabels ¶
func (c *IssuesService) GetIssueLabels(ctx context.Context, owner, repo string, index int64, opts ListLabelsOptions) ([]*Label, *Response, error)
GetIssueLabels get labels of one issue via issue id
func (*IssuesService) GetIssueTemplates ¶
func (c *IssuesService) GetIssueTemplates(ctx context.Context, owner, repo string) ([]*IssueTemplate, *Response, error)
GetIssueTemplates lists all issue templates of the repository
func (*IssuesService) GetUserTrackedTimes ¶
func (c *IssuesService) GetUserTrackedTimes(ctx context.Context, owner, repo, user string) ([]*TrackedTime, *Response, error)
GetUserTrackedTimes gets all tracked times for a user in a repository.
func (*IssuesService) IssueSubscribe ¶
func (c *IssuesService) IssueSubscribe(ctx context.Context, owner, repo string, index int64) (*Response, error)
IssueSubscribe subscribe current user to an issue
func (*IssuesService) IssueUnSubscribe ¶
func (c *IssuesService) IssueUnSubscribe(ctx context.Context, owner, repo string, index int64) (*Response, error)
IssueUnSubscribe unsubscribe current user from an issue
func (*IssuesService) ListIssueAttachments ¶
func (c *IssuesService) ListIssueAttachments(ctx context.Context, owner, repo string, index int64) ([]*Attachment, *Response, error)
ListIssueAttachments lists all attachments for an issue.
func (*IssuesService) ListIssueBlocks ¶
func (c *IssuesService) ListIssueBlocks(ctx context.Context, owner, repo string, index int64, opt ListIssueBlocksOptions) ([]*Issue, *Response, error)
ListIssueBlocks lists issues that are blocked by the specified issue with pagination
func (*IssuesService) ListIssueCommentAttachments ¶
func (c *IssuesService) ListIssueCommentAttachments(ctx context.Context, owner, repo string, commentID int64) ([]*Attachment, *Response, error)
ListIssueCommentAttachments lists all attachments for a comment
func (*IssuesService) ListIssueComments ¶
func (c *IssuesService) ListIssueComments(ctx context.Context, owner, repo string, index int64, opt ListIssueCommentOptions) ([]*Comment, *Response, error)
ListIssueComments list comments on an issue.
func (*IssuesService) ListIssueDependencies ¶
func (c *IssuesService) ListIssueDependencies(ctx context.Context, owner, repo string, index int64, opt ListIssueDependenciesOptions) ([]*Issue, *Response, error)
ListIssueDependencies lists issues that block the specified issue (its dependencies) with pagination
func (*IssuesService) ListIssueReactions ¶
func (c *IssuesService) ListIssueReactions(ctx context.Context, owner, repo string, index int64, opt ListIssueReactionsOptions) ([]*Reaction, *Response, error)
ListIssueReactions get a list of reactions for an issue with pagination
func (*IssuesService) ListIssueSubscribers ¶
func (c *IssuesService) ListIssueSubscribers(ctx context.Context, owner, repo string, index int64, opt ListIssueSubscribersOptions) ([]*User, *Response, error)
ListIssueSubscribers get list of users who subscribed on an issue with pagination
func (*IssuesService) ListIssueTimeline ¶
func (c *IssuesService) ListIssueTimeline(ctx context.Context, owner, repo string, index int64, opt ListIssueCommentOptions) ([]*TimelineComment, *Response, error)
ListIssueTimeline list timeline on an issue.
func (*IssuesService) ListIssueTrackedTimes ¶
func (c *IssuesService) ListIssueTrackedTimes(ctx context.Context, owner, repo string, index int64, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
ListIssueTrackedTimes list tracked times of a single issue for a given repository
func (*IssuesService) ListIssues ¶
func (c *IssuesService) ListIssues(ctx context.Context, opt ListIssueOption) ([]*Issue, *Response, error)
ListIssues returns all issues assigned the authenticated user
func (*IssuesService) ListMyStopwatches ¶
func (c *IssuesService) ListMyStopwatches(ctx context.Context, opt ListStopwatchesOptions) ([]*StopWatch, *Response, error)
ListMyStopwatches list all stopwatches with pagination
func (*IssuesService) ListMyTrackedTimes ¶
func (c *IssuesService) ListMyTrackedTimes(ctx context.Context, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
ListMyTrackedTimes list tracked times of the current user with pagination and filtering
func (*IssuesService) ListRepoIssueComments ¶
func (c *IssuesService) ListRepoIssueComments(ctx context.Context, owner, repo string, opt ListIssueCommentOptions) ([]*Comment, *Response, error)
ListRepoIssueComments list comments for a given repo.
func (*IssuesService) ListRepoIssues ¶
func (c *IssuesService) ListRepoIssues(ctx context.Context, owner, repo string, opt ListIssueOption) ([]*Issue, *Response, error)
ListRepoIssues returns all issues for a given repository
func (*IssuesService) ListRepoPinnedIssues ¶
func (c *IssuesService) ListRepoPinnedIssues(ctx context.Context, owner, repo string) ([]*Issue, *Response, error)
ListRepoPinnedIssues lists a repo's pinned issues
func (*IssuesService) ListRepoTrackedTimes ¶
func (c *IssuesService) ListRepoTrackedTimes(ctx context.Context, owner, repo string, opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error)
ListRepoTrackedTimes list tracked times of a repository
func (*IssuesService) LockIssue ¶
func (c *IssuesService) LockIssue(ctx context.Context, owner, repo string, index int64, opt LockIssueOption) (*Response, error)
LockIssue locks an issue
func (*IssuesService) MoveIssuePin ¶
func (c *IssuesService) MoveIssuePin(ctx context.Context, owner, repo string, index, position int64) (*Response, error)
MoveIssuePin moves a pinned issue to the given position
func (*IssuesService) PinIssue ¶
func (c *IssuesService) PinIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)
PinIssue pins an issue
func (*IssuesService) PostIssueCommentReaction ¶
func (c *IssuesService) PostIssueCommentReaction(ctx context.Context, owner, repo string, commentID int64, reaction string) (*Reaction, *Response, error)
PostIssueCommentReaction add a reaction to a comment of an issue
func (*IssuesService) PostIssueReaction ¶
func (c *IssuesService) PostIssueReaction(ctx context.Context, owner, repo string, index int64, reaction string) (*Reaction, *Response, error)
PostIssueReaction add a reaction to an issue
func (*IssuesService) RemoveIssueBlocking ¶
func (c *IssuesService) RemoveIssueBlocking(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
RemoveIssueBlocking removes an issue block
func (*IssuesService) RemoveIssueDependency ¶
func (c *IssuesService) RemoveIssueDependency(ctx context.Context, owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error)
RemoveIssueDependency removes an issue dependency
func (*IssuesService) ReplaceIssueLabels ¶
func (c *IssuesService) ReplaceIssueLabels(ctx context.Context, owner, repo string, index int64, opt IssueLabelsOption) ([]*Label, *Response, error)
ReplaceIssueLabels replace old labels of issue with new labels
func (*IssuesService) ResetIssueTime ¶
func (c *IssuesService) ResetIssueTime(ctx context.Context, owner, repo string, index int64) (*Response, error)
ResetIssueTime reset tracked time of a single issue for a given repository
func (*IssuesService) StartIssueStopWatch ¶
func (c *IssuesService) StartIssueStopWatch(ctx context.Context, owner, repo string, index int64) (*Response, error)
StartIssueStopWatch starts a stopwatch for an existing issue for a given repository
func (*IssuesService) StopIssueStopWatch ¶
func (c *IssuesService) StopIssueStopWatch(ctx context.Context, owner, repo string, index int64) (*Response, error)
StopIssueStopWatch stops an existing stopwatch for an issue in a given repository
func (*IssuesService) UnlockIssue ¶
func (c *IssuesService) UnlockIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)
UnlockIssue unlocks an issue
func (*IssuesService) UnpinIssue ¶
func (c *IssuesService) UnpinIssue(ctx context.Context, owner, repo string, index int64) (*Response, error)
UnpinIssue unpins an issue
func (*IssuesService) UpdateIssueDeadline ¶
func (c *IssuesService) UpdateIssueDeadline(ctx context.Context, owner, repo string, index int64, opt EditDeadlineOption) (*Issue, *Response, error)
UpdateIssueDeadline updates an issue's deadline
type Label ¶
type Label struct {
ID int64 `json:"id"`
Name string `json:"name"`
// example: 00aabb
Color string `json:"color"`
Description string `json:"description"`
Exclusive bool `json:"exclusive"`
IsArchived bool `json:"is_archived"`
URL string `json:"url"`
}
Label a label to an issue or a pr
type LabelTemplate ¶
type LabelTemplate struct {
Name string `json:"name"`
Color string `json:"color"`
Description string `json:"description"`
Exclusive bool `json:"exclusive"`
}
LabelTemplate represents a label template
type LicenseTemplateInfo ¶
type LicenseTemplateInfo struct {
Key string `json:"key"`
Name string `json:"name"`
URL string `json:"url"`
Body string `json:"body"`
Implementation string `json:"implementation"`
}
LicenseTemplateInfo represents a license template
type LicensesTemplateListEntry ¶
type LicensesTemplateListEntry struct {
Key string `json:"key"`
Name string `json:"name"`
URL string `json:"url"`
}
LicensesTemplateListEntry represents a license in the list
type ListAccessTokensOptions ¶
type ListAccessTokensOptions struct {
ListOptions
}
ListAccessTokensOptions options for listing a users's access tokens
type ListActionArtifactsOptions
deprecated
type ListActionArtifactsOptions = ListActionsArtifactsOptions
Deprecated: use ListActionsArtifactsOptions instead.
type ListActionRunnersOptions
deprecated
type ListActionRunnersOptions = ListActionsRunnersOptions
Deprecated: use ListActionsRunnersOptions instead.
type ListActionsArtifactsOptions ¶ added in v1.0.1
type ListActionsArtifactsOptions struct {
ListOptions
Name string
}
ListActionsArtifactsOptions controls artifact listing requests.
func (*ListActionsArtifactsOptions) QueryEncode ¶ added in v1.0.1
func (opt *ListActionsArtifactsOptions) QueryEncode() string
QueryEncode turns the artifact list options into a query string.
type ListActionsRunnersOptions ¶ added in v1.0.1
type ListActionsRunnersOptions struct {
ListOptions
Disabled *bool
}
ListActionsRunnersOptions controls runner listing requests.
func (*ListActionsRunnersOptions) QueryEncode ¶ added in v1.0.1
func (opt *ListActionsRunnersOptions) QueryEncode() string
QueryEncode turns the runner list options into a query string.
type ListAdminEmailsOptions ¶
type ListAdminEmailsOptions struct {
ListOptions
}
ListAdminEmailsOptions options for listing all emails
type ListAdminHooksOptions
deprecated
type ListAdminHooksOptions = ListGlobalHooksOptions
Deprecated: use ListGlobalHooksOptions.
type ListApplicationsOptions ¶
type ListApplicationsOptions struct {
ListOptions
}
ListApplicationsOptions controls OAuth2 application listing requests.
type ListBranchProtectionsOptions ¶
type ListBranchProtectionsOptions struct {
ListOptions
}
ListBranchProtectionsOptions list branch protection options
type ListCollaboratorsOptions ¶
type ListCollaboratorsOptions struct {
ListOptions
}
ListCollaboratorsOptions options for listing a repository's collaborators
type ListCommitOptions ¶
type ListCommitOptions struct {
ListOptions
// SHA or branch to start listing commits from (usually 'master')
SHA string
// Path indicates that only commits that include the path's file/dir should be returned.
Path string
// Stat includes diff stats for every commit (disable for speedup)
Stat bool
// Verification includes verification for every commit (disable for speedup)
Verification bool
// Files includes a list of affected files for every commit (disable for speedup)
Files bool
// Not is a string used such that commits that match the given specifier will not be listed.
Not string
}
ListCommitOptions list commit options
func (*ListCommitOptions) QueryEncode ¶
func (opt *ListCommitOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListCronTaskOptions ¶
type ListCronTaskOptions struct {
ListOptions
}
ListCronTaskOptions list options for ListCronTasks
type ListDeployKeysOptions ¶
type ListDeployKeysOptions struct {
ListOptions
KeyID int64
Fingerprint string
}
ListDeployKeysOptions options for listing a repository's deploy keys
func (*ListDeployKeysOptions) QueryEncode ¶
func (opt *ListDeployKeysOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListEmailsOptions ¶
type ListEmailsOptions struct {
ListOptions
}
ListEmailsOptions options for listing current's user emails
type ListFollowersOptions ¶
type ListFollowersOptions struct {
ListOptions
}
ListFollowersOptions options for listing followers
type ListFollowingOptions ¶
type ListFollowingOptions struct {
ListOptions
}
ListFollowingOptions options for listing a user's users being followed
type ListForksOptions ¶
type ListForksOptions struct {
ListOptions
}
ListForksOptions options for listing repository's forks
type ListGPGKeysOptions ¶
type ListGPGKeysOptions struct {
ListOptions
}
ListGPGKeysOptions options for listing a user's GPGKeys
type ListGlobalHooksOptions ¶
type ListGlobalHooksOptions struct {
ListOptions
// Type of hooks to list: system, default, or all
Type string `json:"type,omitempty"`
}
ListGlobalHooksOptions options for listing global hooks.
type ListHooksOptions ¶
type ListHooksOptions struct {
ListOptions
}
ListHooksOptions options for listing hooks
type ListIssueBlocksOptions ¶
type ListIssueBlocksOptions struct {
ListOptions
}
ListIssueBlocksOptions options for listing issue blocks
type ListIssueCommentOptions ¶
type ListIssueCommentOptions struct {
ListOptions
Since time.Time
Before time.Time
}
ListIssueCommentOptions list comment options
func (*ListIssueCommentOptions) QueryEncode ¶
func (opt *ListIssueCommentOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListIssueDependenciesOptions ¶
type ListIssueDependenciesOptions struct {
ListOptions
}
ListIssueDependenciesOptions options for listing issue dependencies
type ListIssueOption ¶
type ListIssueOption struct {
ListOptions
State StateType
Type IssueType
Labels []string
Milestones []string
KeyWord string
Since time.Time
Before time.Time
// filter by created by username
CreatedBy string
// filter by assigned to username
AssignedBy string
// filter by username mentioned
MentionedBy string
// filter by owner (only works on ListIssues on User)
Owner string
// filter by team (requires organization owner parameter to be provided and only works on ListIssues on User)
Team string
}
ListIssueOption list issue options
func (*ListIssueOption) QueryEncode ¶
func (opt *ListIssueOption) QueryEncode() string
QueryEncode turns options into querystring argument
type ListIssueReactionsOptions ¶
type ListIssueReactionsOptions struct {
ListOptions
}
ListIssueReactionsOptions options for listing issue reactions
type ListIssueSubscribersOptions ¶
type ListIssueSubscribersOptions struct {
ListOptions
}
ListIssueSubscribersOptions options for listing issue subscribers
type ListLabelsOptions ¶
type ListLabelsOptions struct {
ListOptions
}
ListLabelsOptions options for listing repository's labels
type ListMilestoneOption ¶
type ListMilestoneOption struct {
ListOptions
// open, closed, all
State StateType
Name string
}
ListMilestoneOption list milestone options
func (*ListMilestoneOption) QueryEncode ¶
func (opt *ListMilestoneOption) QueryEncode() string
QueryEncode turns options into querystring argument
type ListNotificationOptions ¶
type ListNotificationOptions struct {
ListOptions
Since time.Time
Before time.Time
Status []NotificationStatus
SubjectTypes []NotificationSubjectType
}
ListNotificationOptions represents the filter options
func (*ListNotificationOptions) QueryEncode ¶
func (opt *ListNotificationOptions) QueryEncode() string
QueryEncode encode options to url query
type ListOauth2Option
deprecated
type ListOauth2Option = ListApplicationsOptions
Deprecated: use ListApplicationsOptions.
type ListOptions ¶
type ListOptions struct {
// Setting Page to -1 disables pagination on endpoints that support it.
// Page numbering starts at 1.
Page int
// The default value depends on the server config DEFAULT_PAGING_NUM
// The highest valid value depends on the server config MAX_RESPONSE_ITEMS
PageSize int
}
ListOptions options for using Gitea's API pagination
type ListOrgActionSecretOption
deprecated
type ListOrgActionSecretOption = ListOrgActionsSecretOption
Deprecated: use ListOrgActionsSecretOption instead.
type ListOrgActionVariableOption
deprecated
type ListOrgActionVariableOption = ListOrgActionsVariableOption
Deprecated: use ListOrgActionsVariableOption instead.
type ListOrgActionsSecretOption ¶ added in v1.0.1
type ListOrgActionsSecretOption struct {
ListOptions
}
ListOrgActionsSecretOption list OrgActionSecret options
type ListOrgActionsVariableOption ¶ added in v1.0.1
type ListOrgActionsVariableOption struct {
ListOptions
}
ListOrgActionsVariableOption lists ActionVariable options
type ListOrgActivityFeedsOptions ¶
type ListOrgActivityFeedsOptions struct {
ListOptions
Date string `json:"date,omitempty"`
}
ListOrgActivityFeedsOptions options for listing organization activity feeds
type ListOrgBlocksOptions ¶
type ListOrgBlocksOptions struct {
ListOptions
}
ListOrgBlocksOptions options for listing organization blocks
type ListOrgLabelsOptions ¶
type ListOrgLabelsOptions struct {
ListOptions
}
ListOrgLabelsOptions options for listing organization labels
type ListOrgMembershipOption ¶
type ListOrgMembershipOption struct {
ListOptions
}
ListOrgMembershipOption list OrgMembership options
type ListOrgReposOptions ¶
type ListOrgReposOptions struct {
ListOptions
}
ListOrgReposOptions options for a organization's repositories
type ListOrgsOptions ¶
type ListOrgsOptions struct {
ListOptions
}
ListOrgsOptions options for listing organizations
type ListPackagesOptions ¶
type ListPackagesOptions struct {
ListOptions
// type, and q are only used for ListPackages, not ListPackageVersions
Type string
Q string
}
ListPackagesOptions options for listing packages
type ListPublicKeysOptions ¶
type ListPublicKeysOptions struct {
ListOptions
}
ListPublicKeysOptions options for listing a user's PublicKeys
type ListPullRequestCommitsOptions ¶
type ListPullRequestCommitsOptions struct {
ListOptions
}
ListPullRequestCommitsOptions options for listing pull requests
type ListPullRequestFilesOptions ¶
type ListPullRequestFilesOptions struct {
ListOptions
}
ListPullRequestFilesOptions options for listing pull request files
type ListPullRequestsOptions ¶
type ListPullRequestsOptions struct {
ListOptions
State StateType `json:"state"`
// oldest, recentupdate, leastupdate, mostcomment, leastcomment, priority
Sort string
Milestone int64
}
ListPullRequestsOptions options for listing pull requests
func (*ListPullRequestsOptions) QueryEncode ¶
func (opt *ListPullRequestsOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListPullReviewsOptions ¶
type ListPullReviewsOptions struct {
ListOptions
}
ListPullReviewsOptions options for listing PullReviews
type ListReleaseAttachmentsOptions ¶
type ListReleaseAttachmentsOptions struct {
ListOptions
}
ListReleaseAttachmentsOptions options for listing release's attachments
type ListReleasesOptions ¶
type ListReleasesOptions struct {
ListOptions
IsDraft *bool
IsPreRelease *bool
}
ListReleasesOptions options for listing repository's releases
func (*ListReleasesOptions) QueryEncode ¶
func (opt *ListReleasesOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListRepoActionJobsOptions
deprecated
type ListRepoActionJobsOptions = ListRepoActionsJobsOptions
Deprecated: use ListRepoActionsJobsOptions instead.
type ListRepoActionRunsOptions
deprecated
type ListRepoActionRunsOptions = ListRepoActionsRunsOptions
Deprecated: use ListRepoActionsRunsOptions instead.
type ListRepoActionSecretOption
deprecated
type ListRepoActionSecretOption = ListRepoActionsSecretOption
Deprecated: use ListRepoActionsSecretOption instead.
type ListRepoActionVariableOption
deprecated
type ListRepoActionVariableOption = ListRepoActionsVariableOption
Deprecated: use ListRepoActionsVariableOption instead.
type ListRepoActionsJobsOptions ¶ added in v1.0.1
type ListRepoActionsJobsOptions struct {
ListOptions
Status string // Filter by status (pending, queued, in_progress, failure, success, skipped)
}
ListRepoActionsJobsOptions options for listing repository action jobs
func (*ListRepoActionsJobsOptions) QueryEncode ¶ added in v1.0.1
func (opt *ListRepoActionsJobsOptions) QueryEncode() string
QueryEncode encodes the options to URL query parameters
type ListRepoActionsRunsOptions ¶ added in v1.0.1
type ListRepoActionsRunsOptions struct {
ListOptions
Branch string // Filter by branch
Event string // Filter by triggering event
Status string // Filter by status (pending, queued, in_progress, failure, success, skipped)
Actor string // Filter by actor (user who triggered the run)
HeadSHA string // Filter by the SHA of the head commit
}
ListRepoActionsRunsOptions options for listing repository action runs
func (*ListRepoActionsRunsOptions) QueryEncode ¶ added in v1.0.1
func (opt *ListRepoActionsRunsOptions) QueryEncode() string
QueryEncode encodes the options to URL query parameters
type ListRepoActionsSecretOption ¶ added in v1.0.1
type ListRepoActionsSecretOption struct {
ListOptions
}
ListRepoActionsSecretOption list RepoActionSecret options
type ListRepoActionsVariableOption ¶ added in v1.0.1
type ListRepoActionsVariableOption struct {
ListOptions
}
ListRepoActionsVariableOption lists RepoActionsVariable options
type ListRepoActivityFeedsOptions ¶
type ListRepoActivityFeedsOptions struct {
ListOptions
Date string `json:"date"` // the date of the activities to be found (format: YYYY-MM-DD)
}
ListRepoActivityFeedsOptions options for listing repository activity feeds
type ListRepoBranchesOptions ¶
type ListRepoBranchesOptions struct {
ListOptions
}
ListRepoBranchesOptions options for listing a repository's branches
type ListRepoGitHooksOptions ¶
type ListRepoGitHooksOptions struct {
ListOptions
}
ListRepoGitHooksOptions options for listing repository's githooks
type ListRepoTagProtectionsOptions ¶
type ListRepoTagProtectionsOptions struct {
ListOptions
}
ListRepoTagsOptions options for listing a repository's tags
type ListRepoTagsOptions ¶
type ListRepoTagsOptions struct {
ListOptions
}
ListRepoTagsOptions options for listing a repository's tags
type ListRepoTopicsOptions ¶
type ListRepoTopicsOptions struct {
ListOptions
}
ListRepoTopicsOptions options for listing repo's topics
type ListReposOptions ¶
type ListReposOptions struct {
ListOptions
}
ListReposOptions options for listing repositories
type ListStargazersOptions ¶
type ListStargazersOptions struct {
ListOptions
}
ListStargazersOptions options for listing a repository's stargazers
type ListStatusesOption ¶
type ListStatusesOption struct {
ListOptions
}
ListStatusesOption options for listing a repository's commit's statuses
type ListStopwatchesOptions ¶
type ListStopwatchesOptions struct {
ListOptions
}
ListStopwatchesOptions options for listing stopwatches
type ListTeamActivityFeedsOptions ¶
type ListTeamActivityFeedsOptions struct {
ListOptions
Date string `json:"date,omitempty"`
}
ListTeamActivityFeedsOptions options for listing team activity feeds
type ListTeamMembersOptions ¶
type ListTeamMembersOptions struct {
ListOptions
}
ListTeamMembersOptions options for listing team's members
type ListTeamRepositoriesOptions ¶
type ListTeamRepositoriesOptions struct {
ListOptions
}
ListTeamRepositoriesOptions options for listing team's repositories
type ListTeamsOptions ¶
type ListTeamsOptions struct {
ListOptions
}
ListTeamsOptions options for listing teams
type ListTrackedTimesOptions ¶
type ListTrackedTimesOptions struct {
ListOptions
Since time.Time
Before time.Time
// User filter is only used by ListRepoTrackedTimes !!!
User string
}
ListTrackedTimesOptions options for listing repository's tracked times
func (*ListTrackedTimesOptions) QueryEncode ¶
func (opt *ListTrackedTimesOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type ListTreeOptions ¶
type ListTreeOptions struct {
ListOptions
// Ref can be branch/tag/commit. required
// e.g.: "master"
Ref string
// Recursive if true will return the tree in a recursive fashion
Recursive bool
}
type ListUnadoptedReposOptions ¶
type ListUnadoptedReposOptions struct {
ListOptions
Pattern string `json:"pattern,omitempty"`
}
ListUnadoptedReposOptions options for listing unadopted repositories
type ListUserActivityFeedsOptions ¶
type ListUserActivityFeedsOptions struct {
ListOptions
OnlyPerformedBy bool `json:"only-performed-by,omitempty"`
Date string `json:"date,omitempty"`
}
ListUserActivityFeedsOptions options for listing user activity feeds
type ListUserBlocksOptions ¶
type ListUserBlocksOptions struct {
ListOptions
}
ListUserBlocksOptions options for listing user blocks
type ListWikiPageRevisionsOptions ¶
type ListWikiPageRevisionsOptions struct {
Page int `json:"page,omitempty"`
}
ListWikiPageRevisionsOptions options for listing wiki page revisions
type ListWikiPagesOptions ¶
type ListWikiPagesOptions struct {
ListOptions
}
ListWikiPagesOptions options for listing wiki pages
type LockIssueOption ¶
type LockIssueOption struct {
LockReason string `json:"lock_reason"`
}
LockIssueOption represents options for locking an issue
type MarkNotificationOptions ¶
type MarkNotificationOptions struct {
LastReadAt time.Time
Status []NotificationStatus
ToStatus NotificationStatus
}
MarkNotificationOptions represents the filter & modify options
func (*MarkNotificationOptions) QueryEncode ¶
func (opt *MarkNotificationOptions) QueryEncode() string
QueryEncode encode options to url query
type MarkdownOption ¶
type MarkdownOption struct {
Text string `json:"Text"`
Mode string `json:"Mode"`
Context string `json:"Context"`
Wiki bool `json:"Wiki"`
}
MarkdownOption represents options for rendering markdown
type MarkupOption ¶
type MarkupOption struct {
Text string `json:"Text"`
Mode string `json:"Mode"`
Context string `json:"Context"`
FilePath string `json:"FilePath"`
Wiki bool `json:"Wiki"`
}
MarkupOption represents options for rendering markup
type MergePullRequestOption ¶
type MergePullRequestOption struct {
Style MergeStyle `json:"Do"`
MergeCommitID string `json:"MergeCommitID"`
Title string `json:"MergeTitleField"`
Message string `json:"MergeMessageField"`
DeleteBranchAfterMerge *bool `json:"delete_branch_after_merge,omitempty"`
ForceMerge bool `json:"force_merge"`
HeadCommitId string `json:"head_commit_id"`
MergeWhenChecksSucceed bool `json:"merge_when_checks_succeed"`
}
MergePullRequestOption options when merging a pull request
type MergeStyle ¶
type MergeStyle string
MergeStyle is used specify how a pull is merged
const ( // MergeStyleMerge merge pull as usual MergeStyleMerge MergeStyle = "merge" // MergeStyleRebase rebase pull MergeStyleRebase MergeStyle = "rebase" // MergeStyleRebaseMerge rebase and merge pull MergeStyleRebaseMerge MergeStyle = "rebase-merge" // MergeStyleSquash squash and merge pull MergeStyleSquash MergeStyle = "squash" // MergeStyleFastForwardOnly fast-forward merge MergeStyleFastForwardOnly MergeStyle = "fast-forward-only" // MergeStyleManuallyMerged manually merged MergeStyleManuallyMerged MergeStyle = "manually-merged" )
type MergeUpstreamRequest ¶
MergeUpstreamRequest options for merging upstream
type MergeUpstreamResponse ¶
type MergeUpstreamResponse struct {
MergeStyle string `json:"merge_type"`
}
MergeUpstreamResponse represents the response from merging upstream
type MetaService ¶
type MetaService struct{ *Client }
MetaService handles instance metadata endpoints.
func (*MetaService) GetNodeInfo ¶
GetNodeInfo gets the nodeinfo of the Gitea application.
func (*MetaService) GetSigningKeyGPG ¶
GetSigningKeyGPG gets the default GPG signing key.
func (*MetaService) GetSigningKeySSH ¶
GetSigningKeySSH gets the default SSH signing key.
func (*MetaService) ServerVersion ¶
ServerVersion returns the version of the server.
type MigrateRepoOption ¶
type MigrateRepoOption struct {
RepoName string `json:"repo_name"`
RepoOwner string `json:"repo_owner"`
// deprecated use RepoOwner
RepoOwnerID int64 `json:"uid"`
CloneAddr string `json:"clone_addr"`
Service GitServiceType `json:"service"`
AuthUsername string `json:"auth_username"`
AuthPassword string `json:"auth_password"`
AuthToken string `json:"auth_token"`
Mirror bool `json:"mirror"`
Private bool `json:"private"`
Description string `json:"description"`
Wiki bool `json:"wiki"`
Milestones bool `json:"milestones"`
Labels bool `json:"labels"`
Issues bool `json:"issues"`
PullRequests bool `json:"pull_requests"`
Releases bool `json:"releases"`
MirrorInterval string `json:"mirror_interval"`
LFS bool `json:"lfs"`
LFSEndpoint string `json:"lfs_endpoint"`
}
MigrateRepoOption options for migrating a repository from an external service
type Milestone ¶
type Milestone struct {
ID int64 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
State StateType `json:"state"`
OpenIssues int `json:"open_issues"`
ClosedIssues int `json:"closed_issues"`
Created time.Time `json:"created_at"`
Updated *time.Time `json:"updated_at"`
Closed *time.Time `json:"closed_at"`
Deadline *time.Time `json:"due_on"`
}
Milestone milestone is a collection of issues on one repository
type NewIssuePinsAllowed ¶
type NewIssuePinsAllowed struct {
Issues bool `json:"issues"`
PullRequests bool `json:"pull_requests"`
}
NewIssuePinsAllowed represents whether new issue/PR pins are allowed
type NodeInfo ¶
type NodeInfo struct {
Version string `json:"version"`
Software NodeInfoSoftware `json:"software"`
Protocols []string `json:"protocols"`
Services NodeInfoServices `json:"services"`
OpenRegistrations bool `json:"openRegistrations"`
Usage NodeInfoUsage `json:"usage"`
Metadata map[string]interface{} `json:"metadata"`
}
NodeInfo represents nodeinfo about the server
type NodeInfoServices ¶
type NodeInfoServices struct {
Inbound []string `json:"inbound"`
Outbound []string `json:"outbound"`
}
NodeInfoServices represents third party services
type NodeInfoSoftware ¶
type NodeInfoSoftware struct {
Name string `json:"name"`
Version string `json:"version"`
Repository string `json:"repository"`
Homepage string `json:"homepage"`
}
NodeInfoSoftware represents software information
type NodeInfoUsage ¶
type NodeInfoUsage struct {
Users NodeInfoUsageUsers `json:"users"`
LocalPosts int64 `json:"localPosts"`
LocalComments int64 `json:"localComments"`
}
NodeInfoUsage represents usage statistics
type NodeInfoUsageUsers ¶
type NodeInfoUsageUsers struct {
Total int64 `json:"total"`
ActiveHalfyear int64 `json:"activeHalfyear"`
ActiveMonth int64 `json:"activeMonth"`
}
NodeInfoUsageUsers represents user statistics
type NotificationStatus ¶ added in v1.0.1
type NotificationStatus string
NotificationStatus notification status type
type NotificationSubject ¶
type NotificationSubject struct {
Title string `json:"title"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
LatestCommentURL string `json:"latest_comment_url"`
LatestCommentHTMLURL string `json:"latest_comment_html_url"`
Type NotificationSubjectType `json:"type"`
State NotificationSubjectState `json:"state"`
}
NotificationSubject contains the notification subject (Issue/Pull/Commit)
type NotificationSubjectState ¶ added in v1.0.1
type NotificationSubjectState string
NotificationSubjectState reflect state of notification subject
type NotificationSubjectType ¶ added in v1.0.1
type NotificationSubjectType string
NotificationSubjectType represent type of notification subject
type NotificationThread ¶
type NotificationThread struct {
ID int64 `json:"id"`
Repository *Repository `json:"repository"`
Subject *NotificationSubject `json:"subject"`
Unread bool `json:"unread"`
Pinned bool `json:"pinned"`
UpdatedAt time.Time `json:"updated_at"`
URL string `json:"url"`
}
NotificationThread expose Notification on API
type NotificationsService ¶
type NotificationsService struct{ *Client }
NotificationsService handles notification endpoints.
func (*NotificationsService) GetByID ¶
func (c *NotificationsService) GetByID(ctx context.Context, id int64) (*NotificationThread, *Response, error)
GetByID get notification thread by ID
func (*NotificationsService) List ¶
func (c *NotificationsService) List(ctx context.Context, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
List list users's notification threads
func (*NotificationsService) ListByRepo ¶
func (c *NotificationsService) ListByRepo(ctx context.Context, owner, repo string, opt ListNotificationOptions) ([]*NotificationThread, *Response, error)
ListByRepo list users's notification threads on a specific repo
func (*NotificationsService) MarkRead ¶
func (c *NotificationsService) MarkRead(ctx context.Context, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
MarkRead mark notification threads as read The relevant notifications will only be returned as the first parameter when the Gitea server is 1.16.0 or higher.
func (*NotificationsService) MarkReadByID ¶
func (c *NotificationsService) MarkReadByID(ctx context.Context, id int64, status ...NotificationStatus) (*NotificationThread, *Response, error)
MarkReadByID mark notification thread as read by ID It optionally takes a second argument if status has to be set other than 'read' The relevant notification will be returned as the first parameter when the Gitea server is 1.16.0 or higher.
func (*NotificationsService) MarkReadByRepo ¶
func (c *NotificationsService) MarkReadByRepo(ctx context.Context, owner, repo string, opt MarkNotificationOptions) ([]*NotificationThread, *Response, error)
MarkReadByRepo mark notification threads as read on a specific repo The relevant notifications will only be returned as the first parameter when the Gitea server is 1.16.0 or higher.
type NotifyStatus
deprecated
type NotifyStatus = NotificationStatus
Deprecated: use NotificationStatus instead.
type NotifySubjectState
deprecated
type NotifySubjectState = NotificationSubjectState
Deprecated: use NotificationSubjectState instead.
type NotifySubjectType
deprecated
type NotifySubjectType = NotificationSubjectType
Deprecated: use NotificationSubjectType instead.
type OAuth2Application ¶
type OAuth2Application struct {
ID int64 `json:"id"`
Name string `json:"name"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
RedirectURIs []string `json:"redirect_uris"`
ConfidentialClient bool `json:"confidential_client"`
Created time.Time `json:"created"`
}
OAuth2Application represents an OAuth2 application.
type OAuth2Service ¶
type OAuth2Service struct{ *Client }
OAuth2Service handles OAuth2 application endpoints.
func (*OAuth2Service) CreateApplication ¶
func (c *OAuth2Service) CreateApplication(ctx context.Context, opt CreateApplicationOption) (*OAuth2Application, *Response, error)
CreateApplication creates an OAuth2 application and returns a completed OAuth2Application object.
func (*OAuth2Service) DeleteApplication ¶
DeleteApplication deletes an OAuth2 application by ID.
func (*OAuth2Service) GetApplication ¶
func (c *OAuth2Service) GetApplication(ctx context.Context, oauth2id int64) (*OAuth2Application, *Response, error)
GetApplication returns a specific OAuth2 application by ID.
func (*OAuth2Service) ListApplications ¶
func (c *OAuth2Service) ListApplications(ctx context.Context, opt ListApplicationsOptions) ([]*OAuth2Application, *Response, error)
ListApplications returns all of your OAuth2 applications.
func (*OAuth2Service) UpdateApplication ¶
func (c *OAuth2Service) UpdateApplication(ctx context.Context, oauth2id int64, opt CreateApplicationOption) (*OAuth2Application, *Response, error)
UpdateApplication updates a specific OAuth2 application by ID and returns a completed OAuth2Application object.
type Oauth2
deprecated
type Oauth2 = OAuth2Application
Deprecated: use OAuth2Application.
type OrgPermissions ¶
type OrgPermissions struct {
CanCreateRepository bool `json:"can_create_repository"`
CanRead bool `json:"can_read"`
CanWrite bool `json:"can_write"`
IsAdmin bool `json:"is_admin"`
IsOwner bool `json:"is_owner"`
}
OrgPermissions represents the permissions for an user in an organization
type Organization ¶
type Organization struct {
ID int64 `json:"id"`
Name string `json:"name"`
// Deprecated: Use Name instead. See https://github.com/go-gitea/gitea/blob/main/modules/structs/org.go#L29
UserName string `json:"username"`
FullName string `json:"full_name"`
Email string `json:"email"`
AvatarURL string `json:"avatar_url"`
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
Visibility string `json:"visibility"`
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
}
Organization represents an organization
type OrganizationsService ¶
type OrganizationsService struct{ *Client }
OrganizationsService handles organization endpoints.
func (*OrganizationsService) AddTeamMember ¶
func (c *OrganizationsService) AddTeamMember(ctx context.Context, id int64, user string) (*Response, error)
AddTeamMember adds a member to a team
func (*OrganizationsService) AddTeamRepository ¶
func (c *OrganizationsService) AddTeamRepository(ctx context.Context, id int64, org, repo string) (*Response, error)
AddTeamRepository adds a repository to a team
func (*OrganizationsService) BlockOrgUser ¶
func (c *OrganizationsService) BlockOrgUser(ctx context.Context, org, username string) (*Response, error)
BlockOrgUser blocks a user from the organization
func (*OrganizationsService) CheckOrgBlock ¶
func (c *OrganizationsService) CheckOrgBlock(ctx context.Context, org, username string) (bool, *Response, error)
CheckOrgBlock checks if a user is blocked by the organization
func (*OrganizationsService) CheckOrgMembership ¶
func (c *OrganizationsService) CheckOrgMembership(ctx context.Context, org, user string) (bool, *Response, error)
CheckOrgMembership Check if a user is a member of an organization
func (*OrganizationsService) CheckPublicOrgMembership ¶
func (c *OrganizationsService) CheckPublicOrgMembership(ctx context.Context, org, user string) (bool, *Response, error)
CheckPublicOrgMembership Check if a user is a member of an organization
func (*OrganizationsService) CreateOrg ¶
func (c *OrganizationsService) CreateOrg(ctx context.Context, opt CreateOrgOption) (*Organization, *Response, error)
CreateOrg creates an organization
func (*OrganizationsService) CreateOrgLabel ¶
func (c *OrganizationsService) CreateOrgLabel(ctx context.Context, orgName string, opt CreateOrgLabelOption) (*Label, *Response, error)
CreateOrgLabel creates a new label under an organization
func (*OrganizationsService) CreateTeam ¶
func (c *OrganizationsService) CreateTeam(ctx context.Context, org string, opt CreateTeamOption) (*Team, *Response, error)
CreateTeam creates a team for an organization
func (*OrganizationsService) DeleteOrgAvatar ¶
DeleteOrgAvatar deletes the organization's avatar
func (*OrganizationsService) DeleteOrgLabel ¶
func (c *OrganizationsService) DeleteOrgLabel(ctx context.Context, orgName string, labelID int64) (*Response, error)
DeleteOrgLabel deletes a org label by ID
func (*OrganizationsService) DeleteOrgMembership ¶
func (c *OrganizationsService) DeleteOrgMembership(ctx context.Context, org, user string) (*Response, error)
DeleteOrgMembership remove a member from an organization
func (*OrganizationsService) DeleteTeam ¶
DeleteTeam deletes a team of an organization
func (*OrganizationsService) EditOrg ¶
func (c *OrganizationsService) EditOrg(ctx context.Context, orgname string, opt EditOrgOption) (*Response, error)
EditOrg modify one organization via options
func (*OrganizationsService) EditOrgLabel ¶
func (c *OrganizationsService) EditOrgLabel(ctx context.Context, orgName string, labelID int64, opt EditOrgLabelOption) (*Label, *Response, error)
EditOrgLabel edits an existing org-level label by ID
func (*OrganizationsService) EditTeam ¶
func (c *OrganizationsService) EditTeam(ctx context.Context, id int64, opt EditTeamOption) (*Response, error)
EditTeam edits a team of an organization
func (*OrganizationsService) GetOrg ¶
func (c *OrganizationsService) GetOrg(ctx context.Context, orgname string) (*Organization, *Response, error)
GetOrg get one organization by name
func (*OrganizationsService) GetOrgLabel ¶
func (c *OrganizationsService) GetOrgLabel(ctx context.Context, orgName string, labelID int64) (*Label, *Response, error)
GetOrgLabel get one label of organization by org it
func (*OrganizationsService) GetOrgPermissions ¶
func (c *OrganizationsService) GetOrgPermissions(ctx context.Context, org, user string) (*OrgPermissions, *Response, error)
GetOrgPermissions returns user permissions for specific organization.
func (*OrganizationsService) GetTeamMember ¶
func (c *OrganizationsService) GetTeamMember(ctx context.Context, id int64, user string) (*User, *Response, error)
GetTeamMember gets a member of a team
func (*OrganizationsService) GetTeamRepository ¶
func (c *OrganizationsService) GetTeamRepository(ctx context.Context, id int64, org, repo string) (*Repository, *Response, error)
GetTeamRepository gets a repository that belongs to a team.
func (*OrganizationsService) ListMyOrgs ¶
func (c *OrganizationsService) ListMyOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)
ListMyOrgs list all of current user's organizations
func (*OrganizationsService) ListMyTeams ¶
func (c *OrganizationsService) ListMyTeams(ctx context.Context, opt *ListTeamsOptions) ([]*Team, *Response, error)
ListMyTeams lists all the teams of the current user
func (*OrganizationsService) ListOrgBlocks ¶
func (c *OrganizationsService) ListOrgBlocks(ctx context.Context, org string, opt ListOrgBlocksOptions) ([]*User, *Response, error)
ListOrgBlocks lists users blocked by the organization
func (*OrganizationsService) ListOrgLabels ¶
func (c *OrganizationsService) ListOrgLabels(ctx context.Context, orgName string, opt ListOrgLabelsOptions) ([]*Label, *Response, error)
ListOrgLabels returns the labels defined at the org level
func (*OrganizationsService) ListOrgMembership ¶
func (c *OrganizationsService) ListOrgMembership(ctx context.Context, org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
ListOrgMembership list an organization's members
func (*OrganizationsService) ListOrgTeams ¶
func (c *OrganizationsService) ListOrgTeams(ctx context.Context, org string, opt ListTeamsOptions) ([]*Team, *Response, error)
ListOrgTeams lists all teams of an organization
func (*OrganizationsService) ListOrgs ¶
func (c *OrganizationsService) ListOrgs(ctx context.Context, opt ListOrgsOptions) ([]*Organization, *Response, error)
ListOrgs lists all public organizations
func (*OrganizationsService) ListPublicOrgMembership ¶
func (c *OrganizationsService) ListPublicOrgMembership(ctx context.Context, org string, opt ListOrgMembershipOption) ([]*User, *Response, error)
ListPublicOrgMembership list an organization's members
func (*OrganizationsService) ListTeamMembers ¶
func (c *OrganizationsService) ListTeamMembers(ctx context.Context, id int64, opt ListTeamMembersOptions) ([]*User, *Response, error)
ListTeamMembers lists all members of a team
func (*OrganizationsService) ListTeamRepositories ¶
func (c *OrganizationsService) ListTeamRepositories(ctx context.Context, id int64, opt ListTeamRepositoriesOptions) ([]*Repository, *Response, error)
ListTeamRepositories lists all repositories of a team
func (*OrganizationsService) ListUserOrgs ¶
func (c *OrganizationsService) ListUserOrgs(ctx context.Context, user string, opt ListOrgsOptions) ([]*Organization, *Response, error)
ListUserOrgs list all of some user's organizations
func (*OrganizationsService) RemoveTeamMember ¶
func (c *OrganizationsService) RemoveTeamMember(ctx context.Context, id int64, user string) (*Response, error)
RemoveTeamMember removes a member from a team
func (*OrganizationsService) RemoveTeamRepository ¶
func (c *OrganizationsService) RemoveTeamRepository(ctx context.Context, id int64, org, repo string) (*Response, error)
RemoveTeamRepository removes a repository from a team
func (*OrganizationsService) RenameOrg ¶
func (c *OrganizationsService) RenameOrg(ctx context.Context, org string, opt RenameOrgOption) (*Response, error)
RenameOrg renames an organization
func (*OrganizationsService) SearchOrgTeams ¶
func (c *OrganizationsService) SearchOrgTeams(ctx context.Context, org string, opt *SearchTeamsOptions) ([]*Team, *Response, error)
SearchOrgTeams search for teams in a org.
func (*OrganizationsService) SetPublicOrgMembership ¶
func (c *OrganizationsService) SetPublicOrgMembership(ctx context.Context, org, user string, visible bool) (*Response, error)
SetPublicOrgMembership publicize/conceal a user's membership
func (*OrganizationsService) UnblockOrgUser ¶
func (c *OrganizationsService) UnblockOrgUser(ctx context.Context, org, username string) (*Response, error)
UnblockOrgUser unblocks a user from the organization
func (*OrganizationsService) UpdateOrgAvatar ¶
func (c *OrganizationsService) UpdateOrgAvatar(ctx context.Context, org string, opt UpdateUserAvatarOption) (*Response, error)
UpdateOrgAvatar updates the organization's avatar
type PRBranchInfo ¶
type PRBranchInfo struct {
Name string `json:"label"`
Ref string `json:"ref"`
Sha string `json:"sha"`
RepoID int64 `json:"repo_id"`
Repository *Repository `json:"repo"`
}
PRBranchInfo information about a branch
type Package ¶
type Package struct {
// the package's id
ID int64 `json:"id"`
// the package's owner
Owner *User `json:"owner"`
// the repo this package belongs to (if any)
Repository *Repository `json:"repository"`
// the package's creator
Creator *User `json:"creator"`
// the type of package:
Type string `json:"type"`
// the name of the package
Name string `json:"name"`
// the version of the package
Version string `json:"version"`
// the HTML URL for viewing the package
HTMLURL string `json:"html_url"`
// the date the package was uploaded
CreatedAt time.Time `json:"created_at"`
}
Package represents a package
type PackageFile ¶
type PackageFile struct {
// the file's ID
ID int64 `json:"id"`
// the size of the file in bytes
Size int64 `json:"size"`
// the name of the file
Name string `json:"name"`
// the md5 hash of the file
MD5 string `json:"md5"`
// the sha1 hash of the file
SHA1 string `json:"sha1"`
// the sha256 hash of the file
SHA256 string `json:"sha256"`
// the sha512 hash of the file
SHA512 string `json:"sha512"`
}
PackageFile represents a file from a package
type PackagesService ¶
type PackagesService struct{ *Client }
PackagesService handles package registry endpoints.
func (*PackagesService) DeletePackage ¶
func (c *PackagesService) DeletePackage(ctx context.Context, owner, packageType, name, version string) (*Response, error)
DeletePackage deletes a specific package version
func (*PackagesService) GetLatestPackage ¶
func (c *PackagesService) GetLatestPackage(ctx context.Context, owner, packageType, name string) (*Package, *Response, error)
GetLatestPackage gets the details of the latest version of a package
func (*PackagesService) GetPackage ¶
func (c *PackagesService) GetPackage(ctx context.Context, owner, packageType, name, version string) (*Package, *Response, error)
GetPackage gets the details of a specific package version
func (*PackagesService) LinkPackage ¶
func (c *PackagesService) LinkPackage(ctx context.Context, owner, packageType, name, repoName string) (*Response, error)
LinkPackage links a package to a repository
func (*PackagesService) ListPackageFiles ¶
func (c *PackagesService) ListPackageFiles(ctx context.Context, owner, packageType, name, version string) ([]*PackageFile, *Response, error)
ListPackageFiles lists the files within a package
func (*PackagesService) ListPackageVersions ¶
func (c *PackagesService) ListPackageVersions(ctx context.Context, owner, packageType, name string, opt ListPackagesOptions) ([]*Package, *Response, error)
ListPackageVersions lists all versions of a package.
func (*PackagesService) ListPackages ¶
func (c *PackagesService) ListPackages(ctx context.Context, owner string, opt ListPackagesOptions) ([]*Package, *Response, error)
ListPackages lists all the packages owned by a given owner (user, organisation)
func (*PackagesService) UnlinkPackage ¶
func (c *PackagesService) UnlinkPackage(ctx context.Context, owner, packageType, name string) (*Response, error)
UnlinkPackage unlinks a package from a repository
type PayloadCommit ¶
type PayloadCommit struct {
// sha1 hash of the commit
ID string `json:"id"`
Message string `json:"message"`
URL string `json:"url"`
Author *PayloadUser `json:"author"`
Committer *PayloadUser `json:"committer"`
Verification *PayloadCommitVerification `json:"verification"`
Timestamp time.Time `json:"timestamp"`
Added []string `json:"added"`
Removed []string `json:"removed"`
Modified []string `json:"modified"`
}
PayloadCommit represents a commit
type PayloadCommitVerification ¶
type PayloadCommitVerification struct {
Verified bool `json:"verified"`
Reason string `json:"reason"`
Signature string `json:"signature"`
Payload string `json:"payload"`
}
PayloadCommitVerification represents the GPG verification of a commit
type PayloadUser ¶
type PayloadUser struct {
// Full name of the commit author
Name string `json:"name"`
Email string `json:"email"`
UserName string `json:"username"`
}
PayloadUser represents the author or committer of a commit
type Permission ¶
type Permission struct {
Admin bool `json:"admin"`
Push bool `json:"push"`
Pull bool `json:"pull"`
}
Permission represents a set of permissions
type ProjectsMode ¶
type ProjectsMode string
ProjectsMode is used specify which kinds of projects to show for a repository
const ( // ProjectsModeRepo only allow repo-level projects ProjectsModeRepo ProjectsMode = "repo" // ProjectsModeOwner only allow owner projects ProjectsModeOwner ProjectsMode = "owner" // ProjectsModeAll only allow all projects ProjectsModeAll ProjectsMode = "all" )
type PublicKey ¶
type PublicKey struct {
ID int64 `json:"id"`
Key string `json:"key"`
URL string `json:"url,omitempty"`
Title string `json:"title,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
Created time.Time `json:"created_at,omitempty"`
Updated time.Time `json:"last_used_at,omitempty"`
Owner *User `json:"user,omitempty"`
ReadOnly bool `json:"read_only,omitempty"`
KeyType string `json:"key_type,omitempty"`
}
PublicKey publickey is a user key to push code to repository
type PullRequest ¶
type PullRequest struct {
ID int64 `json:"id"`
URL string `json:"url"`
Index int64 `json:"number"`
Poster *User `json:"user"`
Title string `json:"title"`
Body string `json:"body"`
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignee *User `json:"assignee"`
Assignees []*User `json:"assignees"`
RequestedReviewers []*User `json:"requested_reviewers"`
RequestedReviewersTeams []*Team `json:"requested_reviewers_teams"`
State StateType `json:"state"`
Draft bool `json:"draft"`
IsLocked bool `json:"is_locked"`
Comments int `json:"comments"`
ReviewComments int `json:"review_comments,omitempty"`
HTMLURL string `json:"html_url"`
DiffURL string `json:"diff_url"`
PatchURL string `json:"patch_url"`
Mergeable bool `json:"mergeable"`
HasMerged bool `json:"merged"`
Merged *time.Time `json:"merged_at"`
MergedCommitID *string `json:"merge_commit_sha"`
MergedBy *User `json:"merged_by"`
AllowMaintainerEdit bool `json:"allow_maintainer_edit"`
Base *PRBranchInfo `json:"base"`
Head *PRBranchInfo `json:"head"`
MergeBase string `json:"merge_base"`
Deadline *time.Time `json:"due_date"`
Created *time.Time `json:"created_at"`
Updated *time.Time `json:"updated_at"`
Closed *time.Time `json:"closed_at"`
Additions *int `json:"additions,omitempty"`
Deletions *int `json:"deletions,omitempty"`
ChangedFiles *int `json:"changed_files,omitempty"`
PinOrder int `json:"pin_order"`
}
PullRequest represents a pull request
type PullRequestDiffOptions ¶
type PullRequestDiffOptions struct {
// Include binary file changes when requesting a .diff
Binary bool
}
PullRequestDiffOptions options for GET /repos/<owner>/<repo>/pulls/<idx>.[diff|patch]
func (PullRequestDiffOptions) QueryEncode ¶
func (o PullRequestDiffOptions) QueryEncode() string
QueryEncode converts the options to a query string
type PullRequestMeta ¶
PullRequestMeta PR info if an issue is a PR
type PullRequestsService ¶
type PullRequestsService struct{ *Client }
PullRequestsService handles pull request endpoints.
func (*PullRequestsService) CancelScheduledAutoMerge ¶
func (c *PullRequestsService) CancelScheduledAutoMerge(ctx context.Context, owner, repo string, index int64) (*Response, error)
CancelScheduledAutoMerge cancels a scheduled automatic merge for a pull request.
func (*PullRequestsService) CreatePullRequest ¶
func (c *PullRequestsService) CreatePullRequest(ctx context.Context, owner, repo string, opt CreatePullRequestOption) (*PullRequest, *Response, error)
CreatePullRequest create pull request with options
func (*PullRequestsService) CreatePullReview ¶
func (c *PullRequestsService) CreatePullReview(ctx context.Context, owner, repo string, index int64, opt CreatePullReviewOptions) (*PullReview, *Response, error)
CreatePullReview create a review to an pull request
func (*PullRequestsService) CreatePullReviewCommentReply ¶
func (c *PullRequestsService) CreatePullReviewCommentReply(ctx context.Context, owner, repo string, index, id int64, opt CreatePullReviewCommentReplyOptions) (*PullReviewComment, *Response, error)
CreatePullReviewCommentReply replies to a pull request review comment. Available on Gitea main/nightly; first released version not assigned yet. Upstream: gitea/gitea#36683 (331450b17a025ce78b5bf9405ca8d684607680ef).
func (*PullRequestsService) CreateReviewRequests ¶
func (c *PullRequestsService) CreateReviewRequests(ctx context.Context, owner, repo string, index int64, opt PullReviewRequestOptions) (*Response, error)
CreateReviewRequests create review requests to an pull request
func (*PullRequestsService) DeletePullReview ¶
func (c *PullRequestsService) DeletePullReview(ctx context.Context, owner, repo string, index, id int64) (*Response, error)
DeletePullReview delete a specific review from a pull request
func (*PullRequestsService) DeleteReviewRequests ¶
func (c *PullRequestsService) DeleteReviewRequests(ctx context.Context, owner, repo string, index int64, opt PullReviewRequestOptions) (*Response, error)
DeleteReviewRequests delete review requests to an pull request
func (*PullRequestsService) DismissPullReview ¶
func (c *PullRequestsService) DismissPullReview(ctx context.Context, owner, repo string, index, id int64, opt DismissPullReviewOptions) (*Response, error)
DismissPullReview dismiss a review for a pull request
func (*PullRequestsService) EditPullRequest ¶
func (c *PullRequestsService) EditPullRequest(ctx context.Context, owner, repo string, index int64, opt EditPullRequestOption) (*PullRequest, *Response, error)
EditPullRequest modify pull request with PR id and options
func (*PullRequestsService) GetCommitPullRequest ¶
func (c *PullRequestsService) GetCommitPullRequest(ctx context.Context, owner, repo, sha string) (*PullRequest, *Response, error)
GetCommitPullRequest gets the pull request associated with a commit SHA
func (*PullRequestsService) GetPullRequest ¶
func (c *PullRequestsService) GetPullRequest(ctx context.Context, owner, repo string, index int64) (*PullRequest, *Response, error)
GetPullRequest get information of one PR
func (*PullRequestsService) GetPullRequestByBaseHead ¶
func (c *PullRequestsService) GetPullRequestByBaseHead(ctx context.Context, owner, repo, base, head string) (*PullRequest, *Response, error)
GetPullRequestByBaseHead gets a pull request by its base and head branches.
func (*PullRequestsService) GetPullRequestDiff ¶
func (c *PullRequestsService) GetPullRequestDiff(ctx context.Context, owner, repo string, index int64, opts PullRequestDiffOptions) ([]byte, *Response, error)
GetPullRequestDiff gets the diff of a PR. For Gitea >= 1.16, you must set includeBinary to get an applicable diff
func (*PullRequestsService) GetPullRequestPatch ¶
func (c *PullRequestsService) GetPullRequestPatch(ctx context.Context, owner, repo string, index int64) ([]byte, *Response, error)
GetPullRequestPatch gets the git patchset of a PR
func (*PullRequestsService) GetPullReview ¶
func (c *PullRequestsService) GetPullReview(ctx context.Context, owner, repo string, index, id int64) (*PullReview, *Response, error)
GetPullReview gets a specific review of a pull request
func (*PullRequestsService) IsPullRequestMerged ¶
func (c *PullRequestsService) IsPullRequestMerged(ctx context.Context, owner, repo string, index int64) (bool, *Response, error)
IsPullRequestMerged test if one PR is merged to one repository
func (*PullRequestsService) ListPullRequestCommits ¶
func (c *PullRequestsService) ListPullRequestCommits(ctx context.Context, owner, repo string, index int64, opt ListPullRequestCommitsOptions) ([]*Commit, *Response, error)
ListPullRequestCommits list commits for a pull request
func (*PullRequestsService) ListPullRequestFiles ¶
func (c *PullRequestsService) ListPullRequestFiles(ctx context.Context, owner, repo string, index int64, opt ListPullRequestFilesOptions) ([]*ChangedFile, *Response, error)
ListPullRequestFiles list changed files for a pull request
func (*PullRequestsService) ListPullReviewComments ¶
func (c *PullRequestsService) ListPullReviewComments(ctx context.Context, owner, repo string, index, id int64) ([]*PullReviewComment, *Response, error)
ListPullReviewComments lists all comments of a pull request review
func (*PullRequestsService) ListPullReviews ¶
func (c *PullRequestsService) ListPullReviews(ctx context.Context, owner, repo string, index int64, opt ListPullReviewsOptions) ([]*PullReview, *Response, error)
ListPullReviews lists all reviews of a pull request
func (*PullRequestsService) ListRepoPinnedPullRequests ¶
func (c *PullRequestsService) ListRepoPinnedPullRequests(ctx context.Context, owner, repo string) ([]*PullRequest, *Response, error)
ListRepoPinnedPullRequests lists a repo's pinned pull requests.
func (*PullRequestsService) ListRepoPullRequests ¶
func (c *PullRequestsService) ListRepoPullRequests(ctx context.Context, owner, repo string, opt ListPullRequestsOptions) ([]*PullRequest, *Response, error)
ListRepoPullRequests list PRs of one repository
func (*PullRequestsService) MergePullRequest ¶
func (c *PullRequestsService) MergePullRequest(ctx context.Context, owner, repo string, index int64, opt MergePullRequestOption) (bool, *Response, error)
MergePullRequest merge a PR to repository by PR id
func (*PullRequestsService) ResolvePullReviewComment ¶
func (c *PullRequestsService) ResolvePullReviewComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)
ResolvePullReviewComment resolves a pull-request review comment conversation. Available on Gitea main/nightly; first released version not assigned yet. Upstream: gitea/gitea#36441 (c2dea22926f9e7a40aa47296e7b9bc3d1c5b039e).
func (*PullRequestsService) SubmitPullReview ¶
func (c *PullRequestsService) SubmitPullReview(ctx context.Context, owner, repo string, index, id int64, opt SubmitPullReviewOptions) (*PullReview, *Response, error)
SubmitPullReview submit a pending review to an pull request
func (*PullRequestsService) UnDismissPullReview ¶
func (c *PullRequestsService) UnDismissPullReview(ctx context.Context, owner, repo string, index, id int64) (*Response, error)
UnDismissPullReview cancel to dismiss a review for a pull request
func (*PullRequestsService) UnresolvePullReviewComment ¶
func (c *PullRequestsService) UnresolvePullReviewComment(ctx context.Context, owner, repo string, commentID int64) (*Response, error)
UnresolvePullReviewComment unresolves a pull-request review comment conversation. Available on Gitea main/nightly; first released version not assigned yet. Upstream: gitea/gitea#36441 (c2dea22926f9e7a40aa47296e7b9bc3d1c5b039e).
func (*PullRequestsService) UpdatePullRequest ¶
func (c *PullRequestsService) UpdatePullRequest(ctx context.Context, owner, repo string, index int64) (*Response, error)
UpdatePullRequest updates a pull request with new commits from the base branch
type PullReview ¶
type PullReview struct {
ID int64 `json:"id"`
Reviewer *User `json:"user"`
ReviewerTeam *Team `json:"team"`
State ReviewStateType `json:"state"`
Body string `json:"body"`
CommitID string `json:"commit_id"`
// Stale indicates if the pull has changed since the review
Stale bool `json:"stale"`
// Official indicates if the review counts towards the required approval limit, if PR base is a protected branch
Official bool `json:"official"`
Dismissed bool `json:"dismissed"`
CodeCommentsCount int `json:"comments_count"`
Submitted time.Time `json:"submitted_at"`
HTMLURL string `json:"html_url"`
HTMLPullURL string `json:"pull_request_url"`
}
PullReview represents a pull request review
type PullReviewComment ¶
type PullReviewComment struct {
ID int64 `json:"id"`
Body string `json:"body"`
Reviewer *User `json:"user"`
ReviewID int64 `json:"pull_request_review_id"`
Resolver *User `json:"resolver"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Path string `json:"path"`
CommitID string `json:"commit_id"`
OrigCommitID string `json:"original_commit_id"`
DiffHunk string `json:"diff_hunk"`
LineNum uint64 `json:"position"`
OldLineNum uint64 `json:"original_position"`
HTMLURL string `json:"html_url"`
HTMLPullURL string `json:"pull_request_url"`
}
PullReviewComment represents a comment on a pull request review
type PullReviewRequestOptions ¶
type PullReviewRequestOptions struct {
Reviewers []string `json:"reviewers"`
TeamReviewers []string `json:"team_reviewers"`
}
PullReviewRequestOptions are options to add or remove pull review requests
type PushMirrorResponse ¶
type PushMirrorResponse struct {
Created string `json:"created"`
Interval string `json:"interval"`
LastError string `json:"last_error"`
LastUpdate string `json:"last_update"`
RemoteAddress string `json:"remote_address"`
RemoteName string `json:"remote_name"`
RepoName string `json:"repo_name"`
SyncONCommit bool `json:"sync_on_commit"`
}
PushMirrorResponse returns a git push mirror
type PutRepoActionsVariable ¶
PutActionsVariable represents body for updating a action variable.
type Reaction ¶
type Reaction struct {
User *User `json:"user"`
Reaction string `json:"content"`
Created time.Time `json:"created_at"`
}
Reaction contain one reaction
type Reference ¶
type Reference struct {
Ref string `json:"ref"`
URL string `json:"url"`
Object *GitObject `json:"object"`
}
Reference represents a Git reference.
type RegistrationToken ¶
type RegistrationToken struct {
Token string `json:"token"`
}
RegistrationToken is returned when creating an Actions runner registration token.
type Release ¶
type Release struct {
ID int64 `json:"id"`
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
TarURL string `json:"tarball_url"`
ZipURL string `json:"zipball_url"`
IsDraft bool `json:"draft"`
IsPrerelease bool `json:"prerelease"`
CreatedAt time.Time `json:"created_at"`
PublishedAt time.Time `json:"published_at"`
Publisher *User `json:"author"`
Attachments []*Attachment `json:"assets"`
}
Release represents a repository release
type ReleasesService ¶ added in v1.0.1
type ReleasesService struct{ *Client }
ReleasesService handles repository release endpoints.
func (*ReleasesService) CreateRelease ¶ added in v1.0.1
func (c *ReleasesService) CreateRelease(ctx context.Context, owner, repo string, opt CreateReleaseOption) (*Release, *Response, error)
CreateRelease create a release
func (*ReleasesService) CreateReleaseAttachment ¶ added in v1.0.1
func (c *ReleasesService) CreateReleaseAttachment(ctx context.Context, user, repo string, release int64, file io.Reader, filename string) (*Attachment, *Response, error)
CreateReleaseAttachment creates an attachment for the given release
func (*ReleasesService) DeleteRelease ¶ added in v1.0.1
func (c *ReleasesService) DeleteRelease(ctx context.Context, user, repo string, id int64) (*Response, error)
DeleteRelease delete a release from a repository, keeping its tag
func (*ReleasesService) DeleteReleaseAttachment ¶ added in v1.0.1
func (c *ReleasesService) DeleteReleaseAttachment(ctx context.Context, user, repo string, release, id int64) (*Response, error)
DeleteReleaseAttachment deletes the given attachment including the uploaded file
func (*ReleasesService) DeleteReleaseByTag ¶ added in v1.0.1
func (c *ReleasesService) DeleteReleaseByTag(ctx context.Context, user, repo, tag string) (*Response, error)
DeleteReleaseByTag deletes a release frm a repository by tag
func (*ReleasesService) EditRelease ¶ added in v1.0.1
func (c *ReleasesService) EditRelease(ctx context.Context, owner, repo string, id int64, form EditReleaseOption) (*Release, *Response, error)
EditRelease edit a release
func (*ReleasesService) EditReleaseAttachment ¶ added in v1.0.1
func (c *ReleasesService) EditReleaseAttachment(ctx context.Context, user, repo string, release, attachment int64, form EditAttachmentOptions) (*Attachment, *Response, error)
EditReleaseAttachment updates the given attachment with the given options
func (*ReleasesService) GetLatestRelease ¶ added in v1.0.1
func (c *ReleasesService) GetLatestRelease(ctx context.Context, owner, repo string) (*Release, *Response, error)
GetLatestRelease get the latest release of a repository
func (*ReleasesService) GetRelease ¶ added in v1.0.1
func (c *ReleasesService) GetRelease(ctx context.Context, owner, repo string, id int64) (*Release, *Response, error)
GetRelease get a release of a repository by id
func (*ReleasesService) GetReleaseAttachment ¶ added in v1.0.1
func (c *ReleasesService) GetReleaseAttachment(ctx context.Context, user, repo string, release, id int64) (*Attachment, *Response, error)
GetReleaseAttachment returns the requested attachment
func (*ReleasesService) GetReleaseByTag ¶ added in v1.0.1
func (c *ReleasesService) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*Release, *Response, error)
GetReleaseByTag get a release of a repository by tag
func (*ReleasesService) ListReleaseAttachments ¶ added in v1.0.1
func (c *ReleasesService) ListReleaseAttachments(ctx context.Context, user, repo string, release int64, opt ListReleaseAttachmentsOptions) ([]*Attachment, *Response, error)
ListReleaseAttachments list release's attachments
func (*ReleasesService) ListReleases ¶ added in v1.0.1
func (c *ReleasesService) ListReleases(ctx context.Context, owner, repo string, opt ListReleasesOptions) ([]*Release, *Response, error)
ListReleases list releases of a repository
type RenameOrgOption ¶
type RenameOrgOption struct {
NewName string `json:"new_name"`
}
RenameOrgOption options for renaming an organization
type RenameRepoBranchOption ¶
type RenameRepoBranchOption struct {
Name string `json:"name"`
}
RenameRepoBranchOption renames a repository branch.
func (RenameRepoBranchOption) Validate ¶
func (opt RenameRepoBranchOption) Validate() error
Validate checks whether the rename payload is valid.
type RenameUserOption ¶
type RenameUserOption struct {
NewUsername string `json:"new_username"`
}
RenameUserOption options for renaming a user
type RenderService ¶
type RenderService struct{ *Client }
RenderService handles markup rendering endpoints.
func (*RenderService) RenderMarkdown ¶
func (c *RenderService) RenderMarkdown(ctx context.Context, opt MarkdownOption) (string, *Response, error)
RenderMarkdown renders a markdown document as HTML.
func (*RenderService) RenderMarkdownRaw ¶
func (c *RenderService) RenderMarkdownRaw(ctx context.Context, markdown string) (string, *Response, error)
RenderMarkdownRaw renders raw markdown as HTML.
func (*RenderService) RenderMarkup ¶
func (c *RenderService) RenderMarkup(ctx context.Context, opt MarkupOption) (string, *Response, error)
RenderMarkup renders a markup document as HTML.
type RepoActionVariable
deprecated
type RepoActionVariable = RepoActionsVariable
Deprecated: use RepoActionsVariable instead.
type RepoActionsVariable ¶ added in v1.0.1
type RepoActionsVariable struct {
OwnerID int64 `json:"owner_id"`
RepoID int64 `json:"repo_id"`
Name string `json:"name"`
Value string `json:"data"`
}
RepoActionsVariable represents an Actions repository variable.
type RepoCommit ¶
type RepoCommit struct {
URL string `json:"url"`
Author *CommitUser `json:"author"`
Committer *CommitUser `json:"committer"`
Message string `json:"message"`
Tree *CommitMeta `json:"tree"`
Verification *PayloadCommitVerification `json:"verification"`
}
RepoCommit contains information of a commit in the context of a repository.
type RepoTransfer ¶
type RepoTransfer struct {
Doer *User `json:"doer"`
Recipient *User `json:"recipient"`
Teams []*Team `json:"teams"`
}
RepoTransfer represents a pending repository transfer
type RepoType ¶
type RepoType string
RepoType represent repo type
const ( // RepoTypeNone dont specify a type RepoTypeNone RepoType = "" // RepoTypeSource is the default repo type RepoTypeSource RepoType = "source" // RepoTypeFork is a repo witch was forked from an other one RepoTypeFork RepoType = "fork" // RepoTypeMirror represents an mirror repo RepoTypeMirror RepoType = "mirror" )
type RepoUnitType ¶
type RepoUnitType string
RepoUnitType represent all unit types of a repo gitea currently offer
const ( // RepoUnitCode represent file view of a repository RepoUnitCode RepoUnitType = "repo.code" // RepoUnitIssues represent issues of a repository RepoUnitIssues RepoUnitType = "repo.issues" // RepoUnitPulls represent pulls of a repository RepoUnitPulls RepoUnitType = "repo.pulls" // RepoUnitExtIssues represent external issues of a repository RepoUnitExtIssues RepoUnitType = "repo.ext_issues" // RepoUnitWiki represent wiki of a repository RepoUnitWiki RepoUnitType = "repo.wiki" // RepoUnitExtWiki represent external wiki of a repository RepoUnitExtWiki RepoUnitType = "repo.ext_wiki" // RepoUnitReleases represent releases of a repository RepoUnitReleases RepoUnitType = "repo.releases" // RepoUnitProjects represent projects of a repository RepoUnitProjects RepoUnitType = "repo.projects" // RepoUnitPackages represents packages of a repository RepoUnitPackages RepoUnitType = "repo.packages" // RepoUnitActions represents actions of a repository RepoUnitActions RepoUnitType = "repo.actions" )
type RepositoriesService ¶
type RepositoriesService struct{ *Client }
RepositoriesService handles repository endpoints.
func (*RepositoriesService) AcceptRepoTransfer ¶
func (c *RepositoriesService) AcceptRepoTransfer(ctx context.Context, owner, reponame string) (*Repository, *Response, error)
AcceptRepoTransfer accepts a repo transfer.
func (*RepositoriesService) AddCollaborator ¶
func (c *RepositoriesService) AddCollaborator(ctx context.Context, user, repo, collaborator string, opt AddCollaboratorOption) (*Response, error)
AddCollaborator add some user as a collaborator of a repository
func (*RepositoriesService) AddRepoTeam ¶
func (c *RepositoriesService) AddRepoTeam(ctx context.Context, user, repo, team string) (*Response, error)
AddRepoTeam add a team to a repository
func (*RepositoriesService) AddRepoTopic ¶
func (c *RepositoriesService) AddRepoTopic(ctx context.Context, user, repo, topic string) (*Response, error)
AddRepoTopic adds a topic to a repo's topics list
func (*RepositoriesService) ApplyRepoDiffPatch ¶
func (c *RepositoriesService) ApplyRepoDiffPatch(ctx context.Context, owner, repo string, opt ApplyDiffPatchFileOptions) (*FileResponse, *Response, error)
ApplyRepoDiffPatch applies a patch to repository contents.
func (*RepositoriesService) ChangeFiles ¶
func (c *RepositoriesService) ChangeFiles(ctx context.Context, owner, repo string, opt ChangeFilesOptions) (*FileResponse, *Response, error)
ChangeFiles creates, updates, or deletes multiple files
func (*RepositoriesService) CheckPinAllowed ¶
func (c *RepositoriesService) CheckPinAllowed(ctx context.Context, owner, repo string) (*NewIssuePinsAllowed, *Response, error)
CheckPinAllowed checks if the current user can pin issues or PRs
func (*RepositoriesService) CheckRepoTeam ¶
func (c *RepositoriesService) CheckRepoTeam(ctx context.Context, user, repo, team string) (*Team, *Response, error)
CheckRepoTeam check if team is assigned to repo by name and return it. If not assigned, it will return nil.
func (*RepositoriesService) CheckRepoWatch ¶
func (c *RepositoriesService) CheckRepoWatch(ctx context.Context, owner, repo string) (bool, *Response, error)
CheckRepoWatch check if the current user is watching a repo
func (*RepositoriesService) CollaboratorPermission ¶
func (c *RepositoriesService) CollaboratorPermission(ctx context.Context, user, repo, collaborator string) (*CollaboratorPermissionResult, *Response, error)
CollaboratorPermission gets collaborator permission of a repository
func (*RepositoriesService) CompareCommits ¶
func (c *RepositoriesService) CompareCommits(ctx context.Context, user, repo, prev, current string) (*Compare, *Response, error)
CompareCommits compares two commits in a repository.
func (*RepositoriesService) CreateBranch ¶
func (c *RepositoriesService) CreateBranch(ctx context.Context, owner, repo string, opt CreateBranchOption) (*Branch, *Response, error)
CreateBranch creates a branch for a user's repository
func (*RepositoriesService) CreateBranchProtection ¶
func (c *RepositoriesService) CreateBranchProtection(ctx context.Context, owner, repo string, opt CreateBranchProtectionOption) (*BranchProtection, *Response, error)
CreateBranchProtection creates a branch protection for a repo
func (*RepositoriesService) CreateDeployKey ¶
func (c *RepositoriesService) CreateDeployKey(ctx context.Context, user, repo string, opt CreateKeyOption) (*DeployKey, *Response, error)
CreateDeployKey options when create one deploy key
func (*RepositoriesService) CreateFile ¶
func (c *RepositoriesService) CreateFile(ctx context.Context, owner, repo, filepath string, opt CreateFileOptions) (*FileResponse, *Response, error)
CreateFile create a file in a repository
func (*RepositoriesService) CreateFork ¶
func (c *RepositoriesService) CreateFork(ctx context.Context, user, repo string, form CreateForkOption) (*Repository, *Response, error)
CreateFork create a fork of a repository
func (*RepositoriesService) CreateLabel ¶
func (c *RepositoriesService) CreateLabel(ctx context.Context, owner, repo string, opt CreateLabelOption) (*Label, *Response, error)
CreateLabel create one label of repository
func (*RepositoriesService) CreateMilestone ¶ added in v1.0.1
func (c *RepositoriesService) CreateMilestone(ctx context.Context, owner, repo string, opt CreateMilestoneOption) (*Milestone, *Response, error)
CreateMilestone create one milestone with options
func (*RepositoriesService) CreateOrgRepo ¶
func (c *RepositoriesService) CreateOrgRepo(ctx context.Context, org string, opt CreateRepoOption) (*Repository, *Response, error)
CreateOrgRepo creates an organization repository for authenticated user.
func (*RepositoriesService) CreateRepo ¶
func (c *RepositoriesService) CreateRepo(ctx context.Context, opt CreateRepoOption) (*Repository, *Response, error)
CreateRepo creates a repository for authenticated user.
func (*RepositoriesService) CreateRepoFromTemplate ¶
func (c *RepositoriesService) CreateRepoFromTemplate(ctx context.Context, templateOwner, templateRepo string, opt CreateRepoFromTemplateOption) (*Repository, *Response, error)
CreateRepoFromTemplate create a repository using a template
func (*RepositoriesService) CreateStatus ¶
func (c *RepositoriesService) CreateStatus(ctx context.Context, owner, repo, sha string, opts CreateStatusOption) (*Status, *Response, error)
CreateStatus creates a new Status for a given Commit
func (*RepositoriesService) CreateTag ¶
func (c *RepositoriesService) CreateTag(ctx context.Context, user, repo string, opt CreateTagOption) (*Tag, *Response, error)
CreateTag create a new git tag in a repository
func (*RepositoriesService) CreateTagProtection ¶
func (c *RepositoriesService) CreateTagProtection(ctx context.Context, owner, repo string, opt CreateTagProtectionOption) (*TagProtection, *Response, error)
CreateTagProtection creates a tag protection for a repo
func (*RepositoriesService) DeleteBranchProtection ¶
func (c *RepositoriesService) DeleteBranchProtection(ctx context.Context, owner, repo, name string) (*Response, error)
DeleteBranchProtection deletes a branch protection for a repo
func (*RepositoriesService) DeleteCollaborator ¶
func (c *RepositoriesService) DeleteCollaborator(ctx context.Context, user, repo, collaborator string) (*Response, error)
DeleteCollaborator remove a collaborator from a repository
func (*RepositoriesService) DeleteDeployKey ¶
func (c *RepositoriesService) DeleteDeployKey(ctx context.Context, owner, repo string, keyID int64) (*Response, error)
DeleteDeployKey delete deploy key with key id
func (*RepositoriesService) DeleteFile ¶
func (c *RepositoriesService) DeleteFile(ctx context.Context, owner, repo, filepath string, opt DeleteFileOptions) (*Response, error)
DeleteFile delete a file from repository
func (*RepositoriesService) DeleteLabel ¶
func (c *RepositoriesService) DeleteLabel(ctx context.Context, owner, repo string, id int64) (*Response, error)
DeleteLabel delete one label of repository by id
func (*RepositoriesService) DeleteMilestone ¶ added in v1.0.1
func (c *RepositoriesService) DeleteMilestone(ctx context.Context, owner, repo string, id int64) (*Response, error)
DeleteMilestone delete one milestone by id
func (*RepositoriesService) DeleteMilestoneByName ¶ added in v1.0.1
func (c *RepositoriesService) DeleteMilestoneByName(ctx context.Context, owner, repo, name string) (*Response, error)
DeleteMilestoneByName delete one milestone by name
func (*RepositoriesService) DeletePushMirror ¶
func (c *RepositoriesService) DeletePushMirror(ctx context.Context, user, repo, remoteName string) (*Response, error)
DeletePushMirror deletes a push mirror from a repository by remote name
func (*RepositoriesService) DeleteRepo ¶
func (c *RepositoriesService) DeleteRepo(ctx context.Context, owner, repo string) (*Response, error)
DeleteRepo deletes a repository of user or organization.
func (*RepositoriesService) DeleteRepoAvatar ¶
func (c *RepositoriesService) DeleteRepoAvatar(ctx context.Context, owner, repo string) (*Response, error)
DeleteRepoAvatar deletes a repository's avatar
func (*RepositoriesService) DeleteRepoBranch ¶
func (c *RepositoriesService) DeleteRepoBranch(ctx context.Context, user, repo, branch string) (bool, *Response, error)
DeleteRepoBranch delete a branch in a repository
func (*RepositoriesService) DeleteRepoTopic ¶
func (c *RepositoriesService) DeleteRepoTopic(ctx context.Context, user, repo, topic string) (*Response, error)
DeleteRepoTopic deletes a topic from repo's topics list
func (*RepositoriesService) DeleteTag ¶
func (c *RepositoriesService) DeleteTag(ctx context.Context, user, repo, tag string) (*Response, error)
DeleteTag deletes a tag from a repository, if no release refers to it
func (*RepositoriesService) DeleteTagProtection ¶
func (c *RepositoriesService) DeleteTagProtection(ctx context.Context, owner, repo string, id int64) (*Response, error)
DeleteTagProtection deletes a tag protection for a repo
func (*RepositoriesService) EditBranchProtection ¶
func (c *RepositoriesService) EditBranchProtection(ctx context.Context, owner, repo, name string, opt EditBranchProtectionOption) (*BranchProtection, *Response, error)
EditBranchProtection edits a branch protection for a repo
func (*RepositoriesService) EditLabel ¶
func (c *RepositoriesService) EditLabel(ctx context.Context, owner, repo string, id int64, opt EditLabelOption) (*Label, *Response, error)
EditLabel modify one label with options
func (*RepositoriesService) EditMilestone ¶ added in v1.0.1
func (c *RepositoriesService) EditMilestone(ctx context.Context, owner, repo string, id int64, opt EditMilestoneOption) (*Milestone, *Response, error)
EditMilestone modify milestone with options
func (*RepositoriesService) EditMilestoneByName ¶ added in v1.0.1
func (c *RepositoriesService) EditMilestoneByName(ctx context.Context, owner, repo, name string, opt EditMilestoneOption) (*Milestone, *Response, error)
EditMilestoneByName modify milestone with options
func (*RepositoriesService) EditRepo ¶
func (c *RepositoriesService) EditRepo(ctx context.Context, owner, reponame string, opt EditRepoOption) (*Repository, *Response, error)
EditRepo edit the properties of a repository
func (*RepositoriesService) EditTagProtection ¶
func (c *RepositoriesService) EditTagProtection(ctx context.Context, owner, repo string, id int64, opt EditTagProtectionOption) (*TagProtection, *Response, error)
EditTagProtection edits a tag protection for a repo
func (*RepositoriesService) GetAnnotatedTag ¶
func (c *RepositoriesService) GetAnnotatedTag(ctx context.Context, user, repo, sha string) (*AnnotatedTag, *Response, error)
GetAnnotatedTag get the tag object of an annotated tag (not lightweight tags) of a repository
func (*RepositoriesService) GetArchive ¶
func (c *RepositoriesService) GetArchive(ctx context.Context, owner, repo, ref string, ext ArchiveType) ([]byte, *Response, error)
GetArchive get an archive of a repository by git reference e.g.: ref -> master, 70b7c74b33, v1.2.1, ...
func (*RepositoriesService) GetArchiveReader ¶
func (c *RepositoriesService) GetArchiveReader(ctx context.Context, owner, repo, ref string, ext ArchiveType) (io.ReadCloser, *Response, error)
GetArchiveReader gets a `git archive` for a particular tree-ish git reference such as a branch name (`master`), a commit hash (`70b7c74b33`), a tag (`v1.2.1`). The archive is returned as a byte stream in a ReadCloser. It is the responsibility of the client to close the reader.
func (*RepositoriesService) GetAssignees ¶
func (c *RepositoriesService) GetAssignees(ctx context.Context, user, repo string) ([]*User, *Response, error)
GetAssignees return all users that have write access and can be assigned to issues
func (*RepositoriesService) GetBranchProtection ¶
func (c *RepositoriesService) GetBranchProtection(ctx context.Context, owner, repo, name string) (*BranchProtection, *Response, error)
GetBranchProtection gets a branch protection
func (*RepositoriesService) GetCombinedStatus ¶
func (c *RepositoriesService) GetCombinedStatus(ctx context.Context, owner, repo, ref string) (*CombinedStatus, *Response, error)
GetCombinedStatus returns the CombinedStatus for a given Commit
func (*RepositoriesService) GetCommitDiff ¶
func (c *RepositoriesService) GetCommitDiff(ctx context.Context, user, repo, commitID string) ([]byte, *Response, error)
GetCommitDiff returns the commit's raw diff.
func (*RepositoriesService) GetCommitPatch ¶
func (c *RepositoriesService) GetCommitPatch(ctx context.Context, user, repo, commitID string) ([]byte, *Response, error)
GetCommitPatch returns the commit's raw patch.
func (*RepositoriesService) GetContents ¶
func (c *RepositoriesService) GetContents(ctx context.Context, owner, repo, ref, filepath string) (*ContentsResponse, *Response, error)
GetContents get the metadata and contents of a file in a repository ref is optional
func (*RepositoriesService) GetContentsExt ¶
func (c *RepositoriesService) GetContentsExt(ctx context.Context, owner, repo, filepath string, opt GetContentsExtOptions) (*ContentsExtResponse, *Response, error)
GetContentsExt gets extended file metadata and/or content from a repository The extended "contents" API, to get file metadata and/or content, or list a directory
func (*RepositoriesService) GetDeployKey ¶
func (c *RepositoriesService) GetDeployKey(ctx context.Context, user, repo string, keyID int64) (*DeployKey, *Response, error)
GetDeployKey get one deploy key with key id
func (*RepositoriesService) GetEditorConfig ¶
func (c *RepositoriesService) GetEditorConfig(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)
GetEditorConfig gets the EditorConfig definitions of a file in a repository
func (*RepositoriesService) GetFile ¶
func (c *RepositoriesService) GetFile(ctx context.Context, owner, repo, ref, filepath string, resolveLFS ...bool) ([]byte, *Response, error)
GetFile downloads a file of repository, ref can be branch/tag/commit. it optional can resolve lfs pointers and server the file instead e.g.: ref -> master, filepath -> README.md (no leading slash)
func (*RepositoriesService) GetFileReader ¶
func (c *RepositoriesService) GetFileReader(ctx context.Context, owner, repo, ref, filepath string, resolveLFS ...bool) (io.ReadCloser, *Response, error)
GetFileReader return reader for download a file of repository, ref can be branch/tag/commit. it optional can resolve lfs pointers and server the file instead e.g.: ref -> master, filepath -> README.md (no leading slash)
func (*RepositoriesService) GetIssueConfig ¶
func (c *RepositoriesService) GetIssueConfig(ctx context.Context, owner, repo string) (*IssueConfig, *Response, error)
GetIssueConfig gets the issue config for a repository.
func (*RepositoriesService) GetMilestone ¶ added in v1.0.1
func (c *RepositoriesService) GetMilestone(ctx context.Context, owner, repo string, id int64) (*Milestone, *Response, error)
GetMilestone get one milestone by repo name and milestone id
func (*RepositoriesService) GetMilestoneByName ¶ added in v1.0.1
func (c *RepositoriesService) GetMilestoneByName(ctx context.Context, owner, repo, name string) (*Milestone, *Response, error)
GetMilestoneByName get one milestone by repo and milestone name
func (*RepositoriesService) GetMyStarredRepos ¶
func (c *RepositoriesService) GetMyStarredRepos(ctx context.Context) ([]*Repository, *Response, error)
GetMyStarredRepos returns the repos that the authenticated user has starred
func (*RepositoriesService) GetMyWatchedRepos ¶
func (c *RepositoriesService) GetMyWatchedRepos(ctx context.Context) ([]*Repository, *Response, error)
GetMyWatchedRepos list repositories watched by the authenticated user
func (*RepositoriesService) GetPushMirrorByRemoteName ¶
func (c *RepositoriesService) GetPushMirrorByRemoteName(ctx context.Context, user, repo, remoteName string) (*PushMirrorResponse, *Response, error)
GetPushMirrorByRemoteName get a push mirror of the repository by remote name
func (*RepositoriesService) GetRawFile ¶
func (c *RepositoriesService) GetRawFile(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)
GetRawFile gets a file from a repository Unlike GetRawFileOrLFS, this does NOT resolve LFS pointers
func (*RepositoriesService) GetRawFileOrLFS ¶
func (c *RepositoriesService) GetRawFileOrLFS(ctx context.Context, owner, repo, filepath string, ref ...string) ([]byte, *Response, error)
GetRawFileOrLFS gets a file or its LFS object from a repository This endpoint resolves LFS pointers and returns actual LFS objects
func (*RepositoriesService) GetRepo ¶
func (c *RepositoriesService) GetRepo(ctx context.Context, owner, reponame string) (*Repository, *Response, error)
GetRepo returns information of a repository of given owner.
func (*RepositoriesService) GetRepoBranch ¶
func (c *RepositoriesService) GetRepoBranch(ctx context.Context, user, repo, branch string) (*Branch, *Response, error)
GetRepoBranch get one branch's information of one repository
func (*RepositoriesService) GetRepoByID ¶
func (c *RepositoriesService) GetRepoByID(ctx context.Context, id int64) (*Repository, *Response, error)
GetRepoByID returns information of a repository by a giver repository ID.
func (*RepositoriesService) GetRepoFileContents ¶
func (c *RepositoriesService) GetRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)
GetRepoFileContents fetches metadata and contents for multiple files through the GET endpoint. The file list is JSON-encoded in the "body" query parameter; for large file lists prefer PostRepoFileContents to avoid URL length limitations.
func (*RepositoriesService) GetRepoLabel ¶
func (c *RepositoriesService) GetRepoLabel(ctx context.Context, owner, repo string, id int64) (*Label, *Response, error)
GetRepoLabel get one label of repository by repo it
func (*RepositoriesService) GetRepoLanguages ¶
func (c *RepositoriesService) GetRepoLanguages(ctx context.Context, owner, repo string) (map[string]int64, *Response, error)
GetRepoLanguages return language stats of a repo
func (*RepositoriesService) GetRepoLicenses ¶
func (c *RepositoriesService) GetRepoLicenses(ctx context.Context, owner, repo string) ([]string, *Response, error)
GetRepoLicenses gets detected licenses for a repository.
func (*RepositoriesService) GetRepoSigningKeyGPG ¶
func (c *RepositoriesService) GetRepoSigningKeyGPG(ctx context.Context, owner, repo string) (string, *Response, error)
GetRepoSigningKeyGPG gets the repository signing GPG public key.
func (*RepositoriesService) GetRepoSigningKeySSH ¶
func (c *RepositoriesService) GetRepoSigningKeySSH(ctx context.Context, owner, repo string) (string, *Response, error)
GetRepoSigningKeySSH gets the repository signing SSH public key.
func (*RepositoriesService) GetRepoTeams ¶
func (c *RepositoriesService) GetRepoTeams(ctx context.Context, user, repo string) ([]*Team, *Response, error)
GetRepoTeams return teams from a repository
func (*RepositoriesService) GetReviewers ¶
func (c *RepositoriesService) GetReviewers(ctx context.Context, user, repo string) ([]*User, *Response, error)
GetReviewers return all users that can be requested to review in this repo
func (*RepositoriesService) GetSingleCommit ¶
func (c *RepositoriesService) GetSingleCommit(ctx context.Context, user, repo, commitID string) (*Commit, *Response, error)
GetSingleCommit returns a single commit
func (*RepositoriesService) GetStarredRepos ¶
func (c *RepositoriesService) GetStarredRepos(ctx context.Context, user string) ([]*Repository, *Response, error)
GetStarredRepos returns the repos that the given user has starred
func (*RepositoriesService) GetTag ¶
func (c *RepositoriesService) GetTag(ctx context.Context, user, repo, tag string) (*Tag, *Response, error)
GetTag get the tag of a repository
func (*RepositoriesService) GetTagProtection ¶
func (c *RepositoriesService) GetTagProtection(ctx context.Context, owner, repo string, id int64) (*TagProtection, *Response, error)
GetTagProtection gets a tag protection
func (*RepositoriesService) GetWatchedRepos ¶
func (c *RepositoriesService) GetWatchedRepos(ctx context.Context, user string) ([]*Repository, *Response, error)
GetWatchedRepos list all the watched repos of user
func (*RepositoriesService) IsCollaborator ¶
func (c *RepositoriesService) IsCollaborator(ctx context.Context, user, repo, collaborator string) (bool, *Response, error)
IsCollaborator check if a user is a collaborator of a repository
func (*RepositoriesService) IsRepoStarring ¶
func (c *RepositoriesService) IsRepoStarring(ctx context.Context, user, repo string) (bool, *Response, error)
IsRepoStarring returns whether the authenticated user has starred the repo or not
func (*RepositoriesService) ListBranchProtections ¶
func (c *RepositoriesService) ListBranchProtections(ctx context.Context, owner, repo string, opt ListBranchProtectionsOptions) ([]*BranchProtection, *Response, error)
ListBranchProtections list branch protections for a repo
func (*RepositoriesService) ListCollaborators ¶
func (c *RepositoriesService) ListCollaborators(ctx context.Context, user, repo string, opt ListCollaboratorsOptions) ([]*User, *Response, error)
ListCollaborators list a repository's collaborators
func (*RepositoriesService) ListContents ¶
func (c *RepositoriesService) ListContents(ctx context.Context, owner, repo, ref, filepath string) ([]*ContentsResponse, *Response, error)
ListContents gets a list of entries in a dir ref is optional
func (*RepositoriesService) ListDeployKeys ¶
func (c *RepositoriesService) ListDeployKeys(ctx context.Context, user, repo string, opt ListDeployKeysOptions) ([]*DeployKey, *Response, error)
ListDeployKeys list all the deploy keys of one repository
func (*RepositoriesService) ListForks ¶
func (c *RepositoriesService) ListForks(ctx context.Context, user, repo string, opt ListForksOptions) ([]*Repository, *Response, error)
ListForks list a repository's forks
func (*RepositoriesService) ListMilestones ¶ added in v1.0.1
func (c *RepositoriesService) ListMilestones(ctx context.Context, owner, repo string, opt ListMilestoneOption) ([]*Milestone, *Response, error)
ListMilestones list all the milestones of one repository
func (*RepositoriesService) ListMyRepos ¶
func (c *RepositoriesService) ListMyRepos(ctx context.Context, opt ListReposOptions) ([]*Repository, *Response, error)
ListMyRepos lists all repositories for the authenticated user that has access to.
func (*RepositoriesService) ListOrgRepos ¶
func (c *RepositoriesService) ListOrgRepos(ctx context.Context, org string, opt ListOrgReposOptions) ([]*Repository, *Response, error)
ListOrgRepos list all repositories of one organization by organization's name
func (*RepositoriesService) ListPushMirrors ¶
func (c *RepositoriesService) ListPushMirrors(ctx context.Context, user, repo string, opt ListOptions) ([]*PushMirrorResponse, *Response, error)
ListPushMirrors gets all push mirrors of a repository
func (*RepositoriesService) ListRepoBranches ¶
func (c *RepositoriesService) ListRepoBranches(ctx context.Context, user, repo string, opt ListRepoBranchesOptions) ([]*Branch, *Response, error)
ListRepoBranches list all the branches of one repository
func (*RepositoriesService) ListRepoCommits ¶
func (c *RepositoriesService) ListRepoCommits(ctx context.Context, user, repo string, opt ListCommitOptions) ([]*Commit, *Response, error)
ListRepoCommits return list of commits from a repo
func (*RepositoriesService) ListRepoLabels ¶
func (c *RepositoriesService) ListRepoLabels(ctx context.Context, owner, repo string, opt ListLabelsOptions) ([]*Label, *Response, error)
ListRepoLabels list labels of one repository
func (*RepositoriesService) ListRepoStargazers ¶
func (c *RepositoriesService) ListRepoStargazers(ctx context.Context, user, repo string, opt ListStargazersOptions) ([]*User, *Response, error)
ListRepoStargazers list a repository's stargazers
func (*RepositoriesService) ListRepoSubscribers ¶
func (c *RepositoriesService) ListRepoSubscribers(ctx context.Context, owner, repo string, opt ListOptions) ([]*User, *Response, error)
ListRepoSubscribers lists repository watchers.
func (*RepositoriesService) ListRepoTags ¶
func (c *RepositoriesService) ListRepoTags(ctx context.Context, user, repo string, opt ListRepoTagsOptions) ([]*Tag, *Response, error)
ListRepoTags list all the branches of one repository
func (*RepositoriesService) ListRepoTopics ¶
func (c *RepositoriesService) ListRepoTopics(ctx context.Context, user, repo string, opt ListRepoTopicsOptions) ([]string, *Response, error)
ListRepoTopics list all repository's topics
func (*RepositoriesService) ListStatuses ¶
func (c *RepositoriesService) ListStatuses(ctx context.Context, owner, repo, ref string, opt ListStatusesOption) ([]*Status, *Response, error)
ListStatuses returns all statuses for a given Commit by ref
func (*RepositoriesService) ListTagProtection ¶
func (c *RepositoriesService) ListTagProtection(ctx context.Context, owner, repo string, opt ListRepoTagProtectionsOptions) ([]*TagProtection, *Response, error)
ListTagProtection list tag protections for a repository
func (*RepositoriesService) ListUserRepos ¶
func (c *RepositoriesService) ListUserRepos(ctx context.Context, user string, opt ListReposOptions) ([]*Repository, *Response, error)
ListUserRepos list all repositories of one user by user's name
func (*RepositoriesService) MergeUpstream ¶
func (c *RepositoriesService) MergeUpstream(ctx context.Context, owner, repo string, opt MergeUpstreamRequest) (*MergeUpstreamResponse, *Response, error)
MergeUpstream merges upstream into a forked repository
func (*RepositoriesService) MigrateRepo ¶
func (c *RepositoriesService) MigrateRepo(ctx context.Context, opt MigrateRepoOption) (*Repository, *Response, error)
MigrateRepo migrates a repository from other Git hosting sources for the authenticated user.
To migrate a repository for a organization, the authenticated user must be a owner of the specified organization.
func (*RepositoriesService) MirrorSync ¶
func (c *RepositoriesService) MirrorSync(ctx context.Context, owner, repo string) (*Response, error)
MirrorSync adds a mirrored repository to the mirror sync queue.
func (*RepositoriesService) PostRepoFileContents ¶
func (c *RepositoriesService) PostRepoFileContents(ctx context.Context, owner, repo, ref string, opt GetFilesOptions) ([]*ContentsResponse, *Response, error)
PostRepoFileContents fetches metadata and contents for multiple files through the POST endpoint.
func (*RepositoriesService) PushMirrors ¶
func (c *RepositoriesService) PushMirrors(ctx context.Context, user, repo string, opt CreatePushMirrorOption) (*PushMirrorResponse, *Response, error)
PushMirrors add a push mirror to the repository
func (*RepositoriesService) RejectRepoTransfer ¶
func (c *RepositoriesService) RejectRepoTransfer(ctx context.Context, owner, reponame string) (*Repository, *Response, error)
RejectRepoTransfer rejects a repo transfer.
func (*RepositoriesService) RemoveRepoTeam ¶
func (c *RepositoriesService) RemoveRepoTeam(ctx context.Context, user, repo, team string) (*Response, error)
RemoveRepoTeam delete a team from a repository
func (*RepositoriesService) RenameRepoBranch ¶
func (c *RepositoriesService) RenameRepoBranch(ctx context.Context, user, repo, branch string, opt RenameRepoBranchOption) (successful bool, resp *Response, err error)
RenameRepoBranch renames a branch in a repository.
func (*RepositoriesService) SearchRepos ¶
func (c *RepositoriesService) SearchRepos(ctx context.Context, opt SearchRepoOptions) ([]*Repository, *Response, error)
SearchRepos searches for repositories matching the given filters
func (*RepositoriesService) SearchTopics ¶
func (c *RepositoriesService) SearchTopics(ctx context.Context, opt TopicSearchOptions) (*TopicSearchResult, *Response, error)
SearchTopics searches for topics
func (*RepositoriesService) SetRepoTopics ¶
func (c *RepositoriesService) SetRepoTopics(ctx context.Context, user, repo string, list []string) (*Response, error)
SetRepoTopics replaces the list of repo's topics
func (*RepositoriesService) TransferRepo ¶
func (c *RepositoriesService) TransferRepo(ctx context.Context, owner, reponame string, opt TransferRepoOption) (*Repository, *Response, error)
TransferRepo transfers the ownership of a repository
func (*RepositoriesService) TriggerPushMirrorsSync ¶
func (c *RepositoriesService) TriggerPushMirrorsSync(ctx context.Context, owner, repo string) (*Response, error)
TriggerPushMirrorsSync triggers push-mirror syncing for a repository.
func (*RepositoriesService) UnStarRepo ¶
UnStarRepo remove star to specified repo as the authenticated user
func (*RepositoriesService) UnWatchRepo ¶
func (c *RepositoriesService) UnWatchRepo(ctx context.Context, owner, repo string) (*Response, error)
UnWatchRepo stop to watch a repository
func (*RepositoriesService) UpdateBranchProtectionPriorities ¶
func (c *RepositoriesService) UpdateBranchProtectionPriorities(ctx context.Context, owner, repo string, ids []int64) (*Response, error)
UpdateBranchProtectionPriorities updates the priorities of branch protection rules
func (*RepositoriesService) UpdateFile ¶
func (c *RepositoriesService) UpdateFile(ctx context.Context, owner, repo, filepath string, opt UpdateFileOptions) (*FileResponse, *Response, error)
UpdateFile update a file in a repository
func (*RepositoriesService) UpdateRepoAvatar ¶
func (c *RepositoriesService) UpdateRepoAvatar(ctx context.Context, owner, repo string, opt UpdateRepoAvatarOption) (*Response, error)
UpdateRepoAvatar updates a repository's avatar
func (*RepositoriesService) UpdateRepoBranchRef ¶
func (c *RepositoriesService) UpdateRepoBranchRef(ctx context.Context, user, repo, branch string, opt UpdateRepoBranchRefOption) (successful bool, resp *Response, err error)
UpdateRepoBranchRef updates the commit a branch points to. Available on Gitea main/nightly; first released version not assigned yet. Upstream: gitea/gitea#35951 (a440116a16c42956f21031bea8422ffbb003c732).
func (*RepositoriesService) ValidateIssueConfig ¶
func (c *RepositoriesService) ValidateIssueConfig(ctx context.Context, owner, repo string) (*IssueConfigValidation, *Response, error)
ValidateIssueConfig validates the issue config file for a repository
type Repository ¶
type Repository struct {
ID int64 `json:"id"`
Owner *User `json:"owner"`
Name string `json:"name"`
FullName string `json:"full_name"`
Description string `json:"description"`
Empty bool `json:"empty"`
Private bool `json:"private"`
Fork bool `json:"fork"`
Template bool `json:"template"`
Parent *Repository `json:"parent"`
Mirror bool `json:"mirror"`
Size int `json:"size"`
Language string `json:"language"`
LanguagesURL string `json:"languages_url"`
HTMLURL string `json:"html_url"`
URL string `json:"url"`
Link string `json:"link"`
SSHURL string `json:"ssh_url"`
CloneURL string `json:"clone_url"`
OriginalURL string `json:"original_url"`
Website string `json:"website"`
Stars int `json:"stars_count"`
Forks int `json:"forks_count"`
Watchers int `json:"watchers_count"`
OpenIssues int `json:"open_issues_count"`
OpenPulls int `json:"open_pr_counter"`
Releases int `json:"release_counter"`
DefaultBranch string `json:"default_branch"`
Archived bool `json:"archived"`
ArchivedAt time.Time `json:"archived_at"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Permissions *Permission `json:"permissions,omitempty"`
HasIssues bool `json:"has_issues"`
HasCode bool `json:"has_code"`
InternalTracker *InternalTracker `json:"internal_tracker,omitempty"`
ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"`
HasWiki bool `json:"has_wiki"`
ExternalWiki *ExternalWiki `json:"external_wiki,omitempty"`
HasPullRequests bool `json:"has_pull_requests"`
HasProjects bool `json:"has_projects"`
HasReleases bool `json:"has_releases,omitempty"`
HasPackages bool `json:"has_packages,omitempty"`
HasActions bool `json:"has_actions,omitempty"`
IgnoreWhitespaceConflicts bool `json:"ignore_whitespace_conflicts"`
AllowFastForwardOnlyMerge bool `json:"allow_fast_forward_only_merge"`
AllowMerge bool `json:"allow_merge_commits"`
AllowRebase bool `json:"allow_rebase"`
AllowRebaseMerge bool `json:"allow_rebase_explicit"`
AllowRebaseUpdate bool `json:"allow_rebase_update"`
AllowSquash bool `json:"allow_squash_merge"`
DefaultAllowMaintainerEdit bool `json:"default_allow_maintainer_edit"`
AvatarURL string `json:"avatar_url"`
Internal bool `json:"internal"`
MirrorInterval string `json:"mirror_interval"`
MirrorUpdated time.Time `json:"mirror_updated,omitempty"`
DefaultMergeStyle MergeStyle `json:"default_merge_style"`
ProjectsMode *ProjectsMode `json:"projects_mode"`
DefaultDeleteBranchAfterMerge bool `json:"default_delete_branch_after_merge"`
ObjectFormatName string `json:"object_format_name"`
Topics []string `json:"topics"`
Licenses []string `json:"licenses"`
RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"`
}
Repository represents a repository
type RepositoryMeta ¶
type RepositoryMeta struct {
ID int64 `json:"id"`
Name string `json:"name"`
Owner string `json:"owner"`
FullName string `json:"full_name"`
}
RepositoryMeta basic repository information
type ReviewStateType ¶
type ReviewStateType string
ReviewStateType review state type
const ( // ReviewStateApproved pr is approved ReviewStateApproved ReviewStateType = "APPROVED" // ReviewStatePending pr state is pending ReviewStatePending ReviewStateType = "PENDING" // ReviewStateComment is a comment review ReviewStateComment ReviewStateType = "COMMENT" // ReviewStateRequestChanges changes for pr are requested ReviewStateRequestChanges ReviewStateType = "REQUEST_CHANGES" // ReviewStateRequestReview review is requested from user ReviewStateRequestReview ReviewStateType = "REQUEST_REVIEW" // ReviewStateUnknown state of pr is unknown ReviewStateUnknown ReviewStateType = "" )
type RunDetails ¶
type RunDetails struct {
WorkflowRunID int64 `json:"workflow_run_id"`
RunURL string `json:"run_url"`
HTMLURL string `json:"html_url"`
}
RunDetails contains the workflow run identifiers returned by workflow dispatch.
type SearchAdminEmailsOptions ¶
type SearchAdminEmailsOptions struct {
ListOptions
Query string `json:"q,omitempty"`
}
SearchAdminEmailsOptions options for searching emails
type SearchRepoOptions ¶
type SearchRepoOptions struct {
ListOptions
// The keyword to query
Keyword string
// Limit search to repositories with keyword as topic
KeywordIsTopic bool
// Include search of keyword within repository description
KeywordInDescription bool
// Repo Owner
OwnerID int64
// Stared By UserID
StarredByUserID int64
// pubic, private or all repositories (defaults to all)
IsPrivate *bool
// archived, non-archived or all repositories (defaults to all)
IsArchived *bool
// Exclude template repos from search
ExcludeTemplate bool
// Filter by "fork", "source", "mirror"
Type RepoType
// sort repos by attribute. Supported values are "alpha", "created", "updated", "size", and "id". Default is "alpha"
Sort string
// sort order, either "asc" (ascending) or "desc" (descending). Default is "asc", ignored if "sort" is not specified.
Order string
// Repo owner to prioritize in the results
PrioritizedByOwnerID int64
/*
Cover EdgeCases
*/
// if set all other options are ignored and this string is used as query
RawQuery string
}
SearchRepoOptions options for searching repositories
func (*SearchRepoOptions) QueryEncode ¶
func (opt *SearchRepoOptions) QueryEncode() string
QueryEncode turns options into querystring argument
type SearchTeamsOptions ¶
type SearchTeamsOptions struct {
ListOptions
Query string
IncludeDescription bool
}
SearchTeamsOptions options for searching teams.
type SearchUsersOption ¶
type SearchUsersOption struct {
ListOptions
KeyWord string
UID int64
}
SearchUsersOption options for SearchUsers
func (*SearchUsersOption) QueryEncode ¶
func (opt *SearchUsersOption) QueryEncode() string
QueryEncode turns options into querystring argument
type SettingsService ¶
type SettingsService struct{ *Client }
SettingsService handles global settings endpoints.
func (*SettingsService) GetGlobalAPISettings ¶
func (c *SettingsService) GetGlobalAPISettings(ctx context.Context) (*GlobalAPISettings, *Response, error)
GetGlobalAPISettings get global api settings witch are exposed by it
func (*SettingsService) GetGlobalAttachmentSettings ¶
func (c *SettingsService) GetGlobalAttachmentSettings(ctx context.Context) (*GlobalAttachmentSettings, *Response, error)
GetGlobalAttachmentSettings get global repository settings witch are exposed by API
func (*SettingsService) GetGlobalRepoSettings ¶
func (c *SettingsService) GetGlobalRepoSettings(ctx context.Context) (*GlobalRepoSettings, *Response, error)
GetGlobalRepoSettings get global repository settings witch are exposed by API
func (*SettingsService) GetGlobalUISettings ¶
func (c *SettingsService) GetGlobalUISettings(ctx context.Context) (*GlobalUISettings, *Response, error)
GetGlobalUISettings get global ui settings witch are exposed by API
type Status ¶
type Status struct {
ID int64 `json:"id"`
State StatusState `json:"status"`
TargetURL string `json:"target_url"`
Description string `json:"description"`
URL string `json:"url"`
Context string `json:"context"`
Creator *User `json:"creator"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
}
Status holds a single Status of a single Commit
type StatusState ¶
type StatusState string
StatusState holds the state of a Status It can be "pending", "success", "error", "failure", and "warning"
const ( // StatusPending is for when the Status is Pending StatusPending StatusState = "pending" // StatusSuccess is for when the Status is Success StatusSuccess StatusState = "success" // StatusError is for when the Status is Error StatusError StatusState = "error" // StatusFailure is for when the Status is Failure StatusFailure StatusState = "failure" // StatusWarning is for when the Status is Warning StatusWarning StatusState = "warning" )
type StopWatch ¶
type StopWatch struct {
Created time.Time `json:"created"`
Seconds int64 `json:"seconds"`
Duration string `json:"duration"`
IssueIndex int64 `json:"issue_index"`
IssueTitle string `json:"issue_title"`
RepoOwnerName string `json:"repo_owner_name"`
RepoName string `json:"repo_name"`
}
StopWatch represents a running stopwatch of an issue / pr
type SubmitPullReviewOptions ¶
type SubmitPullReviewOptions struct {
State ReviewStateType `json:"event"`
Body string `json:"body"`
}
SubmitPullReviewOptions are options to submit a pending pull review
func (SubmitPullReviewOptions) Validate ¶
func (opt SubmitPullReviewOptions) Validate() error
Validate the SubmitPullReviewOptions struct
type Tag ¶
type Tag struct {
Name string `json:"name"`
Message string `json:"message"`
ID string `json:"id"`
Commit *CommitMeta `json:"commit"`
ZipballURL string `json:"zipball_url"`
TarballURL string `json:"tarball_url"`
}
Tag represents a repository tag
type TagProtection ¶
type TagProtection struct {
ID int64 `json:"id"`
NamePattern string `json:"name_pattern"`
WhitelistUsernames []string `json:"whitelist_usernames"`
WhitelistTeams []string `json:"whitelist_teams"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
}
TagProtection represents a tag protection for a repository
type Team ¶
type Team struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Organization *Organization `json:"organization"`
Permission AccessMode `json:"permission"`
CanCreateOrgRepo bool `json:"can_create_org_repo"`
IncludesAllRepositories bool `json:"includes_all_repositories"`
Units []RepoUnitType `json:"units"`
UnitsMap map[string]string `json:"units_map"`
}
Team represents a team in an organization
type TeamSearchResults ¶
type TeamSearchResults struct {
OK bool `json:"ok"`
Error string `json:"error"`
Data []*Team `json:"data"`
}
TeamSearchResults is the JSON struct that is returned from Team search API.
type TemplatesService ¶
type TemplatesService struct{ *Client }
TemplatesService handles instance template endpoints.
func (*TemplatesService) GetGitignore ¶
func (c *TemplatesService) GetGitignore(ctx context.Context, name string) (*GitignoreTemplateInfo, *Response, error)
GetGitignore gets information about a gitignore template.
func (*TemplatesService) GetLabel ¶
func (c *TemplatesService) GetLabel(ctx context.Context, name string) ([]*LabelTemplate, *Response, error)
GetLabel gets all labels in a template.
func (*TemplatesService) GetLicense ¶
func (c *TemplatesService) GetLicense(ctx context.Context, name string) (*LicenseTemplateInfo, *Response, error)
GetLicense gets information about a license template.
func (*TemplatesService) ListGitignores ¶
ListGitignores lists all gitignore templates.
func (*TemplatesService) ListLabels ¶
ListLabels lists all label templates.
func (*TemplatesService) ListLicenses ¶
func (c *TemplatesService) ListLicenses(ctx context.Context) ([]*LicensesTemplateListEntry, *Response, error)
ListLicenses lists all license templates.
type TimelineComment ¶
type TimelineComment struct {
ID int64 `json:"id"`
HTMLURL string `json:"html_url"`
PRURL string `json:"pull_request_url"`
IssueURL string `json:"issue_url"`
Poster *User `json:"user"`
OriginalAuthor string `json:"original_author"`
OriginalAuthorID int64 `json:"original_author_id"`
Body string `json:"body"`
Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"`
Type string `json:"type"`
Label []*Label `json:"label"`
NewMilestone *Milestone `json:"milestone"`
OldMilestone *Milestone `json:"old_milestone"`
NewTitle string `json:"new_title"`
OldTitle string `json:"old_title"`
}
Comment represents a comment on a commit or issue
type TopicResponse ¶
type TopicResponse struct {
ID int64 `json:"id"`
Name string `json:"topic_name"`
RepoCount int `json:"repo_count"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
TopicResponse represents a topic
type TopicSearchOptions ¶
type TopicSearchOptions struct {
ListOptions
Query string `json:"q"` // query string
}
TopicSearchOptions options for searching topics
type TopicSearchResult ¶
type TopicSearchResult struct {
Topics []*TopicResponse `json:"topics"`
}
TopicSearchResult represents a topic search result
type TrackedTime ¶
type TrackedTime struct {
ID int64 `json:"id"`
Created time.Time `json:"created"`
// Time in seconds
Time int64 `json:"time"`
// deprecated (only for backwards compatibility)
UserID int64 `json:"user_id"`
UserName string `json:"user_name"`
// deprecated (only for backwards compatibility)
IssueID int64 `json:"issue_id"`
Issue *Issue `json:"issue"`
}
TrackedTime worked time for an issue / pr
type TransferRepoOption ¶
type TransferRepoOption struct {
// required: true
NewOwner string `json:"new_owner"`
// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
TeamIDs *[]int64 `json:"team_ids"`
}
TransferRepoOption options when transfer a repository's ownership
type TrustModel ¶
type TrustModel string
TrustModel represent how git signatures are handled in a repository
const ( // TrustModelDefault use TM set by global config TrustModelDefault TrustModel = "default" // TrustModelCollaborator gpg signature has to be owned by a repo collaborator TrustModelCollaborator TrustModel = "collaborator" // TrustModelCommitter gpg signature has to match committer TrustModelCommitter TrustModel = "committer" // TrustModelCollaboratorCommitter gpg signature has to match committer and owned by a repo collaborator TrustModelCollaboratorCommitter TrustModel = "collaboratorcommitter" )
type UpdateActionVariableOption
deprecated
type UpdateActionVariableOption = UpdateActionsVariableOption
Deprecated: use UpdateActionsVariableOption instead.
type UpdateActionsVariableOption ¶ added in v1.0.1
type UpdateActionsVariableOption struct {
Name string `json:"name"`
Value string `json:"value"`
Description string `json:"description"`
}
UpdateActionsVariableOption is used to update an Actions variable.
func (UpdateActionsVariableOption) Validate ¶ added in v1.0.1
func (opt UpdateActionsVariableOption) Validate() error
Validate checks whether the variable update payload is valid.
type UpdateFileOptions ¶
type UpdateFileOptions struct {
FileOptions
// sha is the SHA for the file that already exists
// required: true
SHA string `json:"sha"`
// content must be base64 encoded
// required: true
Content string `json:"content"`
// from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL
FromPath string `json:"from_path"`
}
UpdateFileOptions options for updating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
type UpdateRepoAvatarOption ¶
type UpdateRepoAvatarOption struct {
Image string `json:"image"` // base64 encoded image
}
UpdateRepoAvatarOption options for updating repository avatar
type UpdateRepoBranchOption ¶
type UpdateRepoBranchOption struct {
Name string `json:"name"`
}
func (UpdateRepoBranchOption) Validate ¶
func (opt UpdateRepoBranchOption) Validate() error
type UpdateRepoBranchRefOption ¶
type UpdateRepoBranchRefOption struct {
NewCommitID string `json:"new_commit_id"`
OldCommitID string `json:"old_commit_id"`
Force bool `json:"force"`
}
UpdateRepoBranchRefOption updates a branch ref to point to a new commit.
func (UpdateRepoBranchRefOption) Validate ¶
func (opt UpdateRepoBranchRefOption) Validate() error
Validate checks whether the branch update payload is valid.
type UpdateUserAvatarOption ¶
type UpdateUserAvatarOption struct {
Image string `json:"image"` // base64 encoded image
}
UpdateUserAvatarOption options for updating user avatar
type User ¶
type User struct {
// the user's id
ID int64 `json:"id"`
// the user's username
UserName string `json:"login"`
// The login_name of non local users (e.g. LDAP / OAuth / SMTP)
LoginName string `json:"login_name"`
// The ID of the Authentication Source for non local users.
SourceID int64 `json:"source_id"`
// the user's full name
FullName string `json:"full_name"`
Email string `json:"email"`
// URL to the user's avatar
AvatarURL string `json:"avatar_url"`
// URL to the user's profile
HTMLURL string `json:"html_url"`
// User locale
Language string `json:"language"`
// Is the user an administrator
IsAdmin bool `json:"is_admin"`
// Date and Time of last login
LastLogin time.Time `json:"last_login"`
// Date and Time of user creation
Created time.Time `json:"created"`
// Is user restricted
Restricted bool `json:"restricted"`
// Is user active
IsActive bool `json:"active"`
// Is user login prohibited
ProhibitLogin bool `json:"prohibit_login"`
// the user's location
Location string `json:"location"`
// the user's website
Website string `json:"website"`
// the user's description
Description string `json:"description"`
// User visibility level option
Visibility VisibleType `json:"visibility"`
// user counts
FollowerCount int `json:"followers_count"`
FollowingCount int `json:"following_count"`
StarredRepoCount int `json:"starred_repos_count"`
}
User represents a user
type UserBadgeOption ¶
type UserBadgeOption struct {
BadgeSlugs []string `json:"badge_slugs"`
}
UserBadgeOption represents options for adding badges to a user
type UserHeatmapData ¶
type UserHeatmapData struct {
Timestamp int64 `json:"timestamp"`
Contributions int64 `json:"contributions"`
}
UserHeatmapData represents the data needed to create a heatmap
type UserSettings ¶
type UserSettings struct {
FullName string `json:"full_name"`
Website string `json:"website"`
Description string `json:"description"`
Location string `json:"location"`
Language string `json:"language"`
Theme string `json:"theme"`
DiffViewStyle string `json:"diff_view_style"`
// Privacy
HideEmail bool `json:"hide_email"`
HideActivity bool `json:"hide_activity"`
}
UserSettings represents user settings
type UserSettingsOptions ¶
type UserSettingsOptions struct {
FullName *string `json:"full_name,omitempty"`
Website *string `json:"website,omitempty"`
Description *string `json:"description,omitempty"`
Location *string `json:"location,omitempty"`
Language *string `json:"language,omitempty"`
Theme *string `json:"theme,omitempty"`
DiffViewStyle *string `json:"diff_view_style,omitempty"`
// Privacy
HideEmail *bool `json:"hide_email,omitempty"`
HideActivity *bool `json:"hide_activity,omitempty"`
}
UserSettingsOptions represents options to change user settings
type UsersService ¶
type UsersService struct{ *Client }
UsersService handles user endpoints.
func (*UsersService) AddEmail ¶
func (c *UsersService) AddEmail(ctx context.Context, opt CreateEmailOption) ([]*Email, *Response, error)
AddEmail add one email to current user with options
func (*UsersService) CheckUserBlock ¶
func (c *UsersService) CheckUserBlock(ctx context.Context, username string) (bool, *Response, error)
CheckUserBlock checks if a user is blocked by the authenticated user
func (*UsersService) CreateAccessToken ¶
func (c *UsersService) CreateAccessToken(ctx context.Context, opt CreateAccessTokenOption) (*AccessToken, *Response, error)
CreateAccessToken create one access token with options
func (*UsersService) CreateGPGKey ¶
func (c *UsersService) CreateGPGKey(ctx context.Context, opt CreateGPGKeyOption) (*GPGKey, *Response, error)
CreateGPGKey create GPG key with options
func (*UsersService) CreatePublicKey ¶
func (c *UsersService) CreatePublicKey(ctx context.Context, opt CreateKeyOption) (*PublicKey, *Response, error)
CreatePublicKey create public key with options
func (*UsersService) DeleteAccessToken ¶
func (c *UsersService) DeleteAccessToken(ctx context.Context, value interface{}) (*Response, error)
DeleteAccessToken delete token, identified by ID and if not available by name
func (*UsersService) DeleteEmail ¶
func (c *UsersService) DeleteEmail(ctx context.Context, opt DeleteEmailOption) (*Response, error)
DeleteEmail delete one email of current users'
func (*UsersService) DeleteGPGKey ¶
DeleteGPGKey delete GPG key with key id
func (*UsersService) DeletePublicKey ¶
DeletePublicKey delete public key with key id
func (*UsersService) DeleteUserAvatar ¶
func (c *UsersService) DeleteUserAvatar(ctx context.Context) (*Response, error)
DeleteUserAvatar deletes the authenticated user's avatar
func (*UsersService) GetGPGKeyVerificationToken ¶
GetGPGKeyVerificationToken gets a verification token for adding a GPG key. Returns the token as a plain string (API returns text/plain, not JSON). The user should sign this token with their GPG key and submit via VerifyGPGKey.
func (*UsersService) GetMyUserInfo ¶
GetMyUserInfo get user info of current user
func (*UsersService) GetPublicKey ¶
func (c *UsersService) GetPublicKey(ctx context.Context, keyID int64) (*PublicKey, *Response, error)
GetPublicKey get current user's public key by key id
func (*UsersService) GetUserByID ¶
GetUserByID returns user by a given user ID
func (*UsersService) GetUserInfo ¶
GetUserInfo get user info by user's name
func (*UsersService) GetUserSettings ¶
func (c *UsersService) GetUserSettings(ctx context.Context) (*UserSettings, *Response, error)
GetUserSettings returns user settings
func (*UsersService) IsFollowing ¶
IsFollowing if current user followed the target
func (*UsersService) IsUserFollowing ¶
IsUserFollowing if the user followed the target
func (*UsersService) ListAccessTokens ¶
func (c *UsersService) ListAccessTokens(ctx context.Context, opts ListAccessTokensOptions) ([]*AccessToken, *Response, error)
ListAccessTokens lists all the access tokens of user
func (*UsersService) ListEmails ¶
func (c *UsersService) ListEmails(ctx context.Context, opt ListEmailsOptions) ([]*Email, *Response, error)
ListEmails all the email addresses of user
func (*UsersService) ListFollowers ¶
func (c *UsersService) ListFollowers(ctx context.Context, user string, opt ListFollowersOptions) ([]*User, *Response, error)
ListFollowers list all the followers of one user
func (*UsersService) ListFollowing ¶
func (c *UsersService) ListFollowing(ctx context.Context, user string, opt ListFollowingOptions) ([]*User, *Response, error)
ListFollowing list all the users the user followed
func (*UsersService) ListGPGKeys ¶
func (c *UsersService) ListGPGKeys(ctx context.Context, user string, opt ListGPGKeysOptions) ([]*GPGKey, *Response, error)
ListGPGKeys list all the GPG keys of the user
func (*UsersService) ListMyBlocks ¶
func (c *UsersService) ListMyBlocks(ctx context.Context, opt ListUserBlocksOptions) ([]*User, *Response, error)
ListMyBlocks lists users blocked by the authenticated user
func (*UsersService) ListMyFollowers ¶
func (c *UsersService) ListMyFollowers(ctx context.Context, opt ListFollowersOptions) ([]*User, *Response, error)
ListMyFollowers list all the followers of current user
func (*UsersService) ListMyFollowing ¶
func (c *UsersService) ListMyFollowing(ctx context.Context, opt ListFollowingOptions) ([]*User, *Response, error)
ListMyFollowing list all the users current user followed
func (*UsersService) ListMyGPGKeys ¶
func (c *UsersService) ListMyGPGKeys(ctx context.Context, opt *ListGPGKeysOptions) ([]*GPGKey, *Response, error)
ListMyGPGKeys list all the GPG keys of current user
func (*UsersService) ListMyPublicKeys ¶
func (c *UsersService) ListMyPublicKeys(ctx context.Context, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
ListMyPublicKeys list all the public keys of current user
func (*UsersService) ListPublicKeys ¶
func (c *UsersService) ListPublicKeys(ctx context.Context, user string, opt ListPublicKeysOptions) ([]*PublicKey, *Response, error)
ListPublicKeys list all the public keys of the user
func (*UsersService) SearchUsers ¶
func (c *UsersService) SearchUsers(ctx context.Context, opt SearchUsersOption) ([]*User, *Response, error)
SearchUsers finds users by query
func (*UsersService) UnblockUser ¶
UnblockUser unblocks a user
func (*UsersService) UpdateUserAvatar ¶
func (c *UsersService) UpdateUserAvatar(ctx context.Context, opt UpdateUserAvatarOption) (*Response, error)
UpdateUserAvatar updates the authenticated user's avatar
func (*UsersService) UpdateUserSettings ¶
func (c *UsersService) UpdateUserSettings(ctx context.Context, opt UserSettingsOptions) (*UserSettings, *Response, error)
UpdateUserSettings returns user settings
func (*UsersService) VerifyGPGKey ¶
func (c *UsersService) VerifyGPGKey(ctx context.Context, opt VerifyGPGKeyOption) (*GPGKey, *Response, error)
VerifyGPGKey verifies a GPG key by submitting a signed verification token. First call GetGPGKeyVerificationToken to get the token, sign it with the GPG key, then call this with the key ID and armored signature.
type VerifyGPGKeyOption ¶
type VerifyGPGKeyOption struct {
// KeyID is the GPG key ID to verify
KeyID string `json:"key_id"`
// Signature is the ASCII-armored signature of the verification token
Signature string `json:"armored_signature"`
}
VerifyGPGKeyOption options for verifying a GPG key
type VisibleType ¶
type VisibleType string
VisibleType defines the visibility
const ( // VisibleTypePublic Visible for everyone VisibleTypePublic VisibleType = "public" // VisibleTypeLimited Visible for every connected user VisibleTypeLimited VisibleType = "limited" // VisibleTypePrivate Visible only for organization's members VisibleTypePrivate VisibleType = "private" )
type WatchInfo ¶
type WatchInfo struct {
Subscribed bool `json:"subscribed"`
Ignored bool `json:"ignored"`
Reason interface{} `json:"reason"`
CreatedAt time.Time `json:"created_at"`
URL string `json:"url"`
RepositoryURL string `json:"repository_url"`
}
WatchInfo represents an API watch status of one repository
type WikiCommit ¶
type WikiCommit struct {
ID string `json:"sha"`
Message string `json:"message"`
Author *CommitUser `json:"author,omitempty"`
Commiter *CommitUser `json:"commiter,omitempty"`
}
WikiCommit represents a wiki commit/revision
type WikiCommitList ¶
type WikiCommitList struct {
WikiCommits []*WikiCommit `json:"commits"`
Count int64 `json:"count"`
}
WikiCommitList represents a list of wiki commits
type WikiPage ¶
type WikiPage struct {
Title string `json:"title"`
ContentBase64 string `json:"content_base64"`
CommitCount int64 `json:"commit_count"`
Sidebar string `json:"sidebar"`
HTMLURL string `json:"html_url"`
SubURL string `json:"sub_url"`
LastCommit *WikiCommit `json:"last_commit,omitempty"`
}
WikiPage represents a wiki page
type WikiPageMetaData ¶
type WikiPageMetaData struct {
Title string `json:"title"`
HTMLURL string `json:"html_url"`
SubURL string `json:"sub_url"`
LastCommit *WikiCommit `json:"last_commit,omitempty"`
}
WikiPageMetaData represents metadata for a wiki page (without content)
type WikiService ¶ added in v1.0.1
type WikiService struct{ *Client }
WikiService handles repository wiki endpoints.
func (*WikiService) CreatePage ¶ added in v1.0.1
func (c *WikiService) CreatePage(ctx context.Context, owner, repo string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
CreatePage creates a new wiki page
func (*WikiService) DeletePage ¶ added in v1.0.1
func (c *WikiService) DeletePage(ctx context.Context, owner, repo, pageName string) (*Response, error)
DeletePage deletes a wiki page
func (*WikiService) EditPage ¶ added in v1.0.1
func (c *WikiService) EditPage(ctx context.Context, owner, repo, pageName string, opt CreateWikiPageOptions) (*WikiPage, *Response, error)
EditPage edits an existing wiki page
func (*WikiService) GetPage ¶ added in v1.0.1
func (c *WikiService) GetPage(ctx context.Context, owner, repo, pageName string) (*WikiPage, *Response, error)
GetPage gets a wiki page by name
func (*WikiService) GetPageRevisions ¶ added in v1.0.1
func (c *WikiService) GetPageRevisions(ctx context.Context, owner, repo, pageName string, opt ListWikiPageRevisionsOptions) (*WikiCommitList, *Response, error)
GetPageRevisions gets all revisions of a wiki page
func (*WikiService) ListPages ¶ added in v1.0.1
func (c *WikiService) ListPages(ctx context.Context, owner, repo string, opt ListWikiPagesOptions) ([]*WikiPageMetaData, *Response, error)
ListPages lists all wiki pages in a repository
Source Files
¶
- actions_artifacts.go
- actions_run.go
- actions_run_jobs.go
- actions_runners.go
- actions_secrets.go
- actions_variables.go
- actions_workflows.go
- activity.go
- activitypub.go
- admin.go
- admin_badges.go
- admin_cron.go
- admin_email.go
- admin_user.go
- client.go
- client_services_wrappers.go
- doc.go
- git.go
- git_hook.go
- helper.go
- hook.go
- httpsign.go
- httpsign_agent.go
- issue.go
- issue_attachment.go
- issue_comment.go
- issue_label.go
- issue_pin.go
- issue_reaction.go
- issue_stopwatch.go
- issue_subscription.go
- issue_template.go
- issue_tracked_time.go
- miscellaneous.go
- notifications.go
- oauth2.go
- org.go
- org_label.go
- org_member.go
- org_team.go
- package.go
- pull.go
- pull_review.go
- release.go
- repo.go
- repo_branch.go
- repo_collaboration.go
- repo_commit.go
- repo_file.go
- repo_key.go
- repo_label.go
- repo_migrate.go
- repo_milestone.go
- repo_misc.go
- repo_protection.go
- repo_stars.go
- repo_tag.go
- repo_template.go
- repo_topics.go
- repo_watch.go
- services.go
- settings.go
- user.go
- user_app.go
- user_block.go
- user_email.go
- user_follow.go
- user_keys.go
- version.go
- wiki.go