From b5fa7ecc2e98aa03b0ffbba580e29b396227a77b Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 5 Sep 2025 12:09:38 -0700 Subject: [PATCH 1/5] Upgrade golang to 1.25.0 and add descriptions for the swagger structs' fields --- Makefile | 2 +- go.mod | 2 +- modules/structs/activity.go | 12 + modules/structs/activitypub.go | 1 + modules/structs/admin_user.go | 68 ++-- modules/structs/attachment.go | 8 + modules/structs/cron.go | 5 + modules/structs/git_blob.go | 7 + modules/structs/git_hook.go | 4 + modules/structs/hook.go | 135 +++++++ modules/structs/issue_comment.go | 18 + modules/structs/issue_label.go | 10 + modules/structs/issue_milestone.go | 14 + modules/structs/issue_reaction.go | 4 + modules/structs/issue_stopwatch.go | 7 + modules/structs/issue_tracked_time.go | 2 + modules/structs/lfs_lock.go | 17 + modules/structs/mirror.go | 11 + modules/structs/miscellaneous.go | 17 + modules/structs/nodeinfo.go | 19 + modules/structs/notifications.go | 15 + modules/structs/org.go | 27 ++ modules/structs/org_member.go | 1 + modules/structs/org_team.go | 12 + modules/structs/package.go | 16 + modules/structs/pull.go | 190 ++++++--- modules/structs/pull_review.go | 2 + modules/structs/release.go | 26 ++ modules/structs/repo_actions.go | 19 + modules/structs/repo_branch.go | 11 + modules/structs/repo_collaborator.go | 4 + modules/structs/repo_commit.go | 26 ++ modules/structs/repo_file.go | 34 ++ modules/structs/repo_key.go | 9 + modules/structs/repo_note.go | 2 + modules/structs/repo_refs.go | 6 + modules/structs/repo_tag.go | 31 ++ modules/structs/repo_topic.go | 6 + modules/structs/repo_tree.go | 12 + modules/structs/repo_watch.go | 6 + modules/structs/repo_wiki.go | 13 + modules/structs/settings.go | 18 + modules/structs/status.go | 18 + modules/structs/user_app.go | 19 + modules/structs/user_email.go | 4 + modules/structs/user_gpgkey.go | 18 + modules/structs/user_key.go | 10 + templates/swagger/v1_json.tmpl | 532 ++++++++++++++++++++++++++ 48 files changed, 1365 insertions(+), 85 deletions(-) diff --git a/Makefile b/Makefile index cd4967d8f3f4c..5f82013132995 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.8.0 GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0 GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.15 MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.7.0 -SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.32.3 +SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@717e3cb29becaaf00e56953556c6d80f8a01b286 XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1 GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1 diff --git a/go.mod b/go.mod index cadb23f069644..09b150e3e5dde 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module code.gitea.io/gitea -go 1.24.6 +go 1.25.0 // rfc5280 said: "The serial number is an integer assigned by the CA to each certificate." // But some CAs use negative serial number, just relax the check. related: diff --git a/modules/structs/activity.go b/modules/structs/activity.go index ea27fbfd77376..7f664c874eb8c 100644 --- a/modules/structs/activity.go +++ b/modules/structs/activity.go @@ -6,20 +6,32 @@ package structs import "time" type Activity struct { + // The unique identifier of the activity ID int64 `json:"id"` + // The ID of the user who receives/sees this activity UserID int64 `json:"user_id"` // Receiver user // the type of action // // enum: create_repo,rename_repo,star_repo,watch_repo,commit_repo,create_issue,create_pull_request,transfer_repo,push_tag,comment_issue,merge_pull_request,close_issue,reopen_issue,close_pull_request,reopen_pull_request,delete_tag,delete_branch,mirror_sync_push,mirror_sync_create,mirror_sync_delete,approve_pull_request,reject_pull_request,comment_pull,publish_release,pull_review_dismissed,pull_request_ready_for_review,auto_merge_pull_request OpType string `json:"op_type"` + // The ID of the user who performed the action ActUserID int64 `json:"act_user_id"` + // The user who performed the action ActUser *User `json:"act_user"` + // The ID of the repository associated with the activity RepoID int64 `json:"repo_id"` + // The repository associated with the activity Repo *Repository `json:"repo"` + // The ID of the comment associated with the activity (if applicable) CommentID int64 `json:"comment_id"` + // The comment associated with the activity (if applicable) Comment *Comment `json:"comment"` + // The name of the git reference (branch/tag) associated with the activity RefName string `json:"ref_name"` + // Whether this activity is from a private repository IsPrivate bool `json:"is_private"` + // Additional content or details about the activity Content string `json:"content"` + // The date and time when the activity occurred Created time.Time `json:"created"` } diff --git a/modules/structs/activitypub.go b/modules/structs/activitypub.go index 117eb0bed2977..39a6c1ac2ac17 100644 --- a/modules/structs/activitypub.go +++ b/modules/structs/activitypub.go @@ -5,5 +5,6 @@ package structs // ActivityPub type type ActivityPub struct { + // Context defines the JSON-LD context for ActivityPub Context string `json:"@context"` } diff --git a/modules/structs/admin_user.go b/modules/structs/admin_user.go index c68b59a8978ee..d158a5fd316e3 100644 --- a/modules/structs/admin_user.go +++ b/modules/structs/admin_user.go @@ -8,6 +8,7 @@ import "time" // CreateUserOption create user options type CreateUserOption struct { + // The authentication source ID to associate with the user SourceID int64 `json:"source_id"` // identifier of the user, provided by the external authenticator (if configured) // default: empty @@ -15,15 +16,21 @@ type CreateUserOption struct { // username of the user // required: true Username string `json:"username" binding:"Required;Username;MaxSize(40)"` + // The full display name of the user FullName string `json:"full_name" binding:"MaxSize(100)"` // required: true // swagger:strfmt email - Email string `json:"email" binding:"Required;Email;MaxSize(254)"` - Password string `json:"password" binding:"MaxSize(255)"` - MustChangePassword *bool `json:"must_change_password"` - SendNotify bool `json:"send_notify"` - Restricted *bool `json:"restricted"` - Visibility string `json:"visibility" binding:"In(,public,limited,private)"` + Email string `json:"email" binding:"Required;Email;MaxSize(254)"` + // The plain text password for the user + Password string `json:"password" binding:"MaxSize(255)"` + // Whether the user must change password on first login + MustChangePassword *bool `json:"must_change_password"` + // Whether to send welcome notification email to the user + SendNotify bool `json:"send_notify"` + // Whether the user has restricted access privileges + Restricted *bool `json:"restricted"` + // User visibility level: public, limited, or private + Visibility string `json:"visibility" binding:"In(,public,limited,private)"` // For explicitly setting the user creation timestamp. Useful when users are // migrated from other systems. When omitted, the user's creation timestamp @@ -34,26 +41,43 @@ type CreateUserOption struct { // EditUserOption edit user options type EditUserOption struct { // required: true + // The authentication source ID to associate with the user SourceID int64 `json:"source_id"` // identifier of the user, provided by the external authenticator (if configured) // default: empty // required: true LoginName string `json:"login_name" binding:"Required"` // swagger:strfmt email - Email *string `json:"email" binding:"MaxSize(254)"` - FullName *string `json:"full_name" binding:"MaxSize(100)"` - Password string `json:"password" binding:"MaxSize(255)"` - MustChangePassword *bool `json:"must_change_password"` - Website *string `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"` - Location *string `json:"location" binding:"MaxSize(50)"` - Description *string `json:"description" binding:"MaxSize(255)"` - 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 string `json:"visibility" binding:"In(,public,limited,private)"` + // The email address of the user + Email *string `json:"email" binding:"MaxSize(254)"` + // The full display name of the user + FullName *string `json:"full_name" binding:"MaxSize(100)"` + // The plain text password for the user + Password string `json:"password" binding:"MaxSize(255)"` + // Whether the user must change password on next login + MustChangePassword *bool `json:"must_change_password"` + // The user's personal website URL + Website *string `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"` + // The user's location or address + Location *string `json:"location" binding:"MaxSize(50)"` + // The user's personal description or bio + Description *string `json:"description" binding:"MaxSize(255)"` + // Whether the user account is active + Active *bool `json:"active"` + // Whether the user has administrator privileges + Admin *bool `json:"admin"` + // Whether the user can use Git hooks + AllowGitHook *bool `json:"allow_git_hook"` + // Whether the user can import local repositories + AllowImportLocal *bool `json:"allow_import_local"` + // Maximum number of repositories the user can create + MaxRepoCreation *int `json:"max_repo_creation"` + // Whether the user is prohibited from logging in + ProhibitLogin *bool `json:"prohibit_login"` + // Whether the user can create organizations + AllowCreateOrganization *bool `json:"allow_create_organization"` + // Whether the user has restricted access privileges + Restricted *bool `json:"restricted"` + // User visibility level: public, limited, or private + Visibility string `json:"visibility" binding:"In(,public,limited,private)"` } diff --git a/modules/structs/attachment.go b/modules/structs/attachment.go index 38beca5e99ae3..eee381d47c469 100644 --- a/modules/structs/attachment.go +++ b/modules/structs/attachment.go @@ -10,18 +10,26 @@ import ( // Attachment a generic attachment // swagger:model type Attachment struct { + // ID is the unique identifier for the attachment ID int64 `json:"id"` + // Name is the filename of the attachment Name string `json:"name"` + // Size is the file size in bytes Size int64 `json:"size"` + // DownloadCount is the number of times the attachment has been downloaded DownloadCount int64 `json:"download_count"` // swagger:strfmt date-time + // Created is the time when the attachment was uploaded Created time.Time `json:"created_at"` + // UUID is the unique identifier for the attachment file UUID string `json:"uuid"` + // DownloadURL is the URL to download the attachment DownloadURL string `json:"browser_download_url"` } // EditAttachmentOptions options for editing attachments // swagger:model type EditAttachmentOptions struct { + // Name is the new filename for the attachment Name string `json:"name"` } diff --git a/modules/structs/cron.go b/modules/structs/cron.go index 39c6a06a4225c..299b0b0f61e67 100644 --- a/modules/structs/cron.go +++ b/modules/structs/cron.go @@ -7,9 +7,14 @@ import "time" // Cron represents a Cron task type Cron struct { + // The name of the cron task Name string `json:"name"` + // The cron schedule expression (e.g., "0 0 * * *") Schedule string `json:"schedule"` + // The next scheduled execution time Next time.Time `json:"next"` + // The previous execution time Prev time.Time `json:"prev"` + // The total number of times this cron task has been executed ExecTimes int64 `json:"exec_times"` } diff --git a/modules/structs/git_blob.go b/modules/structs/git_blob.go index 643b69ed3726a..b7700dfaf727b 100644 --- a/modules/structs/git_blob.go +++ b/modules/structs/git_blob.go @@ -5,12 +5,19 @@ package structs // GitBlobResponse represents a git blob type GitBlobResponse struct { + // The content of the git blob (may be base64 encoded) Content *string `json:"content"` + // The encoding used for the content (e.g., "base64") Encoding *string `json:"encoding"` + // The URL to access this git blob URL string `json:"url"` + // The SHA hash of the git blob SHA string `json:"sha"` + // The size of the git blob in bytes Size int64 `json:"size"` + // The LFS object ID if this blob is stored in LFS LfsOid *string `json:"lfs_oid,omitempty"` + // The size of the LFS object if this blob is stored in LFS LfsSize *int64 `json:"lfs_size,omitempty"` } diff --git a/modules/structs/git_hook.go b/modules/structs/git_hook.go index 20230250ec3f9..eb2c37ff8f329 100644 --- a/modules/structs/git_hook.go +++ b/modules/structs/git_hook.go @@ -5,8 +5,11 @@ package structs // GitHook represents a Git repository hook type GitHook struct { + // Name is the name of the Git hook Name string `json:"name"` + // IsActive indicates if the hook is active IsActive bool `json:"is_active"` + // Content contains the script content of the hook Content string `json:"content,omitempty"` } @@ -15,5 +18,6 @@ type GitHookList []*GitHook // EditGitHookOption options when modifying one Git hook type EditGitHookOption struct { + // Content is the new script content for the hook Content string `json:"content"` } diff --git a/modules/structs/hook.go b/modules/structs/hook.go index ac779a5740748..5f8930665ccc5 100644 --- a/modules/structs/hook.go +++ b/modules/structs/hook.go @@ -17,17 +17,27 @@ var ErrInvalidReceiveHook = errors.New("Invalid JSON payload received over webho // Hook a hook is a web hook when one repository changed type Hook struct { + // The unique identifier of the webhook ID int64 `json:"id"` + // The type of the webhook (e.g., gitea, slack, discord) Type string `json:"type"` + // Branch filter pattern to determine which branches trigger the webhook BranchFilter string `json:"branch_filter"` + // The URL of the webhook endpoint (hidden in JSON) URL string `json:"-"` + // Configuration settings for the webhook Config map[string]string `json:"config"` + // List of events that trigger this webhook Events []string `json:"events"` + // Authorization header to include in webhook requests AuthorizationHeader string `json:"authorization_header"` + // Whether the webhook is active and will be triggered Active bool `json:"active"` // swagger:strfmt date-time + // The date and time when the webhook was last updated Updated time.Time `json:"updated_at"` // swagger:strfmt date-time + // The date and time when the webhook was created Created time.Time `json:"created_at"` } @@ -42,22 +52,33 @@ type CreateHookOptionConfig map[string]string type CreateHookOption struct { // required: true // enum: dingtalk,discord,gitea,gogs,msteams,slack,telegram,feishu,wechatwork,packagist + // The type of the webhook to create Type string `json:"type" binding:"Required"` // required: true + // Configuration settings for the webhook Config CreateHookOptionConfig `json:"config" binding:"Required"` + // List of events that will trigger this webhook Events []string `json:"events"` + // Branch filter pattern to determine which branches trigger the webhook BranchFilter string `json:"branch_filter" binding:"GlobPattern"` + // Authorization header to include in webhook requests AuthorizationHeader string `json:"authorization_header"` // default: false + // Whether the webhook should be active upon creation Active bool `json:"active"` } // EditHookOption options when modify one hook type EditHookOption struct { + // Configuration settings for the webhook Config map[string]string `json:"config"` + // List of events that trigger this webhook Events []string `json:"events"` + // Branch filter pattern to determine which branches trigger the webhook BranchFilter string `json:"branch_filter" binding:"GlobPattern"` + // Authorization header to include in webhook requests AuthorizationHeader string `json:"authorization_header"` + // Whether the webhook is active and will be triggered Active *bool `json:"active"` } @@ -83,24 +104,38 @@ type PayloadUser struct { type PayloadCommit struct { // sha1 hash of the commit ID string `json:"id"` + // The commit message Message string `json:"message"` + // The URL to view this commit URL string `json:"url"` + // The author of the commit Author *PayloadUser `json:"author"` + // The committer of the commit Committer *PayloadUser `json:"committer"` + // GPG verification information for the commit Verification *PayloadCommitVerification `json:"verification"` // swagger:strfmt date-time + // The timestamp when the commit was made Timestamp time.Time `json:"timestamp"` + // List of files added in this commit Added []string `json:"added"` + // List of files removed in this commit Removed []string `json:"removed"` + // List of files modified in this commit Modified []string `json:"modified"` } // PayloadCommitVerification represents the GPG verification of a commit type PayloadCommitVerification struct { + // Whether the commit signature is verified Verified bool `json:"verified"` + // The reason for the verification status Reason string `json:"reason"` + // The GPG signature of the commit Signature string `json:"signature"` + // The user who signed the commit Signer *PayloadUser `json:"signer"` + // The signed payload content Payload string `json:"payload"` } @@ -119,10 +154,15 @@ var ( // CreatePayload represents a payload information of create event. type CreatePayload struct { + // The SHA hash of the created reference Sha string `json:"sha"` + // The full name of the created reference Ref string `json:"ref"` + // The type of reference created (branch or tag) RefType string `json:"ref_type"` + // The repository where the reference was created Repo *Repository `json:"repository"` + // The user who created the reference Sender *User `json:"sender"` } @@ -161,10 +201,15 @@ const ( // DeletePayload represents delete payload type DeletePayload struct { + // The name of the deleted reference Ref string `json:"ref"` + // The type of reference deleted (branch or tag) RefType string `json:"ref_type"` + // The type of entity that performed the deletion PusherType PusherType `json:"pusher_type"` + // The repository where the reference was deleted Repo *Repository `json:"repository"` + // The user who deleted the reference Sender *User `json:"sender"` } @@ -175,8 +220,11 @@ func (p *DeletePayload) JSONPayload() ([]byte, error) { // ForkPayload represents fork payload type ForkPayload struct { + // The forked repository (the new fork) Forkee *Repository `json:"forkee"` + // The original repository that was forked Repo *Repository `json:"repository"` + // The user who created the fork Sender *User `json:"sender"` } @@ -197,13 +245,21 @@ const ( // IssueCommentPayload represents a payload information of issue comment event. type IssueCommentPayload struct { + // The action performed on the comment (created, edited, deleted) Action HookIssueCommentAction `json:"action"` + // The issue that the comment belongs to Issue *Issue `json:"issue"` + // The pull request if the comment is on a pull request PullRequest *PullRequest `json:"pull_request,omitempty"` + // The comment that was acted upon Comment *Comment `json:"comment"` + // Changes made to the comment (for edit actions) Changes *ChangesPayload `json:"changes,omitempty"` + // The repository containing the issue/pull request Repository *Repository `json:"repository"` + // The user who performed the action Sender *User `json:"sender"` + // Whether this comment is on a pull request IsPull bool `json:"is_pull"` } @@ -224,9 +280,13 @@ const ( // ReleasePayload represents a payload information of release event. type ReleasePayload struct { + // The action performed on the release (published, updated, deleted) Action HookReleaseAction `json:"action"` + // The release that was acted upon Release *Release `json:"release"` + // The repository containing the release Repository *Repository `json:"repository"` + // The user who performed the action Sender *User `json:"sender"` } @@ -237,15 +297,25 @@ func (p *ReleasePayload) JSONPayload() ([]byte, error) { // PushPayload represents a payload information of push event. type PushPayload struct { + // The full name of the pushed reference Ref string `json:"ref"` + // The SHA of the most recent commit before the push Before string `json:"before"` + // The SHA of the most recent commit after the push After string `json:"after"` + // URL to compare the changes in this push CompareURL string `json:"compare_url"` + // List of commits included in the push Commits []*PayloadCommit `json:"commits"` + // Total number of commits in the push TotalCommits int `json:"total_commits"` + // The most recent commit in the push HeadCommit *PayloadCommit `json:"head_commit"` + // The repository that was pushed to Repo *Repository `json:"repository"` + // The user who performed the push Pusher *User `json:"pusher"` + // The user who triggered the webhook Sender *User `json:"sender"` } @@ -313,12 +383,19 @@ const ( // IssuePayload represents the payload information that is sent along with an issue event. type IssuePayload struct { + // The action performed on the issue Action HookIssueAction `json:"action"` + // The index number of the issue Index int64 `json:"number"` + // Changes made to the issue (for edit actions) Changes *ChangesPayload `json:"changes,omitempty"` + // The issue that was acted upon Issue *Issue `json:"issue"` + // The repository containing the issue Repository *Repository `json:"repository"` + // The user who performed the action Sender *User `json:"sender"` + // The commit ID related to the issue action CommitID string `json:"commit_id"` } @@ -329,26 +406,39 @@ func (p *IssuePayload) JSONPayload() ([]byte, error) { // ChangesFromPayload FIXME type ChangesFromPayload struct { + // The previous value before the change From string `json:"from"` } // ChangesPayload represents the payload information of issue change type ChangesPayload struct { + // Changes made to the title Title *ChangesFromPayload `json:"title,omitempty"` + // Changes made to the body/description Body *ChangesFromPayload `json:"body,omitempty"` + // Changes made to the reference Ref *ChangesFromPayload `json:"ref,omitempty"` } // PullRequestPayload represents a payload information of pull request event. type PullRequestPayload struct { + // The action performed on the pull request Action HookIssueAction `json:"action"` + // The index number of the pull request Index int64 `json:"number"` + // Changes made to the pull request (for edit actions) Changes *ChangesPayload `json:"changes,omitempty"` + // The pull request that was acted upon PullRequest *PullRequest `json:"pull_request"` + // The reviewer that was requested (for review request actions) RequestedReviewer *User `json:"requested_reviewer"` + // The repository containing the pull request Repository *Repository `json:"repository"` + // The user who performed the action Sender *User `json:"sender"` + // The commit ID related to the pull request action CommitID string `json:"commit_id"` + // The review information (for review actions) Review *ReviewPayload `json:"review"` } @@ -359,7 +449,9 @@ func (p *PullRequestPayload) JSONPayload() ([]byte, error) { // ReviewPayload FIXME type ReviewPayload struct { + // The type of review (approved, rejected, comment) Type string `json:"type"` + // The content/body of the review Content string `json:"content"` } @@ -377,10 +469,15 @@ const ( // WikiPayload payload for repository webhooks type WikiPayload struct { + // The action performed on the wiki page Action HookWikiAction `json:"action"` + // The repository containing the wiki Repository *Repository `json:"repository"` + // The user who performed the action Sender *User `json:"sender"` + // The name of the wiki page Page string `json:"page"` + // The comment/commit message for the wiki change Comment string `json:"comment"` } @@ -401,9 +498,13 @@ const ( // RepositoryPayload payload for repository webhooks type RepositoryPayload struct { + // The action performed on the repository Action HookRepoAction `json:"action"` + // The repository that was acted upon Repository *Repository `json:"repository"` + // The organization that owns the repository (if applicable) Organization *User `json:"organization"` + // The user who performed the action Sender *User `json:"sender"` } @@ -424,10 +525,15 @@ const ( // PackagePayload represents a package payload type PackagePayload struct { + // The action performed on the package Action HookPackageAction `json:"action"` + // The repository associated with the package Repository *Repository `json:"repository"` + // The package that was acted upon Package *Package `json:"package"` + // The organization that owns the package (if applicable) Organization *Organization `json:"organization"` + // The user who performed the action Sender *User `json:"sender"` } @@ -438,10 +544,15 @@ func (p *PackagePayload) JSONPayload() ([]byte, error) { // WorkflowDispatchPayload represents a workflow dispatch payload type WorkflowDispatchPayload struct { + // The name or path of the workflow file Workflow string `json:"workflow"` + // The git reference (branch, tag, or commit SHA) to run the workflow on Ref string `json:"ref"` + // Input parameters for the workflow dispatch event Inputs map[string]any `json:"inputs"` + // The repository containing the workflow Repository *Repository `json:"repository"` + // The user who triggered the workflow dispatch Sender *User `json:"sender"` } @@ -453,18 +564,29 @@ func (p *WorkflowDispatchPayload) JSONPayload() ([]byte, error) { // CommitStatusPayload represents a payload information of commit status event. type CommitStatusPayload struct { // TODO: add Branches per https://docs.github.com/en/webhooks/webhook-events-and-payloads#status + // The commit that the status is associated with Commit *PayloadCommit `json:"commit"` + // The context/identifier for this status check Context string `json:"context"` // swagger:strfmt date-time + // The date and time when the status was created CreatedAt time.Time `json:"created_at"` + // A short description of the status Description string `json:"description"` + // The unique identifier of the status ID int64 `json:"id"` + // The repository containing the commit Repo *Repository `json:"repository"` + // The user who created the status Sender *User `json:"sender"` + // The SHA hash of the commit SHA string `json:"sha"` + // The state of the status (pending, success, error, failure) State string `json:"state"` + // The target URL to associate with this status TargetURL string `json:"target_url"` // swagger:strfmt date-time + // The date and time when the status was last updated UpdatedAt *time.Time `json:"updated_at"` } @@ -475,12 +597,19 @@ func (p *CommitStatusPayload) JSONPayload() ([]byte, error) { // WorkflowRunPayload represents a payload information of workflow run event. type WorkflowRunPayload struct { + // The action performed on the workflow run Action string `json:"action"` + // The workflow definition Workflow *ActionWorkflow `json:"workflow"` + // The workflow run that was acted upon WorkflowRun *ActionWorkflowRun `json:"workflow_run"` + // The pull request associated with the workflow run (if applicable) PullRequest *PullRequest `json:"pull_request,omitempty"` + // The organization that owns the repository (if applicable) Organization *Organization `json:"organization,omitempty"` + // The repository containing the workflow Repo *Repository `json:"repository"` + // The user who triggered the workflow run Sender *User `json:"sender"` } @@ -491,11 +620,17 @@ func (p *WorkflowRunPayload) JSONPayload() ([]byte, error) { // WorkflowJobPayload represents a payload information of workflow job event. type WorkflowJobPayload struct { + // The action performed on the workflow job Action string `json:"action"` + // The workflow job that was acted upon WorkflowJob *ActionWorkflowJob `json:"workflow_job"` + // The pull request associated with the workflow job (if applicable) PullRequest *PullRequest `json:"pull_request,omitempty"` + // The organization that owns the repository (if applicable) Organization *Organization `json:"organization,omitempty"` + // The repository containing the workflow Repo *Repository `json:"repository"` + // The user who triggered the workflow job Sender *User `json:"sender"` } diff --git a/modules/structs/issue_comment.go b/modules/structs/issue_comment.go index 9e8f5c4bf3321..00828fcd6930f 100644 --- a/modules/structs/issue_comment.go +++ b/modules/structs/issue_comment.go @@ -9,14 +9,23 @@ import ( // Comment represents a comment on a commit or issue type Comment struct { + // ID is the unique identifier for the comment ID int64 `json:"id"` + // HTMLURL is the web URL for viewing the comment HTMLURL string `json:"html_url"` + // PRURL is the API URL for the pull request (if applicable) PRURL string `json:"pull_request_url"` + // IssueURL is the API URL for the issue IssueURL string `json:"issue_url"` + // Poster is the user who posted the comment Poster *User `json:"user"` + // OriginalAuthor is the original author name (for imported comments) OriginalAuthor string `json:"original_author"` + // OriginalAuthorID is the original author ID (for imported comments) OriginalAuthorID int64 `json:"original_author_id"` + // Body contains the comment text content Body string `json:"body"` + // Attachments contains files attached to the comment Attachments []*Attachment `json:"assets"` // swagger:strfmt date-time Created time.Time `json:"created_at"` @@ -27,24 +36,33 @@ type Comment struct { // CreateIssueCommentOption options for creating a comment on an issue type CreateIssueCommentOption struct { // required:true + // Body is the comment text content Body string `json:"body" binding:"Required"` } // EditIssueCommentOption options for editing a comment type EditIssueCommentOption struct { // required: true + // Body is the updated comment text content Body string `json:"body" binding:"Required"` } // TimelineComment represents a timeline comment (comment of any type) on a commit or issue type TimelineComment struct { + // ID is the unique identifier for the timeline comment ID int64 `json:"id"` + // Type indicates the type of timeline event Type string `json:"type"` + // HTMLURL is the web URL for viewing the comment HTMLURL string `json:"html_url"` + // PRURL is the API URL for the pull request (if applicable) PRURL string `json:"pull_request_url"` + // IssueURL is the API URL for the issue IssueURL string `json:"issue_url"` + // Poster is the user who created the timeline event Poster *User `json:"user"` + // Body contains the timeline event content Body string `json:"body"` // swagger:strfmt date-time Created time.Time `json:"created_at"` diff --git a/modules/structs/issue_label.go b/modules/structs/issue_label.go index 942cc0b3a1e5b..e110b31aa7d3b 100644 --- a/modules/structs/issue_label.go +++ b/modules/structs/issue_label.go @@ -7,7 +7,9 @@ package structs // Label a label to an issue or a pr // swagger:model type Label struct { + // ID is the unique identifier for the label ID int64 `json:"id"` + // Name is the display name of the label Name string `json:"name"` // example: false Exclusive bool `json:"exclusive"` @@ -15,19 +17,23 @@ type Label struct { IsArchived bool `json:"is_archived"` // example: 00aabb Color string `json:"color"` + // Description provides additional context about the label's purpose Description string `json:"description"` + // URL is the API endpoint for accessing this label URL string `json:"url"` } // CreateLabelOption options for creating a label type CreateLabelOption struct { // required:true + // Name is the display name for the new label Name string `json:"name" binding:"Required"` // example: false Exclusive bool `json:"exclusive"` // required:true // example: #00aabb Color string `json:"color" binding:"Required"` + // Description provides additional context about the label's purpose Description string `json:"description"` // example: false IsArchived bool `json:"is_archived"` @@ -35,11 +41,13 @@ type CreateLabelOption struct { // EditLabelOption options for editing a label type EditLabelOption struct { + // Name is the new display name for the label Name *string `json:"name"` // example: false Exclusive *bool `json:"exclusive"` // example: #00aabb Color *string `json:"color"` + // Description provides additional context about the label's purpose Description *string `json:"description"` // example: false IsArchived *bool `json:"is_archived"` @@ -54,10 +62,12 @@ type IssueLabelsOption struct { // LabelTemplate info of a Label template type LabelTemplate struct { + // Name is the display name of the label template Name string `json:"name"` // example: false Exclusive bool `json:"exclusive"` // example: 00aabb Color string `json:"color"` + // Description provides additional context about the label template's purpose Description string `json:"description"` } diff --git a/modules/structs/issue_milestone.go b/modules/structs/issue_milestone.go index a840cf1820c76..f38664e214efa 100644 --- a/modules/structs/issue_milestone.go +++ b/modules/structs/issue_milestone.go @@ -9,11 +9,17 @@ import ( // Milestone milestone is a collection of issues on one repository type Milestone struct { + // ID is the unique identifier for the milestone ID int64 `json:"id"` + // Title is the title of the milestone Title string `json:"title"` + // Description provides details about the milestone Description string `json:"description"` + // State indicates if the milestone is open or closed State StateType `json:"state"` + // OpenIssues is the number of open issues in this milestone OpenIssues int `json:"open_issues"` + // ClosedIssues is the number of closed issues in this milestone ClosedIssues int `json:"closed_issues"` // swagger:strfmt date-time Created time.Time `json:"created_at"` @@ -27,18 +33,26 @@ type Milestone struct { // CreateMilestoneOption options for creating a milestone type CreateMilestoneOption struct { + // Title is the title of the new milestone Title string `json:"title"` + // Description provides details about the milestone Description string `json:"description"` // swagger:strfmt date-time + // Deadline is the due date for the milestone Deadline *time.Time `json:"due_on"` // enum: open,closed + // State indicates the initial state of the milestone State string `json:"state"` } // EditMilestoneOption options for editing a milestone type EditMilestoneOption struct { + // Title is the updated title of the milestone Title string `json:"title"` + // Description provides updated details about the milestone Description *string `json:"description"` + // State indicates the updated state of the milestone State *string `json:"state"` + // Deadline is the updated due date for the milestone Deadline *time.Time `json:"due_on"` } diff --git a/modules/structs/issue_reaction.go b/modules/structs/issue_reaction.go index 8d907a47e568f..538946170d506 100644 --- a/modules/structs/issue_reaction.go +++ b/modules/structs/issue_reaction.go @@ -9,13 +9,17 @@ import ( // EditReactionOption contain the reaction type type EditReactionOption struct { + // The reaction content (e.g., emoji or reaction type) Reaction string `json:"content"` } // Reaction contain one reaction type Reaction struct { + // The user who created the reaction User *User `json:"user"` + // The reaction content (e.g., emoji or reaction type) Reaction string `json:"content"` // swagger:strfmt date-time + // The date and time when the reaction was created Created time.Time `json:"created_at"` } diff --git a/modules/structs/issue_stopwatch.go b/modules/structs/issue_stopwatch.go index ceade1ddd2f77..a99dbcfd4c510 100644 --- a/modules/structs/issue_stopwatch.go +++ b/modules/structs/issue_stopwatch.go @@ -10,12 +10,19 @@ import ( // StopWatch represent a running stopwatch type StopWatch struct { // swagger:strfmt date-time + // Created is the time when the stopwatch was started Created time.Time `json:"created"` + // Seconds is the total elapsed time in seconds Seconds int64 `json:"seconds"` + // Duration is a human-readable duration string Duration string `json:"duration"` + // IssueIndex is the index number of the associated issue IssueIndex int64 `json:"issue_index"` + // IssueTitle is the title of the associated issue IssueTitle string `json:"issue_title"` + // RepoOwnerName is the name of the repository owner RepoOwnerName string `json:"repo_owner_name"` + // RepoName is the name of the repository RepoName string `json:"repo_name"` } diff --git a/modules/structs/issue_tracked_time.go b/modules/structs/issue_tracked_time.go index befcfb323d046..2f7da24cf275b 100644 --- a/modules/structs/issue_tracked_time.go +++ b/modules/structs/issue_tracked_time.go @@ -20,6 +20,7 @@ type AddTimeOption struct { // TrackedTime worked time for an issue / pr type TrackedTime struct { + // ID is the unique identifier for the tracked time entry ID int64 `json:"id"` // swagger:strfmt date-time Created time.Time `json:"created"` @@ -31,6 +32,7 @@ type TrackedTime struct { UserName string `json:"user_name"` // deprecated (only for backwards compatibility) IssueID int64 `json:"issue_id"` + // Issue contains the associated issue information Issue *Issue `json:"issue"` } diff --git a/modules/structs/lfs_lock.go b/modules/structs/lfs_lock.go index 6b4c0bc111a21..c05abb78969b3 100644 --- a/modules/structs/lfs_lock.go +++ b/modules/structs/lfs_lock.go @@ -10,55 +10,72 @@ import ( // LFSLock represent a lock // for use with the locks API. type LFSLock struct { + // The unique identifier of the lock ID string `json:"id"` + // The file path that is locked Path string `json:"path"` + // The timestamp when the lock was created LockedAt time.Time `json:"locked_at"` + // The owner of the lock Owner *LFSLockOwner `json:"owner"` } // LFSLockOwner represent a lock owner // for use with the locks API. type LFSLockOwner struct { + // The name of the lock owner Name string `json:"name"` } // LFSLockRequest contains the path of the lock to create // https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#create-lock type LFSLockRequest struct { + // The file path to lock Path string `json:"path"` } // LFSLockResponse represent a lock created // https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#create-lock type LFSLockResponse struct { + // The created lock Lock *LFSLock `json:"lock"` } // LFSLockList represent a list of lock requested // https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#list-locks type LFSLockList struct { + // The list of locks Locks []*LFSLock `json:"locks"` + // The cursor for pagination to the next set of results Next string `json:"next_cursor,omitempty"` } // LFSLockListVerify represent a list of lock verification requested // https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#list-locks-for-verification type LFSLockListVerify struct { + // Locks owned by the requesting user Ours []*LFSLock `json:"ours"` + // Locks owned by other users Theirs []*LFSLock `json:"theirs"` + // The cursor for pagination to the next set of results Next string `json:"next_cursor,omitempty"` } // LFSLockError contains information on the error that occurs type LFSLockError struct { + // The error message Message string `json:"message"` + // The lock related to the error, if any Lock *LFSLock `json:"lock,omitempty"` + // URL to documentation about the error Documentation string `json:"documentation_url,omitempty"` + // The request ID for debugging purposes RequestID string `json:"request_id,omitempty"` } // LFSLockDeleteRequest contains params of a delete request // https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#delete-lock type LFSLockDeleteRequest struct { + // Whether to force delete the lock even if not owned by the requester Force bool `json:"force"` } diff --git a/modules/structs/mirror.go b/modules/structs/mirror.go index 8259583cdeddc..49559f64f659e 100644 --- a/modules/structs/mirror.go +++ b/modules/structs/mirror.go @@ -7,24 +7,35 @@ import "time" // CreatePushMirrorOption represents need information to create a push mirror of a repository. type CreatePushMirrorOption struct { + // The remote repository URL to push to RemoteAddress string `json:"remote_address"` + // The username for authentication with the remote repository RemoteUsername string `json:"remote_username"` + // The password for authentication with the remote repository RemotePassword string `json:"remote_password"` + // The sync interval for automatic updates Interval string `json:"interval"` + // Whether to sync on every commit SyncOnCommit bool `json:"sync_on_commit"` } // PushMirror represents information of a push mirror // swagger:model type PushMirror struct { + // The name of the source repository RepoName string `json:"repo_name"` + // The name of the remote in the git configuration RemoteName string `json:"remote_name"` + // The remote repository URL being mirrored to RemoteAddress string `json:"remote_address"` // swagger:strfmt date-time CreatedUnix time.Time `json:"created"` // swagger:strfmt date-time LastUpdateUnix *time.Time `json:"last_update"` + // The last error message encountered during sync LastError string `json:"last_error"` + // The sync interval for automatic updates Interval string `json:"interval"` + // Whether to sync on every commit SyncOnCommit bool `json:"sync_on_commit"` } diff --git a/modules/structs/miscellaneous.go b/modules/structs/miscellaneous.go index cfdb6db96c3c7..92a10cb98d351 100644 --- a/modules/structs/miscellaneous.go +++ b/modules/structs/miscellaneous.go @@ -5,13 +5,17 @@ package structs // SearchResults results of a successful search type SearchResults struct { + // OK indicates if the search was successful OK bool `json:"ok"` + // Data contains the repository search results Data []*Repository `json:"data"` } // SearchError error of a failed search type SearchError struct { + // OK indicates the search status (always false for errors) OK bool `json:"ok"` + // Error contains the error message Error string `json:"error"` } @@ -73,33 +77,46 @@ type MarkdownRender string // ServerVersion wraps the version of the server type ServerVersion struct { + // Version is the server version string Version string `json:"version"` } // GitignoreTemplateInfo name and text of a gitignore template type GitignoreTemplateInfo struct { + // Name is the name of the gitignore template Name string `json:"name"` + // Source contains the content of the gitignore template Source string `json:"source"` } // LicensesListEntry is used for the API type LicensesTemplateListEntry struct { + // Key is the unique identifier for the license template Key string `json:"key"` + // Name is the display name of the license Name string `json:"name"` + // URL is the reference URL for the license URL string `json:"url"` } // LicensesInfo contains information about a License type LicenseTemplateInfo struct { + // Key is the unique identifier for the license template Key string `json:"key"` + // Name is the display name of the license Name string `json:"name"` + // URL is the reference URL for the license URL string `json:"url"` + // Implementation contains license implementation details Implementation string `json:"implementation"` + // Body contains the full text of the license Body string `json:"body"` } // APIError is an api error with a message type APIError struct { + // Message contains the error description Message string `json:"message"` + // URL contains the documentation URL for this error URL string `json:"url"` } diff --git a/modules/structs/nodeinfo.go b/modules/structs/nodeinfo.go index 802c8d3e576f4..4329b86021cf3 100644 --- a/modules/structs/nodeinfo.go +++ b/modules/structs/nodeinfo.go @@ -5,39 +5,58 @@ package structs // NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks type NodeInfo struct { + // Version specifies the schema version Version string `json:"version"` + // Software contains information about the server software Software NodeInfoSoftware `json:"software"` + // Protocols lists the protocols supported by this server Protocols []string `json:"protocols"` + // Services contains third party services this server can connect to Services NodeInfoServices `json:"services"` + // OpenRegistrations indicates if new user registrations are accepted OpenRegistrations bool `json:"openRegistrations"` + // Usage contains server usage statistics Usage NodeInfoUsage `json:"usage"` + // Metadata contains free form key value pairs for software specific values Metadata struct{} `json:"metadata"` } // NodeInfoSoftware contains Metadata about server software in use type NodeInfoSoftware struct { + // Name is the canonical name of this server software Name string `json:"name"` + // Version is the version of this server software Version string `json:"version"` + // Repository is the URL to the source code repository Repository string `json:"repository"` + // Homepage is the URL to the homepage of this server software Homepage string `json:"homepage"` } // NodeInfoServices contains the third party sites this server can connect to via their application API type NodeInfoServices struct { + // Inbound lists services that can deliver content to this server Inbound []string `json:"inbound"` + // Outbound lists services this server can deliver content to Outbound []string `json:"outbound"` } // NodeInfoUsage contains usage statistics for this server type NodeInfoUsage struct { + // Users contains user statistics Users NodeInfoUsageUsers `json:"users"` + // LocalPosts is the total amount of posts made by users local to this server LocalPosts int `json:"localPosts,omitempty"` + // LocalComments is the total amount of comments made by users local to this server LocalComments int `json:"localComments,omitempty"` } // NodeInfoUsageUsers contains statistics about the users of this server type NodeInfoUsageUsers struct { + // Total is the total amount of users on this server Total int `json:"total,omitempty"` + // ActiveHalfyear is the amount of users that signed in at least once in the last 180 days ActiveHalfyear int `json:"activeHalfyear,omitempty"` + // ActiveMonth is the amount of users that signed in at least once in the last 30 days ActiveMonth int `json:"activeMonth,omitempty"` } diff --git a/modules/structs/notifications.go b/modules/structs/notifications.go index 7fbf4cb46d8a7..c5455d0b07ff8 100644 --- a/modules/structs/notifications.go +++ b/modules/structs/notifications.go @@ -9,28 +9,43 @@ import ( // NotificationThread expose Notification on API type NotificationThread struct { + // ID is the unique identifier for the notification thread ID int64 `json:"id"` + // Repository is the repository associated with the notification Repository *Repository `json:"repository"` + // Subject contains details about the notification subject Subject *NotificationSubject `json:"subject"` + // Unread indicates if the notification has been read Unread bool `json:"unread"` + // Pinned indicates if the notification is pinned Pinned bool `json:"pinned"` + // UpdatedAt is the time when the notification was last updated UpdatedAt time.Time `json:"updated_at"` + // URL is the API URL for this notification thread URL string `json:"url"` } // NotificationSubject contains the notification subject (Issue/Pull/Commit) type NotificationSubject struct { + // Title is the title of the notification subject Title string `json:"title"` + // URL is the API URL for the notification subject URL string `json:"url"` + // LatestCommentURL is the API URL for the latest comment LatestCommentURL string `json:"latest_comment_url"` + // HTMLURL is the web URL for the notification subject HTMLURL string `json:"html_url"` + // LatestCommentHTMLURL is the web URL for the latest comment LatestCommentHTMLURL string `json:"latest_comment_html_url"` + // Type indicates the type of the notification subject Type NotifySubjectType `json:"type" binding:"In(Issue,Pull,Commit,Repository)"` + // State indicates the current state of the notification subject State StateType `json:"state"` } // NotificationCount number of unread notifications type NotificationCount struct { + // New is the number of unread notifications New int64 `json:"new"` } diff --git a/modules/structs/org.go b/modules/structs/org.go index 33b45c6344e95..1c0cb14ecbd3c 100644 --- a/modules/structs/org.go +++ b/modules/structs/org.go @@ -5,15 +5,25 @@ package structs // Organization represents an organization type Organization struct { + // The unique identifier of the organization ID int64 `json:"id"` + // The name of the organization Name string `json:"name"` + // The full display name of the organization FullName string `json:"full_name"` + // The email address of the organization Email string `json:"email"` + // The URL of the organization's avatar AvatarURL string `json:"avatar_url"` + // The description of the organization Description string `json:"description"` + // The website URL of the organization Website string `json:"website"` + // The location of the organization Location string `json:"location"` + // The visibility level of the organization (public, limited, private) Visibility string `json:"visibility"` + // Whether repository administrators can change team access RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` // username of the organization // deprecated @@ -22,10 +32,15 @@ type Organization struct { // OrganizationPermissions list different users permissions on an organization type OrganizationPermissions struct { + // Whether the user is an owner of the organization IsOwner bool `json:"is_owner"` + // Whether the user is an admin of the organization IsAdmin bool `json:"is_admin"` + // Whether the user can write to the organization CanWrite bool `json:"can_write"` + // Whether the user can read the organization CanRead bool `json:"can_read"` + // Whether the user can create repositories in the organization CanCreateRepository bool `json:"can_create_repository"` } @@ -34,14 +49,20 @@ type CreateOrgOption struct { // username of the organization // required: true UserName string `json:"username" binding:"Required;Username;MaxSize(40)"` + // The full display name of the organization FullName string `json:"full_name" binding:"MaxSize(100)"` + // The email address of the organization Email string `json:"email" binding:"MaxSize(255)"` + // The description of the organization Description string `json:"description" binding:"MaxSize(255)"` + // The website URL of the organization Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` + // The location of the organization Location string `json:"location" binding:"MaxSize(50)"` // possible values are `public` (default), `limited` or `private` // enum: public,limited,private Visibility string `json:"visibility" binding:"In(,public,limited,private)"` + // Whether repository administrators can change team access RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` } @@ -49,14 +70,20 @@ type CreateOrgOption struct { // EditOrgOption options for editing an organization type EditOrgOption struct { + // The full display name of the organization FullName string `json:"full_name" binding:"MaxSize(100)"` + // The email address of the organization Email string `json:"email" binding:"MaxSize(255)"` + // The description of the organization Description string `json:"description" binding:"MaxSize(255)"` + // The website URL of the organization Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` + // The location of the organization Location string `json:"location" binding:"MaxSize(50)"` // possible values are `public`, `limited` or `private` // enum: public,limited,private Visibility string `json:"visibility" binding:"In(,public,limited,private)"` + // Whether repository administrators can change team access RepoAdminChangeTeamAccess *bool `json:"repo_admin_change_team_access"` } diff --git a/modules/structs/org_member.go b/modules/structs/org_member.go index 2df5099de9626..86c7c0f4fe6d0 100644 --- a/modules/structs/org_member.go +++ b/modules/structs/org_member.go @@ -5,5 +5,6 @@ package structs // AddOrgMembershipOption add user to organization options type AddOrgMembershipOption struct { + // Role is the role to assign to the organization member Role string `json:"role" binding:"Required"` } diff --git a/modules/structs/org_team.go b/modules/structs/org_team.go index f8899b236bf4f..ef690f14f7186 100644 --- a/modules/structs/org_team.go +++ b/modules/structs/org_team.go @@ -6,10 +6,15 @@ package structs // Team represents a team in an organization type Team struct { + // The unique identifier of the team ID int64 `json:"id"` + // The name of the team Name string `json:"name"` + // The description of the team Description string `json:"description"` + // The organization that the team belongs to Organization *Organization `json:"organization"` + // Whether the team has access to all repositories in the organization IncludesAllRepositories bool `json:"includes_all_repositories"` // enum: none,read,write,admin,owner Permission string `json:"permission"` @@ -18,6 +23,7 @@ type Team struct { Units []string `json:"units"` // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"} UnitsMap map[string]string `json:"units_map"` + // Whether the team can create repositories in the organization CanCreateOrgRepo bool `json:"can_create_org_repo"` } @@ -25,7 +31,9 @@ type Team struct { type CreateTeamOption struct { // required: true Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(255)"` + // The description of the team Description string `json:"description" binding:"MaxSize(255)"` + // Whether the team has access to all repositories in the organization IncludesAllRepositories bool `json:"includes_all_repositories"` // enum: read,write,admin Permission string `json:"permission"` @@ -34,6 +42,7 @@ type CreateTeamOption struct { Units []string `json:"units"` // example: {"repo.actions","repo.packages","repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"} UnitsMap map[string]string `json:"units_map"` + // Whether the team can create repositories in the organization CanCreateOrgRepo bool `json:"can_create_org_repo"` } @@ -41,7 +50,9 @@ type CreateTeamOption struct { type EditTeamOption struct { // required: true Name string `json:"name" binding:"AlphaDashDot;MaxSize(255)"` + // The description of the team Description *string `json:"description" binding:"MaxSize(255)"` + // Whether the team has access to all repositories in the organization IncludesAllRepositories *bool `json:"includes_all_repositories"` // enum: read,write,admin Permission string `json:"permission"` @@ -50,5 +61,6 @@ type EditTeamOption struct { Units []string `json:"units"` // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"} UnitsMap map[string]string `json:"units_map"` + // Whether the team can create repositories in the organization CanCreateOrgRepo *bool `json:"can_create_org_repo"` } diff --git a/modules/structs/package.go b/modules/structs/package.go index 1973f925a584e..720ab2372aeb5 100644 --- a/modules/structs/package.go +++ b/modules/structs/package.go @@ -9,25 +9,41 @@ import ( // Package represents a package type Package struct { + // The unique identifier of the package ID int64 `json:"id"` + // The owner of the package Owner *User `json:"owner"` + // The repository that contains this package Repository *Repository `json:"repository"` + // The user who created this package Creator *User `json:"creator"` + // The type of the package (e.g., npm, maven, docker) 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 to view the package HTMLURL string `json:"html_url"` // swagger:strfmt date-time + // The date and time when the package was created CreatedAt time.Time `json:"created_at"` } // PackageFile represents a package file type PackageFile struct { + // The unique identifier of the package file ID int64 `json:"id"` + // The size of the package file in bytes Size int64 `json:"size"` + // The name of the package file Name string `json:"name"` + // The MD5 hash of the package file HashMD5 string `json:"md5"` + // The SHA1 hash of the package file HashSHA1 string `json:"sha1"` + // The SHA256 hash of the package file HashSHA256 string `json:"sha256"` + // The SHA512 hash of the package file HashSHA512 string `json:"sha512"` } diff --git a/modules/structs/pull.go b/modules/structs/pull.go index f53d6adafce3a..7cc58217a0f17 100644 --- a/modules/structs/pull.go +++ b/modules/structs/pull.go @@ -9,45 +9,75 @@ import ( // PullRequest represents a pull request 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"` + // The unique identifier of the pull request + ID int64 `json:"id"` + // The API URL of the pull request + URL string `json:"url"` + // The pull request number + Index int64 `json:"number"` + // The user who created the pull request + Poster *User `json:"user"` + // The title of the pull request + Title string `json:"title"` + // The description body of the pull request + Body string `json:"body"` + // The labels attached to the pull request + Labels []*Label `json:"labels"` + // The milestone associated with the pull request + Milestone *Milestone `json:"milestone"` + // The primary assignee of the pull request + Assignee *User `json:"assignee"` + // The list of users assigned to the pull request + Assignees []*User `json:"assignees"` + // The users requested to review the pull request + RequestedReviewers []*User `json:"requested_reviewers"` + // The teams requested to review the pull request + RequestedReviewersTeams []*Team `json:"requested_reviewers_teams"` + // The current state of the pull request + State StateType `json:"state"` + // Whether the pull request is a draft + Draft bool `json:"draft"` + // Whether the pull request conversation is locked + IsLocked bool `json:"is_locked"` + // The number of comments on the pull request + Comments int `json:"comments"` // number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) ReviewComments int `json:"review_comments,omitempty"` - Additions *int `json:"additions,omitempty"` - Deletions *int `json:"deletions,omitempty"` + // The number of lines added in the pull request + Additions *int `json:"additions,omitempty"` + // The number of lines deleted in the pull request + Deletions *int `json:"deletions,omitempty"` + // The number of files changed in the pull request ChangedFiles *int `json:"changed_files,omitempty"` - HTMLURL string `json:"html_url"` - DiffURL string `json:"diff_url"` + // The HTML URL to view the pull request + HTMLURL string `json:"html_url"` + // The URL to download the diff patch + DiffURL string `json:"diff_url"` + // The URL to download the patch file PatchURL string `json:"patch_url"` + // Whether the pull request can be merged Mergeable bool `json:"mergeable"` + // Whether the pull request has been merged HasMerged bool `json:"merged"` // swagger:strfmt date-time - 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"` + Merged *time.Time `json:"merged_at"` + // The SHA of the merge commit + MergedCommitID *string `json:"merge_commit_sha"` + // The user who merged the pull request + MergedBy *User `json:"merged_by"` + // Whether maintainers can edit the pull request + AllowMaintainerEdit bool `json:"allow_maintainer_edit"` + + // Information about the base branch + Base *PRBranchInfo `json:"base"` + // Information about the head branch + Head *PRBranchInfo `json:"head"` + // The merge base commit SHA + MergeBase string `json:"merge_base"` // swagger:strfmt date-time Deadline *time.Time `json:"due_date"` @@ -59,65 +89,103 @@ type PullRequest struct { // swagger:strfmt date-time Closed *time.Time `json:"closed_at"` + // The pin order for the pull request PinOrder int `json:"pin_order"` } // PRBranchInfo information about a branch type PRBranchInfo struct { - Name string `json:"label"` - Ref string `json:"ref"` - Sha string `json:"sha"` - RepoID int64 `json:"repo_id"` + // The display name of the branch + Name string `json:"label"` + // The git reference of the branch + Ref string `json:"ref"` + // The commit SHA of the branch head + Sha string `json:"sha"` + // The unique identifier of the repository + RepoID int64 `json:"repo_id"` + // The repository information Repository *Repository `json:"repo"` } // ListPullRequestsOptions options for listing pull requests type ListPullRequestsOptions struct { - Page int `json:"page"` + // The page number for pagination + Page int `json:"page"` + // The state filter for pull requests State string `json:"state"` } // CreatePullRequestOption options when creating a pull request type CreatePullRequestOption struct { - Head string `json:"head" binding:"Required"` - Base string `json:"base" binding:"Required"` - Title string `json:"title" binding:"Required"` - Body string `json:"body"` - Assignee string `json:"assignee"` + // The head branch for the pull request, it could be a branch name on the base repository or + // a form like `:` which refers to the user's fork repository's branch. + Head string `json:"head" binding:"Required"` + // The base branch for the pull request + Base string `json:"base" binding:"Required"` + // The title of the pull request + Title string `json:"title" binding:"Required"` + // The description body of the pull request + Body string `json:"body"` + // The primary assignee username + Assignee string `json:"assignee"` + // The list of assignee usernames Assignees []string `json:"assignees"` - Milestone int64 `json:"milestone"` - Labels []int64 `json:"labels"` + // The milestone ID to assign to the pull request + Milestone int64 `json:"milestone"` + // The list of label IDs to assign to the pull request + Labels []int64 `json:"labels"` // swagger:strfmt date-time - Deadline *time.Time `json:"due_date"` - Reviewers []string `json:"reviewers"` - TeamReviewers []string `json:"team_reviewers"` + Deadline *time.Time `json:"due_date"` + // The list of reviewer usernames + Reviewers []string `json:"reviewers"` + // The list of team reviewer names + TeamReviewers []string `json:"team_reviewers"` } // EditPullRequestOption options when modify pull request type EditPullRequestOption struct { - Title string `json:"title"` - Body *string `json:"body"` - Base string `json:"base"` - Assignee string `json:"assignee"` + // The new title for the pull request + Title string `json:"title"` + // The new description body for the pull request + Body *string `json:"body"` + // The new base branch for the pull request + Base string `json:"base"` + // The new primary assignee username + Assignee string `json:"assignee"` + // The new list of assignee usernames Assignees []string `json:"assignees"` - Milestone int64 `json:"milestone"` - Labels []int64 `json:"labels"` - State *string `json:"state"` + // The new milestone ID for the pull request + Milestone int64 `json:"milestone"` + // The new list of label IDs for the pull request + Labels []int64 `json:"labels"` + // The new state for the pull request + State *string `json:"state"` // swagger:strfmt date-time - Deadline *time.Time `json:"due_date"` - RemoveDeadline *bool `json:"unset_due_date"` - AllowMaintainerEdit *bool `json:"allow_maintainer_edit"` + Deadline *time.Time `json:"due_date"` + // Whether to remove the current deadline + RemoveDeadline *bool `json:"unset_due_date"` + // Whether to allow maintainer edits + AllowMaintainerEdit *bool `json:"allow_maintainer_edit"` } // ChangedFile store information about files affected by the pull request type ChangedFile struct { - Filename string `json:"filename"` + // The name of the changed file + Filename string `json:"filename"` + // The previous filename if the file was renamed PreviousFilename string `json:"previous_filename,omitempty"` - Status string `json:"status"` - Additions int `json:"additions"` - Deletions int `json:"deletions"` - Changes int `json:"changes"` - HTMLURL string `json:"html_url,omitempty"` - ContentsURL string `json:"contents_url,omitempty"` - RawURL string `json:"raw_url,omitempty"` + // The status of the file change (added, modified, deleted, etc.) + Status string `json:"status"` + // The number of lines added to the file + Additions int `json:"additions"` + // The number of lines deleted from the file + Deletions int `json:"deletions"` + // The total number of changes to the file + Changes int `json:"changes"` + // The HTML URL to view the file changes + HTMLURL string `json:"html_url,omitempty"` + // The API URL to get the file contents + ContentsURL string `json:"contents_url,omitempty"` + // The raw URL to download the file + RawURL string `json:"raw_url,omitempty"` } diff --git a/modules/structs/pull_review.go b/modules/structs/pull_review.go index 810be8f521d94..cdb49286d6d9c 100644 --- a/modules/structs/pull_review.go +++ b/modules/structs/pull_review.go @@ -42,7 +42,9 @@ type PullReview struct { // swagger:strfmt date-time Updated time.Time `json:"updated_at"` + // HTMLURL is the web URL for viewing the review HTMLURL string `json:"html_url"` + // HTMLPullURL is the web URL for the pull request HTMLPullURL string `json:"pull_request_url"` } diff --git a/modules/structs/release.go b/modules/structs/release.go index fac86ca7a23c4..051fb9d207794 100644 --- a/modules/structs/release.go +++ b/modules/structs/release.go @@ -9,23 +9,37 @@ import ( // Release represents a repository release type Release struct { + // The unique identifier of the release ID int64 `json:"id"` + // The name of the git tag associated with the release TagName string `json:"tag_name"` + // The target commitish for the release Target string `json:"target_commitish"` + // The display title of the release Title string `json:"name"` + // The release notes or description Note string `json:"body"` + // The API URL of the release URL string `json:"url"` + // The HTML URL to view the release HTMLURL string `json:"html_url"` + // The URL to download the tarball archive TarURL string `json:"tarball_url"` + // The URL to download the zip archive ZipURL string `json:"zipball_url"` + // The URL template for uploading release assets UploadURL string `json:"upload_url"` + // Whether the release is a draft IsDraft bool `json:"draft"` + // Whether the release is a prerelease IsPrerelease bool `json:"prerelease"` // swagger:strfmt date-time CreatedAt time.Time `json:"created_at"` // swagger:strfmt date-time PublishedAt time.Time `json:"published_at"` + // The user who published the release Publisher *User `json:"author"` + // The files attached to the release Attachments []*Attachment `json:"assets"` } @@ -33,20 +47,32 @@ type Release struct { type CreateReleaseOption struct { // required: true TagName string `json:"tag_name" binding:"Required"` + // The message for the git tag TagMessage string `json:"tag_message"` + // The target commitish for the release Target string `json:"target_commitish"` + // The display title of the release Title string `json:"name"` + // The release notes or description Note string `json:"body"` + // Whether to create the release as a draft IsDraft bool `json:"draft"` + // Whether to mark the release as a prerelease IsPrerelease bool `json:"prerelease"` } // EditReleaseOption options when editing a release type EditReleaseOption struct { + // The new name of the git tag TagName string `json:"tag_name"` + // The new target commitish for the release Target string `json:"target_commitish"` + // The new display title of the release Title string `json:"name"` + // The new release notes or description Note string `json:"body"` + // Whether to change the draft status IsDraft *bool `json:"draft"` + // Whether to change the prerelease status IsPrerelease *bool `json:"prerelease"` } diff --git a/modules/structs/repo_actions.go b/modules/structs/repo_actions.go index ac1c288270a20..6c2ddcc60e691 100644 --- a/modules/structs/repo_actions.go +++ b/modules/structs/repo_actions.go @@ -9,15 +9,25 @@ import ( // ActionTask represents a ActionTask type ActionTask struct { + // ID is the unique identifier for the action task ID int64 `json:"id"` + // Name is the name of the workflow Name string `json:"name"` + // HeadBranch is the branch that triggered the workflow HeadBranch string `json:"head_branch"` + // HeadSHA is the commit SHA that triggered the workflow HeadSHA string `json:"head_sha"` + // RunNumber is the sequential number of the workflow run RunNumber int64 `json:"run_number"` + // Event is the type of event that triggered the workflow Event string `json:"event"` + // DisplayTitle is the display title for the workflow run DisplayTitle string `json:"display_title"` + // Status indicates the current status of the workflow run Status string `json:"status"` + // WorkflowID is the identifier of the workflow WorkflowID string `json:"workflow_id"` + // URL is the API URL for this workflow run URL string `json:"url"` // swagger:strfmt date-time CreatedAt time.Time `json:"created_at"` @@ -29,7 +39,9 @@ type ActionTask struct { // ActionTaskResponse returns a ActionTask type ActionTaskResponse struct { + // Entries contains the list of workflow runs Entries []*ActionTask `json:"workflow_runs"` + // TotalCount is the total number of workflow runs TotalCount int64 `json:"total_count"` } @@ -45,16 +57,23 @@ type CreateActionWorkflowDispatch struct { // ActionWorkflow represents a ActionWorkflow type ActionWorkflow struct { + // ID is the unique identifier for the workflow ID string `json:"id"` + // Name is the name of the workflow Name string `json:"name"` + // Path is the file path of the workflow Path string `json:"path"` + // State indicates if the workflow is active or disabled State string `json:"state"` // swagger:strfmt date-time CreatedAt time.Time `json:"created_at"` // swagger:strfmt date-time UpdatedAt time.Time `json:"updated_at"` + // URL is the API URL for this workflow URL string `json:"url"` + // HTMLURL is the web URL for viewing the workflow HTMLURL string `json:"html_url"` + // BadgeURL is the URL for the workflow badge BadgeURL string `json:"badge_url"` // swagger:strfmt date-time DeletedAt time.Time `json:"deleted_at"` diff --git a/modules/structs/repo_branch.go b/modules/structs/repo_branch.go index 5416f43b0d1a0..55bb58d09e19a 100644 --- a/modules/structs/repo_branch.go +++ b/modules/structs/repo_branch.go @@ -9,14 +9,23 @@ import ( // Branch represents a repository branch type Branch struct { + // Name is the branch name Name string `json:"name"` + // Commit contains the latest commit information for this branch Commit *PayloadCommit `json:"commit"` + // Protected indicates if the branch is protected Protected bool `json:"protected"` + // RequiredApprovals is the number of required approvals for pull requests RequiredApprovals int64 `json:"required_approvals"` + // EnableStatusCheck indicates if status checks are enabled EnableStatusCheck bool `json:"enable_status_check"` + // StatusCheckContexts contains the list of required status check contexts StatusCheckContexts []string `json:"status_check_contexts"` + // UserCanPush indicates if the current user can push to this branch UserCanPush bool `json:"user_can_push"` + // UserCanMerge indicates if the current user can merge to this branch UserCanMerge bool `json:"user_can_merge"` + // EffectiveBranchProtectionName is the name of the effective branch protection rule EffectiveBranchProtectionName string `json:"effective_branch_protection_name"` } @@ -24,7 +33,9 @@ type Branch struct { type BranchProtection struct { // Deprecated: true BranchName string `json:"branch_name"` + // RuleName is the name of the branch protection rule RuleName string `json:"rule_name"` + // Priority is the priority of this branch protection rule Priority int64 `json:"priority"` EnablePush bool `json:"enable_push"` EnablePushWhitelist bool `json:"enable_push_whitelist"` diff --git a/modules/structs/repo_collaborator.go b/modules/structs/repo_collaborator.go index 7d39b5a798a26..de566b6d33bf3 100644 --- a/modules/structs/repo_collaborator.go +++ b/modules/structs/repo_collaborator.go @@ -6,12 +6,16 @@ package structs // AddCollaboratorOption options when adding a user as a collaborator of a repository type AddCollaboratorOption struct { // enum: read,write,admin + // Permission level to grant the collaborator Permission *string `json:"permission"` } // RepoCollaboratorPermission to get repository permission for a collaborator type RepoCollaboratorPermission struct { + // Permission level of the collaborator Permission string `json:"permission"` + // RoleName is the name of the permission role RoleName string `json:"role_name"` + // User information of the collaborator User *User `json:"user"` } diff --git a/modules/structs/repo_commit.go b/modules/structs/repo_commit.go index fec7d97608d92..1a176e19751d7 100644 --- a/modules/structs/repo_commit.go +++ b/modules/structs/repo_commit.go @@ -10,64 +10,90 @@ import ( // Identity for a person's identity like an author or committer type Identity struct { + // Name is the person's name Name string `json:"name" binding:"MaxSize(100)"` // swagger:strfmt email + // Email is the person's email address Email string `json:"email" binding:"MaxSize(254)"` } // CommitMeta contains meta information of a commit in terms of API. type CommitMeta struct { + // URL is the API URL for the commit URL string `json:"url"` + // SHA is the commit SHA hash SHA string `json:"sha"` // swagger:strfmt date-time + // Created is the time when the commit was created Created time.Time `json:"created"` } // CommitUser contains information of a user in the context of a commit. type CommitUser struct { Identity + // Date is the commit date in string format Date string `json:"date"` } // RepoCommit contains information of a commit in the context of a repository. type RepoCommit struct { + // URL is the API URL for the commit URL string `json:"url"` + // Author contains the commit author information Author *CommitUser `json:"author"` + // Committer contains the commit committer information Committer *CommitUser `json:"committer"` + // Message is the commit message Message string `json:"message"` + // Tree contains the tree information for the commit Tree *CommitMeta `json:"tree"` + // Verification contains commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } // CommitStats is statistics for a RepoCommit type CommitStats struct { + // Total is the total number of lines changed Total int `json:"total"` + // Additions is the number of lines added Additions int `json:"additions"` + // Deletions is the number of lines deleted Deletions int `json:"deletions"` } // Commit contains information generated from a Git commit. type Commit struct { *CommitMeta + // HTMLURL is the web URL for viewing the commit HTMLURL string `json:"html_url"` + // RepoCommit contains the commit information RepoCommit *RepoCommit `json:"commit"` + // Author is the GitHub/Gitea user who authored the commit Author *User `json:"author"` + // Committer is the GitHub/Gitea user who committed the commit Committer *User `json:"committer"` + // Parents contains the parent commit information Parents []*CommitMeta `json:"parents"` + // Files contains information about files affected by the commit Files []*CommitAffectedFiles `json:"files"` + // Stats contains statistics about the commit changes Stats *CommitStats `json:"stats"` } // CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE type CommitDateOptions struct { // swagger:strfmt date-time + // Author is the author date for the commit Author time.Time `json:"author"` // swagger:strfmt date-time + // Committer is the committer date for the commit Committer time.Time `json:"committer"` } // CommitAffectedFiles store information about files affected by the commit type CommitAffectedFiles struct { + // Filename is the path of the affected file Filename string `json:"filename"` + // Status indicates how the file was affected (added, modified, deleted) Status string `json:"status"` } diff --git a/modules/structs/repo_file.go b/modules/structs/repo_file.go index 5a86db868b79d..dab5de948fe20 100644 --- a/modules/structs/repo_file.go +++ b/modules/structs/repo_file.go @@ -104,31 +104,42 @@ type ApplyDiffPatchFileOptions struct { // FileLinksResponse contains the links for a repo's file type FileLinksResponse struct { + // Self is the API URL for this file Self *string `json:"self"` + // GitURL is the Git API URL for this file GitURL *string `json:"git"` + // HTMLURL is the web URL for this file HTMLURL *string `json:"html"` } type ContentsExtResponse struct { + // FileContents contains file information when the path represents a file FileContents *ContentsResponse `json:"file_contents,omitempty"` + // DirContents contains directory listing when the path represents a directory DirContents []*ContentsResponse `json:"dir_contents,omitempty"` } // ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content type ContentsResponse struct { + // Name is the file or directory name Name string `json:"name"` + // Path is the full path to the file or directory Path string `json:"path"` + // SHA is the Git blob or tree SHA SHA string `json:"sha"` + // LastCommitSHA is the SHA of the last commit that affected this file 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 is the message of the last commit that affected this file LastCommitMessage *string `json:"last_commit_message,omitempty"` // `type` will be `file`, `dir`, `symlink`, or `submodule` Type string `json:"type"` + // Size is the file size in bytes Size int64 `json:"size"` // `encoding` is populated when `type` is `file`, otherwise null Encoding *string `json:"encoding"` @@ -136,51 +147,74 @@ type ContentsResponse struct { Content *string `json:"content"` // `target` is populated when `type` is `symlink`, otherwise null Target *string `json:"target"` + // URL is the API URL for this file or directory URL *string `json:"url"` + // HTMLURL is the web URL for this file or directory HTMLURL *string `json:"html_url"` + // GitURL is the Git API URL for this blob or tree GitURL *string `json:"git_url"` + // DownloadURL is the direct download URL for this file DownloadURL *string `json:"download_url"` // `submodule_git_url` is populated when `type` is `submodule`, otherwise null SubmoduleGitURL *string `json:"submodule_git_url"` + // Links contains related URLs for this file or directory Links *FileLinksResponse `json:"_links"` + // LfsOid is the Git LFS object ID if this file is stored in LFS LfsOid *string `json:"lfs_oid,omitempty"` + // LfsSize is the file size if this file is stored in LFS LfsSize *int64 `json:"lfs_size,omitempty"` } // FileCommitResponse contains information generated from a Git commit for a repo's file. type FileCommitResponse struct { CommitMeta + // HTMLURL is the web URL for viewing this commit HTMLURL string `json:"html_url"` + // Author is the commit author information Author *CommitUser `json:"author"` + // Committer is the commit committer information Committer *CommitUser `json:"committer"` + // Parents contains parent commit metadata Parents []*CommitMeta `json:"parents"` + // Message is the commit message Message string `json:"message"` + // Tree contains the tree metadata for this commit Tree *CommitMeta `json:"tree"` } // FileResponse contains information about a repo's file type FileResponse struct { + // Content contains the file content and metadata Content *ContentsResponse `json:"content"` + // Commit contains the commit information for this file operation Commit *FileCommitResponse `json:"commit"` + // Verification contains the commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } // FilesResponse contains information about multiple files from a repo type FilesResponse struct { + // Files contains the list of file contents and metadata Files []*ContentsResponse `json:"files"` + // Commit contains the commit information for this file operation Commit *FileCommitResponse `json:"commit"` + // Verification contains the commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } // FileDeleteResponse contains information about a repo's file that was deleted type FileDeleteResponse struct { + // Content is always null for delete operations Content any `json:"content"` // to be set to nil + // Commit contains the commit information for this delete operation Commit *FileCommitResponse `json:"commit"` + // Verification contains the commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } // GetFilesOptions options for retrieving metadate and content of multiple files type GetFilesOptions struct { + // Files is the list of file paths to retrieve Files []string `json:"files" binding:"Required"` } diff --git a/modules/structs/repo_key.go b/modules/structs/repo_key.go index 27b9d05a75c70..4acabf6dc4a2b 100644 --- a/modules/structs/repo_key.go +++ b/modules/structs/repo_key.go @@ -9,15 +9,24 @@ import ( // DeployKey a deploy key type DeployKey struct { + // ID is the unique identifier for the deploy key ID int64 `json:"id"` + // KeyID is the associated public key ID KeyID int64 `json:"key_id"` + // Key contains the actual SSH key content Key string `json:"key"` + // URL is the API URL for this deploy key URL string `json:"url"` + // Title is the human-readable name for the key Title string `json:"title"` + // Fingerprint is the key's fingerprint Fingerprint string `json:"fingerprint"` // swagger:strfmt date-time + // Created is the time when the deploy key was added Created time.Time `json:"created_at"` + // ReadOnly indicates if the key has read-only access ReadOnly bool `json:"read_only"` + // Repository is the repository this deploy key belongs to Repository *Repository `json:"repository,omitempty"` } diff --git a/modules/structs/repo_note.go b/modules/structs/repo_note.go index 4eaf5a255d118..1e24b1ca8e80e 100644 --- a/modules/structs/repo_note.go +++ b/modules/structs/repo_note.go @@ -5,6 +5,8 @@ package structs // Note contains information related to a git note type Note struct { + // The content message of the git note Message string `json:"message"` + // The commit that this note is attached to Commit *Commit `json:"commit"` } diff --git a/modules/structs/repo_refs.go b/modules/structs/repo_refs.go index 6ffbc74a519be..f4cdb0dcc7646 100644 --- a/modules/structs/repo_refs.go +++ b/modules/structs/repo_refs.go @@ -5,14 +5,20 @@ package structs // Reference represents a Git reference. type Reference struct { + // The name of the Git reference (e.g., refs/heads/main) Ref string `json:"ref"` + // The URL to access this Git reference URL string `json:"url"` + // The Git object that this reference points to Object *GitObject `json:"object"` } // GitObject represents a Git object. type GitObject struct { + // The type of the Git object (e.g., commit, tag, tree, blob) Type string `json:"type"` + // The SHA hash of the Git object SHA string `json:"sha"` + // The URL to access this Git object URL string `json:"url"` } diff --git a/modules/structs/repo_tag.go b/modules/structs/repo_tag.go index bb8bfd10cb9ac..7273ff36baa24 100644 --- a/modules/structs/repo_tag.go +++ b/modules/structs/repo_tag.go @@ -7,62 +7,93 @@ import "time" // Tag represents a repository tag type Tag struct { + // The name of the tag Name string `json:"name"` + // The message associated with the tag Message string `json:"message"` + // The ID (SHA) of the tag ID string `json:"id"` + // The commit information associated with this tag Commit *CommitMeta `json:"commit"` + // The URL to download the zipball archive ZipballURL string `json:"zipball_url,omitempty"` + // The URL to download the tarball archive TarballURL string `json:"tarball_url,omitempty"` } // AnnotatedTag represents an annotated tag type AnnotatedTag struct { + // The name of the annotated tag Tag string `json:"tag"` + // The SHA hash of the annotated tag SHA string `json:"sha"` + // The URL to access the annotated tag URL string `json:"url"` + // The message associated with the annotated tag Message string `json:"message"` + // The user who created the annotated tag Tagger *CommitUser `json:"tagger"` + // The object that the annotated tag points to Object *AnnotatedTagObject `json:"object"` + // The verification information for the annotated tag Verification *PayloadCommitVerification `json:"verification"` } // AnnotatedTagObject contains meta information of the tag object type AnnotatedTagObject struct { + // The type of the tagged object (e.g., commit, tree) Type string `json:"type"` + // The URL to access the tagged object URL string `json:"url"` + // The SHA hash of the tagged object SHA string `json:"sha"` } // CreateTagOption options when creating a tag type CreateTagOption struct { // required: true + // The name of the tag to create TagName string `json:"tag_name" binding:"Required"` + // The message to associate with the tag Message string `json:"message"` + // The target commit SHA or branch name for the tag Target string `json:"target"` } // TagProtection represents a tag protection type TagProtection struct { + // The unique identifier of the tag protection ID int64 `json:"id"` + // The pattern to match tag names for protection NamePattern string `json:"name_pattern"` + // List of usernames allowed to create/delete protected tags WhitelistUsernames []string `json:"whitelist_usernames"` + // List of team names allowed to create/delete protected tags WhitelistTeams []string `json:"whitelist_teams"` // swagger:strfmt date-time + // The date and time when the tag protection was created Created time.Time `json:"created_at"` // swagger:strfmt date-time + // The date and time when the tag protection was last updated Updated time.Time `json:"updated_at"` } // CreateTagProtectionOption options for creating a tag protection type CreateTagProtectionOption struct { + // The pattern to match tag names for protection NamePattern string `json:"name_pattern"` + // List of usernames allowed to create/delete protected tags WhitelistUsernames []string `json:"whitelist_usernames"` + // List of team names allowed to create/delete protected tags WhitelistTeams []string `json:"whitelist_teams"` } // EditTagProtectionOption options for editing a tag protection type EditTagProtectionOption struct { + // The pattern to match tag names for protection NamePattern *string `json:"name_pattern"` + // List of usernames allowed to create/delete protected tags WhitelistUsernames []string `json:"whitelist_usernames"` + // List of team names allowed to create/delete protected tags WhitelistTeams []string `json:"whitelist_teams"` } diff --git a/modules/structs/repo_topic.go b/modules/structs/repo_topic.go index fea193e86b5dc..ae2c0ef25220d 100644 --- a/modules/structs/repo_topic.go +++ b/modules/structs/repo_topic.go @@ -9,15 +9,21 @@ import ( // TopicResponse for returning topics type TopicResponse struct { + // The unique identifier of the topic ID int64 `json:"id"` + // The name of the topic Name string `json:"topic_name"` + // The number of repositories using this topic RepoCount int `json:"repo_count"` + // The date and time when the topic was created Created time.Time `json:"created"` + // The date and time when the topic was last updated Updated time.Time `json:"updated"` } // TopicName a list of repo topic names type TopicName struct { + // List of topic names TopicNames []string `json:"topics"` } diff --git a/modules/structs/repo_tree.go b/modules/structs/repo_tree.go index 86b221e1feb0c..480af18b4ec28 100644 --- a/modules/structs/repo_tree.go +++ b/modules/structs/repo_tree.go @@ -5,20 +5,32 @@ package structs // GitEntry represents a git tree type GitEntry struct { + // Path is the file or directory path Path string `json:"path"` + // Mode is the file mode (permissions) Mode string `json:"mode"` + // Type indicates if this is a file, directory, or symlink Type string `json:"type"` + // Size is the file size in bytes Size int64 `json:"size"` + // SHA is the Git object SHA SHA string `json:"sha"` + // URL is the API URL for this tree entry URL string `json:"url"` } // GitTreeResponse returns a git tree type GitTreeResponse struct { + // SHA is the tree object SHA SHA string `json:"sha"` + // URL is the API URL for this tree URL string `json:"url"` + // Entries contains the tree entries (files and directories) Entries []GitEntry `json:"tree"` + // Truncated indicates if the response was truncated due to size Truncated bool `json:"truncated"` + // Page is the current page number for pagination Page int `json:"page"` + // TotalCount is the total number of entries in the tree TotalCount int `json:"total_count"` } diff --git a/modules/structs/repo_watch.go b/modules/structs/repo_watch.go index 0d0b7c4ae0483..70ad9688379c7 100644 --- a/modules/structs/repo_watch.go +++ b/modules/structs/repo_watch.go @@ -9,10 +9,16 @@ import ( // WatchInfo represents an API watch status of one repository type WatchInfo struct { + // Whether the repository is being watched for notifications Subscribed bool `json:"subscribed"` + // Whether notifications for the repository are ignored Ignored bool `json:"ignored"` + // The reason for the current watch status Reason any `json:"reason"` + // The timestamp when the watch status was created CreatedAt time.Time `json:"created_at"` + // The URL for managing the watch status URL string `json:"url"` + // The URL of the repository being watched RepositoryURL string `json:"repository_url"` } diff --git a/modules/structs/repo_wiki.go b/modules/structs/repo_wiki.go index 3df5a0be99144..dfb38ac066121 100644 --- a/modules/structs/repo_wiki.go +++ b/modules/structs/repo_wiki.go @@ -5,9 +5,13 @@ package structs // WikiCommit page commit/revision type WikiCommit struct { + // The commit SHA hash ID string `json:"sha"` + // The author of the commit Author *CommitUser `json:"author"` + // The committer of the commit Committer *CommitUser `json:"commiter"` + // The commit message Message string `json:"message"` } @@ -16,16 +20,23 @@ type WikiPage struct { *WikiPageMetaData // Page content, base64 encoded ContentBase64 string `json:"content_base64"` + // The number of commits that modified this page CommitCount int64 `json:"commit_count"` + // The sidebar content for the wiki page Sidebar string `json:"sidebar"` + // The footer content for the wiki page Footer string `json:"footer"` } // WikiPageMetaData wiki page meta information type WikiPageMetaData struct { + // The title of the wiki page Title string `json:"title"` + // The HTML URL to view the wiki page HTMLURL string `json:"html_url"` + // The sub URL path for the wiki page SubURL string `json:"sub_url"` + // The last commit that modified this wiki page LastCommit *WikiCommit `json:"last_commit"` } @@ -41,6 +52,8 @@ type CreateWikiPageOptions struct { // WikiCommitList commit/revision list type WikiCommitList struct { + // The list of wiki commits WikiCommits []*WikiCommit `json:"commits"` + // The total count of commits Count int64 `json:"count"` } diff --git a/modules/structs/settings.go b/modules/structs/settings.go index 59176210e6e1f..c4397bec2ebb0 100644 --- a/modules/structs/settings.go +++ b/modules/structs/settings.go @@ -5,34 +5,52 @@ package structs // GeneralRepoSettings contains global repository settings exposed by API type GeneralRepoSettings struct { + // MirrorsDisabled indicates if repository mirroring is disabled MirrorsDisabled bool `json:"mirrors_disabled"` + // HTTPGitDisabled indicates if HTTP Git operations are disabled HTTPGitDisabled bool `json:"http_git_disabled"` + // MigrationsDisabled indicates if repository migrations are disabled MigrationsDisabled bool `json:"migrations_disabled"` + // StarsDisabled indicates if repository starring is disabled StarsDisabled bool `json:"stars_disabled"` + // TimeTrackingDisabled indicates if time tracking is disabled TimeTrackingDisabled bool `json:"time_tracking_disabled"` + // LFSDisabled indicates if Git LFS support is disabled LFSDisabled bool `json:"lfs_disabled"` } // GeneralUISettings contains global ui settings exposed by API type GeneralUISettings struct { + // DefaultTheme is the default UI theme DefaultTheme string `json:"default_theme"` + // AllowedReactions contains the list of allowed emoji reactions AllowedReactions []string `json:"allowed_reactions"` + // CustomEmojis contains the list of custom emojis CustomEmojis []string `json:"custom_emojis"` } // GeneralAPISettings contains global api settings exposed by it type GeneralAPISettings struct { + // MaxResponseItems is the maximum number of items returned in API responses MaxResponseItems int `json:"max_response_items"` + // DefaultPagingNum is the default number of items per page DefaultPagingNum int `json:"default_paging_num"` + // DefaultGitTreesPerPage is the default number of Git tree items per page DefaultGitTreesPerPage int `json:"default_git_trees_per_page"` + // DefaultMaxBlobSize is the default maximum blob size for API responses DefaultMaxBlobSize int64 `json:"default_max_blob_size"` + // DefaultMaxResponseSize is the default maximum response size DefaultMaxResponseSize int64 `json:"default_max_response_size"` } // GeneralAttachmentSettings contains global Attachment settings exposed by API type GeneralAttachmentSettings struct { + // Enabled indicates if file attachments are enabled Enabled bool `json:"enabled"` + // AllowedTypes contains the allowed file types for attachments AllowedTypes string `json:"allowed_types"` + // MaxSize is the maximum size for individual attachments MaxSize int64 `json:"max_size"` + // MaxFiles is the maximum number of files per attachment MaxFiles int `json:"max_files"` } diff --git a/modules/structs/status.go b/modules/structs/status.go index a9779541ff20a..f161efd95a5e6 100644 --- a/modules/structs/status.go +++ b/modules/structs/status.go @@ -11,12 +11,19 @@ import ( // CommitStatus holds a single status of a single Commit type CommitStatus struct { + // ID is the unique identifier for the commit status ID int64 `json:"id"` + // State represents the status state (pending, success, error, failure) State commitstatus.CommitStatusState `json:"status"` + // TargetURL is the URL to link to for more details TargetURL string `json:"target_url"` + // Description provides a brief description of the status Description string `json:"description"` + // URL is the API URL for this status URL string `json:"url"` + // Context is the unique context identifier for the status Context string `json:"context"` + // Creator is the user who created the status Creator *User `json:"creator"` // swagger:strfmt date-time Created time.Time `json:"created_at"` @@ -26,19 +33,30 @@ type CommitStatus struct { // CombinedStatus holds the combined state of several statuses for a single commit type CombinedStatus struct { + // State is the overall combined status state State commitstatus.CommitStatusState `json:"state"` + // SHA is the commit SHA this status applies to SHA string `json:"sha"` + // TotalCount is the total number of statuses TotalCount int `json:"total_count"` + // Statuses contains all individual commit statuses Statuses []*CommitStatus `json:"statuses"` + // Repository is the repository this status belongs to Repository *Repository `json:"repository"` + // CommitURL is the API URL for the commit CommitURL string `json:"commit_url"` + // URL is the API URL for this combined status URL string `json:"url"` } // CreateStatusOption holds the information needed to create a new CommitStatus for a Commit type CreateStatusOption struct { + // State represents the status state to set (pending, success, error, failure) State commitstatus.CommitStatusState `json:"state"` + // TargetURL is the URL to link to for more details TargetURL string `json:"target_url"` + // Description provides a brief description of the status Description string `json:"description"` + // Context is the unique context identifier for the status Context string `json:"context"` } diff --git a/modules/structs/user_app.go b/modules/structs/user_app.go index 15811ceb66aae..eab24f41c8762 100644 --- a/modules/structs/user_app.go +++ b/modules/structs/user_app.go @@ -11,12 +11,19 @@ import ( // AccessToken represents an API access token. // swagger:response AccessToken type AccessToken struct { + // The unique identifier of the access token ID int64 `json:"id"` + // The name of the access token Name string `json:"name"` + // The SHA1 hash of the access token Token string `json:"sha1"` + // The last eight characters of the token TokenLastEight string `json:"token_last_eight"` + // The scopes granted to this access token Scopes []string `json:"scopes"` + // The timestamp when the token was created Created time.Time `json:"created_at"` + // The timestamp when the token was last used Updated time.Time `json:"last_used_at"` } @@ -35,22 +42,34 @@ type CreateAccessTokenOption struct { // CreateOAuth2ApplicationOptions holds options to create an oauth2 application type CreateOAuth2ApplicationOptions struct { + // The name of the OAuth2 application Name string `json:"name" binding:"Required"` + // Whether the client is confidential ConfidentialClient bool `json:"confidential_client"` + // Whether to skip secondary authorization SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` + // The list of allowed redirect URIs RedirectURIs []string `json:"redirect_uris" binding:"Required"` } // OAuth2Application represents an OAuth2 application. // swagger:response OAuth2Application type OAuth2Application struct { + // The unique identifier of the OAuth2 application ID int64 `json:"id"` + // The name of the OAuth2 application Name string `json:"name"` + // The client ID of the OAuth2 application ClientID string `json:"client_id"` + // The client secret of the OAuth2 application ClientSecret string `json:"client_secret"` + // Whether the client is confidential ConfidentialClient bool `json:"confidential_client"` + // Whether to skip secondary authorization SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` + // The list of allowed redirect URIs RedirectURIs []string `json:"redirect_uris"` + // The timestamp when the application was created Created time.Time `json:"created"` } diff --git a/modules/structs/user_email.go b/modules/structs/user_email.go index 01895a0058451..6c5f817f74d0f 100644 --- a/modules/structs/user_email.go +++ b/modules/structs/user_email.go @@ -7,9 +7,13 @@ package structs // Email an email address belonging to a user type Email struct { // swagger:strfmt email + // The email address Email string `json:"email"` + // Whether the email address has been verified Verified bool `json:"verified"` + // Whether this is the primary email address Primary bool `json:"primary"` + // The unique identifier of the user who owns this email UserID int64 `json:"user_id"` // username of the user UserName string `json:"username"` diff --git a/modules/structs/user_gpgkey.go b/modules/structs/user_gpgkey.go index deae70de33729..c6c6b498add06 100644 --- a/modules/structs/user_gpgkey.go +++ b/modules/structs/user_gpgkey.go @@ -9,27 +9,42 @@ import ( // GPGKey a user GPG key to sign commit and tag in repository type GPGKey struct { + // The unique identifier of the GPG key ID int64 `json:"id"` + // The primary key ID of the GPG key PrimaryKeyID string `json:"primary_key_id"` + // The key ID of the GPG key KeyID string `json:"key_id"` + // The public key content in armored format PublicKey string `json:"public_key"` + // List of email addresses associated with this GPG key Emails []*GPGKeyEmail `json:"emails"` + // List of subkeys of this GPG key SubsKey []*GPGKey `json:"subkeys"` + // Whether the key can be used for signing CanSign bool `json:"can_sign"` + // Whether the key can be used for encrypting communications CanEncryptComms bool `json:"can_encrypt_comms"` + // Whether the key can be used for encrypting storage CanEncryptStorage bool `json:"can_encrypt_storage"` + // Whether the key can be used for certification CanCertify bool `json:"can_certify"` + // Whether the GPG key has been verified Verified bool `json:"verified"` // swagger:strfmt date-time + // The date and time when the GPG key was created Created time.Time `json:"created_at"` // swagger:strfmt date-time + // The date and time when the GPG key expires Expires time.Time `json:"expires_at"` } // GPGKeyEmail an email attached to a GPGKey // swagger:model GPGKeyEmail type GPGKeyEmail struct { + // The email address associated with the GPG key Email string `json:"email"` + // Whether the email address has been verified Verified bool `json:"verified"` } @@ -40,6 +55,7 @@ type CreateGPGKeyOption struct { // required: true // unique: true ArmoredKey string `json:"armored_public_key" binding:"Required"` + // An optional armored signature for the GPG key Signature string `json:"armored_signature,omitempty"` } @@ -48,6 +64,8 @@ type VerifyGPGKeyOption struct { // An Signature for a GPG key token // // required: true + // The key ID of the GPG key to verify KeyID string `json:"key_id" binding:"Required"` + // The armored signature to verify the GPG key Signature string `json:"armored_signature" binding:"Required"` } diff --git a/modules/structs/user_key.go b/modules/structs/user_key.go index 16225a852a57c..b04be5191ecfc 100644 --- a/modules/structs/user_key.go +++ b/modules/structs/user_key.go @@ -9,15 +9,25 @@ import ( // PublicKey publickey is a user key to push code to repository type PublicKey struct { + // ID is the unique identifier for the public key ID int64 `json:"id"` + // Key contains the actual SSH public key content Key string `json:"key"` + // URL is the API URL for this key URL string `json:"url,omitempty"` + // Title is the human-readable name for the key Title string `json:"title,omitempty"` + // Fingerprint is the key's fingerprint Fingerprint string `json:"fingerprint,omitempty"` // swagger:strfmt date-time + // Created is the time when the key was added Created time.Time `json:"created_at"` + // Updated is the time when the key was last used Updated time.Time `json:"last_used_at"` + // Owner is the user who owns this key Owner *User `json:"user,omitempty"` + // ReadOnly indicates if the key has read-only access ReadOnly bool `json:"read_only,omitempty"` + // KeyType indicates the type of the SSH key KeyType string `json:"key_type,omitempty"` } diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 51ba751f2804b..a3065228c6e47 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -20775,10 +20775,12 @@ "type": "object", "properties": { "message": { + "description": "Message contains the error description", "type": "string", "x-go-name": "Message" }, "url": { + "description": "URL contains the documentation URL for this error", "type": "string", "x-go-name": "URL" } @@ -20790,25 +20792,30 @@ "title": "AccessToken represents an API access token.", "properties": { "created_at": { + "description": "The timestamp when the token was created", "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { + "description": "The unique identifier of the access token", "type": "integer", "format": "int64", "x-go-name": "ID" }, "last_used_at": { + "description": "The timestamp when the token was last used", "type": "string", "format": "date-time", "x-go-name": "Updated" }, "name": { + "description": "The name of the access token", "type": "string", "x-go-name": "Name" }, "scopes": { + "description": "The scopes granted to this access token", "type": "array", "items": { "type": "string" @@ -20816,10 +20823,12 @@ "x-go-name": "Scopes" }, "sha1": { + "description": "The SHA1 hash of the access token", "type": "string", "x-go-name": "Token" }, "token_last_eight": { + "description": "The last eight characters of the token", "type": "string", "x-go-name": "TokenLastEight" } @@ -20980,31 +20989,38 @@ "x-go-name": "CreatedAt" }, "display_title": { + "description": "DisplayTitle is the display title for the workflow run", "type": "string", "x-go-name": "DisplayTitle" }, "event": { + "description": "Event is the type of event that triggered the workflow", "type": "string", "x-go-name": "Event" }, "head_branch": { + "description": "HeadBranch is the branch that triggered the workflow", "type": "string", "x-go-name": "HeadBranch" }, "head_sha": { + "description": "HeadSHA is the commit SHA that triggered the workflow", "type": "string", "x-go-name": "HeadSHA" }, "id": { + "description": "ID is the unique identifier for the action task", "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { + "description": "Name is the name of the workflow", "type": "string", "x-go-name": "Name" }, "run_number": { + "description": "RunNumber is the sequential number of the workflow run", "type": "integer", "format": "int64", "x-go-name": "RunNumber" @@ -21015,6 +21031,7 @@ "x-go-name": "RunStartedAt" }, "status": { + "description": "Status indicates the current status of the workflow run", "type": "string", "x-go-name": "Status" }, @@ -21024,10 +21041,12 @@ "x-go-name": "UpdatedAt" }, "url": { + "description": "URL is the API URL for this workflow run", "type": "string", "x-go-name": "URL" }, "workflow_id": { + "description": "WorkflowID is the identifier of the workflow", "type": "string", "x-go-name": "WorkflowID" } @@ -21039,11 +21058,13 @@ "type": "object", "properties": { "total_count": { + "description": "TotalCount is the total number of workflow runs", "type": "integer", "format": "int64", "x-go-name": "TotalCount" }, "workflow_runs": { + "description": "Entries contains the list of workflow runs", "type": "array", "items": { "$ref": "#/definitions/ActionTask" @@ -21092,6 +21113,7 @@ "type": "object", "properties": { "badge_url": { + "description": "BadgeURL is the URL for the workflow badge", "type": "string", "x-go-name": "BadgeURL" }, @@ -21106,22 +21128,27 @@ "x-go-name": "DeletedAt" }, "html_url": { + "description": "HTMLURL is the web URL for viewing the workflow", "type": "string", "x-go-name": "HTMLURL" }, "id": { + "description": "ID is the unique identifier for the workflow", "type": "string", "x-go-name": "ID" }, "name": { + "description": "Name is the name of the workflow", "type": "string", "x-go-name": "Name" }, "path": { + "description": "Path is the file path of the workflow", "type": "string", "x-go-name": "Path" }, "state": { + "description": "State indicates if the workflow is active or disabled", "type": "string", "x-go-name": "State" }, @@ -21131,6 +21158,7 @@ "x-go-name": "UpdatedAt" }, "url": { + "description": "URL is the API URL for this workflow", "type": "string", "x-go-name": "URL" } @@ -21412,6 +21440,7 @@ "$ref": "#/definitions/User" }, "act_user_id": { + "description": "The ID of the user who performed the action", "type": "integer", "format": "int64", "x-go-name": "ActUserID" @@ -21420,25 +21449,30 @@ "$ref": "#/definitions/Comment" }, "comment_id": { + "description": "The ID of the comment associated with the activity (if applicable)", "type": "integer", "format": "int64", "x-go-name": "CommentID" }, "content": { + "description": "Additional content or details about the activity", "type": "string", "x-go-name": "Content" }, "created": { + "description": "The date and time when the activity occurred", "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { + "description": "The unique identifier of the activity", "type": "integer", "format": "int64", "x-go-name": "ID" }, "is_private": { + "description": "Whether this activity is from a private repository", "type": "boolean", "x-go-name": "IsPrivate" }, @@ -21477,6 +21511,7 @@ "x-go-name": "OpType" }, "ref_name": { + "description": "The name of the git reference (branch/tag) associated with the activity", "type": "string", "x-go-name": "RefName" }, @@ -21484,11 +21519,13 @@ "$ref": "#/definitions/Repository" }, "repo_id": { + "description": "The ID of the repository associated with the activity", "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "user_id": { + "description": "The ID of the user who receives/sees this activity", "type": "integer", "format": "int64", "x-go-name": "UserID" @@ -21501,6 +21538,7 @@ "type": "object", "properties": { "@context": { + "description": "Context defines the JSON-LD context for ActivityPub", "type": "string", "x-go-name": "Context" } @@ -21554,6 +21592,7 @@ "type": "object", "properties": { "message": { + "description": "The message associated with the annotated tag", "type": "string", "x-go-name": "Message" }, @@ -21561,10 +21600,12 @@ "$ref": "#/definitions/AnnotatedTagObject" }, "sha": { + "description": "The SHA hash of the annotated tag", "type": "string", "x-go-name": "SHA" }, "tag": { + "description": "The name of the annotated tag", "type": "string", "x-go-name": "Tag" }, @@ -21572,6 +21613,7 @@ "$ref": "#/definitions/CommitUser" }, "url": { + "description": "The URL to access the annotated tag", "type": "string", "x-go-name": "URL" }, @@ -21586,14 +21628,17 @@ "type": "object", "properties": { "sha": { + "description": "The SHA hash of the tagged object", "type": "string", "x-go-name": "SHA" }, "type": { + "description": "The type of the tagged object (e.g., commit, tree)", "type": "string", "x-go-name": "Type" }, "url": { + "description": "The URL to access the tagged object", "type": "string", "x-go-name": "URL" } @@ -21605,6 +21650,7 @@ "type": "object", "properties": { "browser_download_url": { + "description": "DownloadURL is the URL to download the attachment", "type": "string", "x-go-name": "DownloadURL" }, @@ -21614,25 +21660,30 @@ "x-go-name": "Created" }, "download_count": { + "description": "DownloadCount is the number of times the attachment has been downloaded", "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { + "description": "ID is the unique identifier for the attachment", "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { + "description": "Name is the filename of the attachment", "type": "string", "x-go-name": "Name" }, "size": { + "description": "Size is the file size in bytes", "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { + "description": "UUID is the unique identifier for the attachment file", "type": "string", "x-go-name": "UUID" } @@ -21671,27 +21722,33 @@ "$ref": "#/definitions/PayloadCommit" }, "effective_branch_protection_name": { + "description": "EffectiveBranchProtectionName is the name of the effective branch protection rule", "type": "string", "x-go-name": "EffectiveBranchProtectionName" }, "enable_status_check": { + "description": "EnableStatusCheck indicates if status checks are enabled", "type": "boolean", "x-go-name": "EnableStatusCheck" }, "name": { + "description": "Name is the branch name", "type": "string", "x-go-name": "Name" }, "protected": { + "description": "Protected indicates if the branch is protected", "type": "boolean", "x-go-name": "Protected" }, "required_approvals": { + "description": "RequiredApprovals is the number of required approvals for pull requests", "type": "integer", "format": "int64", "x-go-name": "RequiredApprovals" }, "status_check_contexts": { + "description": "StatusCheckContexts contains the list of required status check contexts", "type": "array", "items": { "type": "string" @@ -21699,10 +21756,12 @@ "x-go-name": "StatusCheckContexts" }, "user_can_merge": { + "description": "UserCanMerge indicates if the current user can merge to this branch", "type": "boolean", "x-go-name": "UserCanMerge" }, "user_can_push": { + "description": "UserCanPush indicates if the current user can push to this branch", "type": "boolean", "x-go-name": "UserCanPush" } @@ -21822,6 +21881,7 @@ "x-go-name": "MergeWhitelistUsernames" }, "priority": { + "description": "Priority is the priority of this branch protection rule", "type": "integer", "format": "int64", "x-go-name": "Priority" @@ -21858,6 +21918,7 @@ "x-go-name": "RequiredApprovals" }, "rule_name": { + "description": "RuleName is the name of the branch protection rule", "type": "string", "x-go-name": "RuleName" }, @@ -21975,41 +22036,50 @@ "type": "object", "properties": { "additions": { + "description": "The number of lines added to the file", "type": "integer", "format": "int64", "x-go-name": "Additions" }, "changes": { + "description": "The total number of changes to the file", "type": "integer", "format": "int64", "x-go-name": "Changes" }, "contents_url": { + "description": "The API URL to get the file contents", "type": "string", "x-go-name": "ContentsURL" }, "deletions": { + "description": "The number of lines deleted from the file", "type": "integer", "format": "int64", "x-go-name": "Deletions" }, "filename": { + "description": "The name of the changed file", "type": "string", "x-go-name": "Filename" }, "html_url": { + "description": "The HTML URL to view the file changes", "type": "string", "x-go-name": "HTMLURL" }, "previous_filename": { + "description": "The previous filename if the file was renamed", "type": "string", "x-go-name": "PreviousFilename" }, "raw_url": { + "description": "The raw URL to download the file", "type": "string", "x-go-name": "RawURL" }, "status": { + "description": "The status of the file change (added, modified, deleted, etc.)", "type": "string", "x-go-name": "Status" } @@ -22021,6 +22091,7 @@ "type": "object", "properties": { "commit_url": { + "description": "CommitURL is the API URL for the commit", "type": "string", "x-go-name": "CommitURL" }, @@ -22028,10 +22099,12 @@ "$ref": "#/definitions/Repository" }, "sha": { + "description": "SHA is the commit SHA this status applies to", "type": "string", "x-go-name": "SHA" }, "state": { + "description": "State is the overall combined status state\npending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending\nsuccess CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success\nerror CommitStatusError CommitStatusError is for when the CommitStatus is Error\nfailure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure\nwarning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning\nskipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped", "type": "string", "enum": [ "pending", @@ -22045,6 +22118,7 @@ "x-go-name": "State" }, "statuses": { + "description": "Statuses contains all individual commit statuses", "type": "array", "items": { "$ref": "#/definitions/CommitStatus" @@ -22052,11 +22126,13 @@ "x-go-name": "Statuses" }, "total_count": { + "description": "TotalCount is the total number of statuses", "type": "integer", "format": "int64", "x-go-name": "TotalCount" }, "url": { + "description": "URL is the API URL for this combined status", "type": "string", "x-go-name": "URL" } @@ -22068,6 +22144,7 @@ "type": "object", "properties": { "assets": { + "description": "Attachments contains files attached to the comment", "type": "array", "items": { "$ref": "#/definitions/Attachment" @@ -22075,6 +22152,7 @@ "x-go-name": "Attachments" }, "body": { + "description": "Body contains the comment text content", "type": "string", "x-go-name": "Body" }, @@ -22084,28 +22162,34 @@ "x-go-name": "Created" }, "html_url": { + "description": "HTMLURL is the web URL for viewing the comment", "type": "string", "x-go-name": "HTMLURL" }, "id": { + "description": "ID is the unique identifier for the comment", "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { + "description": "IssueURL is the API URL for the issue", "type": "string", "x-go-name": "IssueURL" }, "original_author": { + "description": "OriginalAuthor is the original author name (for imported comments)", "type": "string", "x-go-name": "OriginalAuthor" }, "original_author_id": { + "description": "OriginalAuthorID is the original author ID (for imported comments)", "type": "integer", "format": "int64", "x-go-name": "OriginalAuthorID" }, "pull_request_url": { + "description": "PRURL is the API URL for the pull request (if applicable)", "type": "string", "x-go-name": "PRURL" }, @@ -22139,6 +22223,7 @@ "x-go-name": "Created" }, "files": { + "description": "Files contains information about files affected by the commit", "type": "array", "items": { "$ref": "#/definitions/CommitAffectedFiles" @@ -22146,10 +22231,12 @@ "x-go-name": "Files" }, "html_url": { + "description": "HTMLURL is the web URL for viewing the commit", "type": "string", "x-go-name": "HTMLURL" }, "parents": { + "description": "Parents contains the parent commit information", "type": "array", "items": { "$ref": "#/definitions/CommitMeta" @@ -22157,6 +22244,7 @@ "x-go-name": "Parents" }, "sha": { + "description": "SHA is the commit SHA hash", "type": "string", "x-go-name": "SHA" }, @@ -22164,6 +22252,7 @@ "$ref": "#/definitions/CommitStats" }, "url": { + "description": "URL is the API URL for the commit", "type": "string", "x-go-name": "URL" } @@ -22175,10 +22264,12 @@ "type": "object", "properties": { "filename": { + "description": "Filename is the path of the affected file", "type": "string", "x-go-name": "Filename" }, "status": { + "description": "Status indicates how the file was affected (added, modified, deleted)", "type": "string", "x-go-name": "Status" } @@ -22212,10 +22303,12 @@ "x-go-name": "Created" }, "sha": { + "description": "SHA is the commit SHA hash", "type": "string", "x-go-name": "SHA" }, "url": { + "description": "URL is the API URL for the commit", "type": "string", "x-go-name": "URL" } @@ -22227,16 +22320,19 @@ "type": "object", "properties": { "additions": { + "description": "Additions is the number of lines added", "type": "integer", "format": "int64", "x-go-name": "Additions" }, "deletions": { + "description": "Deletions is the number of lines deleted", "type": "integer", "format": "int64", "x-go-name": "Deletions" }, "total": { + "description": "Total is the total number of lines changed", "type": "integer", "format": "int64", "x-go-name": "Total" @@ -22249,6 +22345,7 @@ "type": "object", "properties": { "context": { + "description": "Context is the unique context identifier for the status", "type": "string", "x-go-name": "Context" }, @@ -22261,15 +22358,18 @@ "$ref": "#/definitions/User" }, "description": { + "description": "Description provides a brief description of the status", "type": "string", "x-go-name": "Description" }, "id": { + "description": "ID is the unique identifier for the commit status", "type": "integer", "format": "int64", "x-go-name": "ID" }, "status": { + "description": "State represents the status state (pending, success, error, failure)\npending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending\nsuccess CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success\nerror CommitStatusError CommitStatusError is for when the CommitStatus is Error\nfailure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure\nwarning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning\nskipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped", "type": "string", "enum": [ "pending", @@ -22283,6 +22383,7 @@ "x-go-name": "State" }, "target_url": { + "description": "TargetURL is the URL to link to for more details", "type": "string", "x-go-name": "TargetURL" }, @@ -22292,6 +22393,7 @@ "x-go-name": "Updated" }, "url": { + "description": "URL is the API URL for this status", "type": "string", "x-go-name": "URL" } @@ -22303,6 +22405,7 @@ "title": "CommitUser contains information of a user in the context of a commit.", "properties": { "date": { + "description": "Date is the commit date in string format", "type": "string", "x-go-name": "Date" }, @@ -22312,6 +22415,7 @@ "x-go-name": "Email" }, "name": { + "description": "Name is the person's name", "type": "string", "x-go-name": "Name" } @@ -22341,6 +22445,7 @@ "type": "object", "properties": { "dir_contents": { + "description": "DirContents contains directory listing when the path represents a directory", "type": "array", "items": { "$ref": "#/definitions/ContentsResponse" @@ -22366,6 +22471,7 @@ "x-go-name": "Content" }, "download_url": { + "description": "DownloadURL is the direct download URL for this file", "type": "string", "x-go-name": "DownloadURL" }, @@ -22375,10 +22481,12 @@ "x-go-name": "Encoding" }, "git_url": { + "description": "GitURL is the Git API URL for this blob or tree", "type": "string", "x-go-name": "GitURL" }, "html_url": { + "description": "HTMLURL is the web URL for this file or directory", "type": "string", "x-go-name": "HTMLURL" }, @@ -22388,10 +22496,12 @@ "x-go-name": "LastAuthorDate" }, "last_commit_message": { + "description": "LastCommitMessage is the message of the last commit that affected this file", "type": "string", "x-go-name": "LastCommitMessage" }, "last_commit_sha": { + "description": "LastCommitSHA is the SHA of the last commit that affected this file", "type": "string", "x-go-name": "LastCommitSHA" }, @@ -22401,27 +22511,33 @@ "x-go-name": "LastCommitterDate" }, "lfs_oid": { + "description": "LfsOid is the Git LFS object ID if this file is stored in LFS", "type": "string", "x-go-name": "LfsOid" }, "lfs_size": { + "description": "LfsSize is the file size if this file is stored in LFS", "type": "integer", "format": "int64", "x-go-name": "LfsSize" }, "name": { + "description": "Name is the file or directory name", "type": "string", "x-go-name": "Name" }, "path": { + "description": "Path is the full path to the file or directory", "type": "string", "x-go-name": "Path" }, "sha": { + "description": "SHA is the Git blob or tree SHA", "type": "string", "x-go-name": "SHA" }, "size": { + "description": "Size is the file size in bytes", "type": "integer", "format": "int64", "x-go-name": "Size" @@ -22442,6 +22558,7 @@ "x-go-name": "Type" }, "url": { + "description": "URL is the API URL for this file or directory", "type": "string", "x-go-name": "URL" } @@ -22781,6 +22898,7 @@ "x-go-name": "ArmoredKey" }, "armored_signature": { + "description": "An optional armored signature for the GPG key", "type": "string", "x-go-name": "Signature" } @@ -22801,10 +22919,12 @@ "x-go-name": "Active" }, "authorization_header": { + "description": "Authorization header to include in webhook requests", "type": "string", "x-go-name": "AuthorizationHeader" }, "branch_filter": { + "description": "Branch filter pattern to determine which branches trigger the webhook", "type": "string", "x-go-name": "BranchFilter" }, @@ -22812,6 +22932,7 @@ "$ref": "#/definitions/CreateHookOptionConfig" }, "events": { + "description": "List of events that will trigger this webhook", "type": "array", "items": { "type": "string" @@ -22959,6 +23080,7 @@ "example": "#00aabb" }, "description": { + "description": "Description provides additional context about the label's purpose", "type": "string", "x-go-name": "Description" }, @@ -22984,6 +23106,7 @@ "type": "object", "properties": { "description": { + "description": "Description provides details about the milestone", "type": "string", "x-go-name": "Description" }, @@ -23001,6 +23124,7 @@ "x-go-name": "State" }, "title": { + "description": "Title is the title of the new milestone", "type": "string", "x-go-name": "Title" } @@ -23012,14 +23136,17 @@ "type": "object", "properties": { "confidential_client": { + "description": "Whether the client is confidential", "type": "boolean", "x-go-name": "ConfidentialClient" }, "name": { + "description": "The name of the OAuth2 application", "type": "string", "x-go-name": "Name" }, "redirect_uris": { + "description": "The list of allowed redirect URIs", "type": "array", "items": { "type": "string" @@ -23027,6 +23154,7 @@ "x-go-name": "RedirectURIs" }, "skip_secondary_authorization": { + "description": "Whether to skip secondary authorization", "type": "boolean", "x-go-name": "SkipSecondaryAuthorization" } @@ -23061,22 +23189,27 @@ ], "properties": { "description": { + "description": "The description of the organization", "type": "string", "x-go-name": "Description" }, "email": { + "description": "The email address of the organization", "type": "string", "x-go-name": "Email" }, "full_name": { + "description": "The full display name of the organization", "type": "string", "x-go-name": "FullName" }, "location": { + "description": "The location of the organization", "type": "string", "x-go-name": "Location" }, "repo_admin_change_team_access": { + "description": "Whether repository administrators can change team access", "type": "boolean", "x-go-name": "RepoAdminChangeTeamAccess" }, @@ -23096,6 +23229,7 @@ "x-go-name": "Visibility" }, "website": { + "description": "The website URL of the organization", "type": "string", "x-go-name": "Website" } @@ -23107,10 +23241,12 @@ "type": "object", "properties": { "assignee": { + "description": "The primary assignee username", "type": "string", "x-go-name": "Assignee" }, "assignees": { + "description": "The list of assignee usernames", "type": "array", "items": { "type": "string" @@ -23118,10 +23254,12 @@ "x-go-name": "Assignees" }, "base": { + "description": "The base branch for the pull request", "type": "string", "x-go-name": "Base" }, "body": { + "description": "The description body of the pull request", "type": "string", "x-go-name": "Body" }, @@ -23131,10 +23269,12 @@ "x-go-name": "Deadline" }, "head": { + "description": "The head branch for the pull request", "type": "string", "x-go-name": "Head" }, "labels": { + "description": "The list of label IDs to assign to the pull request", "type": "array", "items": { "type": "integer", @@ -23143,11 +23283,13 @@ "x-go-name": "Labels" }, "milestone": { + "description": "The milestone ID to assign to the pull request", "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "reviewers": { + "description": "The list of reviewer usernames", "type": "array", "items": { "type": "string" @@ -23155,6 +23297,7 @@ "x-go-name": "Reviewers" }, "team_reviewers": { + "description": "The list of team reviewer names", "type": "array", "items": { "type": "string" @@ -23162,6 +23305,7 @@ "x-go-name": "TeamReviewers" }, "title": { + "description": "The title of the pull request", "type": "string", "x-go-name": "Title" } @@ -23226,22 +23370,27 @@ "title": "CreatePushMirrorOption represents need information to create a push mirror of a repository.", "properties": { "interval": { + "description": "The sync interval for automatic updates", "type": "string", "x-go-name": "Interval" }, "remote_address": { + "description": "The remote repository URL to push to", "type": "string", "x-go-name": "RemoteAddress" }, "remote_password": { + "description": "The password for authentication with the remote repository", "type": "string", "x-go-name": "RemotePassword" }, "remote_username": { + "description": "The username for authentication with the remote repository", "type": "string", "x-go-name": "RemoteUsername" }, "sync_on_commit": { + "description": "Whether to sync on every commit", "type": "boolean", "x-go-name": "SyncOnCommit" } @@ -23256,22 +23405,27 @@ ], "properties": { "body": { + "description": "The release notes or description", "type": "string", "x-go-name": "Note" }, "draft": { + "description": "Whether to create the release as a draft", "type": "boolean", "x-go-name": "IsDraft" }, "name": { + "description": "The display title of the release", "type": "string", "x-go-name": "Title" }, "prerelease": { + "description": "Whether to mark the release as a prerelease", "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_message": { + "description": "The message for the git tag", "type": "string", "x-go-name": "TagMessage" }, @@ -23280,6 +23434,7 @@ "x-go-name": "TagName" }, "target_commitish": { + "description": "The target commitish for the release", "type": "string", "x-go-name": "Target" } @@ -23372,14 +23527,17 @@ "type": "object", "properties": { "context": { + "description": "Context is the unique context identifier for the status", "type": "string", "x-go-name": "Context" }, "description": { + "description": "Description provides a brief description of the status", "type": "string", "x-go-name": "Description" }, "state": { + "description": "State represents the status state to set (pending, success, error, failure)\npending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending\nsuccess CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success\nerror CommitStatusError CommitStatusError is for when the CommitStatus is Error\nfailure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure\nwarning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning\nskipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped", "type": "string", "enum": [ "pending", @@ -23393,6 +23551,7 @@ "x-go-name": "State" }, "target_url": { + "description": "TargetURL is the URL to link to for more details", "type": "string", "x-go-name": "TargetURL" } @@ -23407,6 +23566,7 @@ ], "properties": { "message": { + "description": "The message to associate with the tag", "type": "string", "x-go-name": "Message" }, @@ -23415,6 +23575,7 @@ "x-go-name": "TagName" }, "target": { + "description": "The target commit SHA or branch name for the tag", "type": "string", "x-go-name": "Target" } @@ -23426,10 +23587,12 @@ "type": "object", "properties": { "name_pattern": { + "description": "The pattern to match tag names for protection", "type": "string", "x-go-name": "NamePattern" }, "whitelist_teams": { + "description": "List of team names allowed to create/delete protected tags", "type": "array", "items": { "type": "string" @@ -23437,6 +23600,7 @@ "x-go-name": "WhitelistTeams" }, "whitelist_usernames": { + "description": "List of usernames allowed to create/delete protected tags", "type": "array", "items": { "type": "string" @@ -23454,14 +23618,17 @@ ], "properties": { "can_create_org_repo": { + "description": "Whether the team can create repositories in the organization", "type": "boolean", "x-go-name": "CanCreateOrgRepo" }, "description": { + "description": "The description of the team", "type": "string", "x-go-name": "Description" }, "includes_all_repositories": { + "description": "Whether the team has access to all repositories in the organization", "type": "boolean", "x-go-name": "IncludesAllRepositories" }, @@ -23528,6 +23695,7 @@ "x-go-name": "Email" }, "full_name": { + "description": "The full display name of the user", "type": "string", "x-go-name": "FullName" }, @@ -23538,22 +23706,27 @@ "x-go-name": "LoginName" }, "must_change_password": { + "description": "Whether the user must change password on first login", "type": "boolean", "x-go-name": "MustChangePassword" }, "password": { + "description": "The plain text password for the user", "type": "string", "x-go-name": "Password" }, "restricted": { + "description": "Whether the user has restricted access privileges", "type": "boolean", "x-go-name": "Restricted" }, "send_notify": { + "description": "Whether to send welcome notification email to the user", "type": "boolean", "x-go-name": "SendNotify" }, "source_id": { + "description": "The authentication source ID to associate with the user", "type": "integer", "format": "int64", "x-go-name": "SourceID" @@ -23564,6 +23737,7 @@ "x-go-name": "Username" }, "visibility": { + "description": "User visibility level: public, limited, or private", "type": "string", "x-go-name": "Visibility" } @@ -23617,25 +23791,30 @@ "type": "object", "properties": { "exec_times": { + "description": "The total number of times this cron task has been executed", "type": "integer", "format": "int64", "x-go-name": "ExecTimes" }, "name": { + "description": "The name of the cron task", "type": "string", "x-go-name": "Name" }, "next": { + "description": "The next scheduled execution time", "type": "string", "format": "date-time", "x-go-name": "Next" }, "prev": { + "description": "The previous execution time", "type": "string", "format": "date-time", "x-go-name": "Prev" }, "schedule": { + "description": "The cron schedule expression (e.g., \"0 0 * * *\")", "type": "string", "x-go-name": "Schedule" } @@ -23711,24 +23890,29 @@ "x-go-name": "Created" }, "fingerprint": { + "description": "Fingerprint is the key's fingerprint", "type": "string", "x-go-name": "Fingerprint" }, "id": { + "description": "ID is the unique identifier for the deploy key", "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { + "description": "Key contains the actual SSH key content", "type": "string", "x-go-name": "Key" }, "key_id": { + "description": "KeyID is the associated public key ID", "type": "integer", "format": "int64", "x-go-name": "KeyID" }, "read_only": { + "description": "ReadOnly indicates if the key has read-only access", "type": "boolean", "x-go-name": "ReadOnly" }, @@ -23736,10 +23920,12 @@ "$ref": "#/definitions/Repository" }, "title": { + "description": "Title is the human-readable name for the key", "type": "string", "x-go-name": "Title" }, "url": { + "description": "URL is the API URL for this deploy key", "type": "string", "x-go-name": "URL" } @@ -23766,6 +23952,7 @@ "type": "object", "properties": { "name": { + "description": "Name is the new filename for the attachment", "type": "string", "x-go-name": "Name" } @@ -23944,6 +24131,7 @@ "type": "object", "properties": { "content": { + "description": "Content is the new script content for the hook", "type": "string", "x-go-name": "Content" } @@ -23955,18 +24143,22 @@ "type": "object", "properties": { "active": { + "description": "Whether the webhook is active and will be triggered", "type": "boolean", "x-go-name": "Active" }, "authorization_header": { + "description": "Authorization header to include in webhook requests", "type": "string", "x-go-name": "AuthorizationHeader" }, "branch_filter": { + "description": "Branch filter pattern to determine which branches trigger the webhook", "type": "string", "x-go-name": "BranchFilter" }, "config": { + "description": "Configuration settings for the webhook", "type": "object", "additionalProperties": { "type": "string" @@ -23974,6 +24166,7 @@ "x-go-name": "Config" }, "events": { + "description": "List of events that trigger this webhook", "type": "array", "items": { "type": "string" @@ -24056,6 +24249,7 @@ "example": "#00aabb" }, "description": { + "description": "Description provides additional context about the label's purpose", "type": "string", "x-go-name": "Description" }, @@ -24070,6 +24264,7 @@ "example": false }, "name": { + "description": "Name is the new display name for the label", "type": "string", "x-go-name": "Name" } @@ -24081,19 +24276,23 @@ "type": "object", "properties": { "description": { + "description": "Description provides updated details about the milestone", "type": "string", "x-go-name": "Description" }, "due_on": { + "description": "Deadline is the updated due date for the milestone", "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "state": { + "description": "State indicates the updated state of the milestone", "type": "string", "x-go-name": "State" }, "title": { + "description": "Title is the updated title of the milestone", "type": "string", "x-go-name": "Title" } @@ -24105,22 +24304,27 @@ "type": "object", "properties": { "description": { + "description": "The description of the organization", "type": "string", "x-go-name": "Description" }, "email": { + "description": "The email address of the organization", "type": "string", "x-go-name": "Email" }, "full_name": { + "description": "The full display name of the organization", "type": "string", "x-go-name": "FullName" }, "location": { + "description": "The location of the organization", "type": "string", "x-go-name": "Location" }, "repo_admin_change_team_access": { + "description": "Whether repository administrators can change team access", "type": "boolean", "x-go-name": "RepoAdminChangeTeamAccess" }, @@ -24135,6 +24339,7 @@ "x-go-name": "Visibility" }, "website": { + "description": "The website URL of the organization", "type": "string", "x-go-name": "Website" } @@ -24146,14 +24351,17 @@ "type": "object", "properties": { "allow_maintainer_edit": { + "description": "Whether to allow maintainer edits", "type": "boolean", "x-go-name": "AllowMaintainerEdit" }, "assignee": { + "description": "The new primary assignee username", "type": "string", "x-go-name": "Assignee" }, "assignees": { + "description": "The new list of assignee usernames", "type": "array", "items": { "type": "string" @@ -24161,10 +24369,12 @@ "x-go-name": "Assignees" }, "base": { + "description": "The new base branch for the pull request", "type": "string", "x-go-name": "Base" }, "body": { + "description": "The new description body for the pull request", "type": "string", "x-go-name": "Body" }, @@ -24174,6 +24384,7 @@ "x-go-name": "Deadline" }, "labels": { + "description": "The new list of label IDs for the pull request", "type": "array", "items": { "type": "integer", @@ -24182,19 +24393,23 @@ "x-go-name": "Labels" }, "milestone": { + "description": "The new milestone ID for the pull request", "type": "integer", "format": "int64", "x-go-name": "Milestone" }, "state": { + "description": "The new state for the pull request", "type": "string", "x-go-name": "State" }, "title": { + "description": "The new title for the pull request", "type": "string", "x-go-name": "Title" }, "unset_due_date": { + "description": "Whether to remove the current deadline", "type": "boolean", "x-go-name": "RemoveDeadline" } @@ -24206,6 +24421,7 @@ "type": "object", "properties": { "content": { + "description": "The reaction content (e.g., emoji or reaction type)", "type": "string", "x-go-name": "Reaction" } @@ -24217,26 +24433,32 @@ "type": "object", "properties": { "body": { + "description": "The new release notes or description", "type": "string", "x-go-name": "Note" }, "draft": { + "description": "Whether to change the draft status", "type": "boolean", "x-go-name": "IsDraft" }, "name": { + "description": "The new display title of the release", "type": "string", "x-go-name": "Title" }, "prerelease": { + "description": "Whether to change the prerelease status", "type": "boolean", "x-go-name": "IsPrerelease" }, "tag_name": { + "description": "The new name of the git tag", "type": "string", "x-go-name": "TagName" }, "target_commitish": { + "description": "The new target commitish for the release", "type": "string", "x-go-name": "Target" } @@ -24415,10 +24637,12 @@ "type": "object", "properties": { "name_pattern": { + "description": "The pattern to match tag names for protection", "type": "string", "x-go-name": "NamePattern" }, "whitelist_teams": { + "description": "List of team names allowed to create/delete protected tags", "type": "array", "items": { "type": "string" @@ -24426,6 +24650,7 @@ "x-go-name": "WhitelistTeams" }, "whitelist_usernames": { + "description": "List of usernames allowed to create/delete protected tags", "type": "array", "items": { "type": "string" @@ -24443,14 +24668,17 @@ ], "properties": { "can_create_org_repo": { + "description": "Whether the team can create repositories in the organization", "type": "boolean", "x-go-name": "CanCreateOrgRepo" }, "description": { + "description": "The description of the team", "type": "string", "x-go-name": "Description" }, "includes_all_repositories": { + "description": "Whether the team has access to all repositories in the organization", "type": "boolean", "x-go-name": "IncludesAllRepositories" }, @@ -24513,26 +24741,32 @@ ], "properties": { "active": { + "description": "Whether the user account is active", "type": "boolean", "x-go-name": "Active" }, "admin": { + "description": "Whether the user has administrator privileges", "type": "boolean", "x-go-name": "Admin" }, "allow_create_organization": { + "description": "Whether the user can create organizations", "type": "boolean", "x-go-name": "AllowCreateOrganization" }, "allow_git_hook": { + "description": "Whether the user can use Git hooks", "type": "boolean", "x-go-name": "AllowGitHook" }, "allow_import_local": { + "description": "Whether the user can import local repositories", "type": "boolean", "x-go-name": "AllowImportLocal" }, "description": { + "description": "The user's personal description or bio", "type": "string", "x-go-name": "Description" }, @@ -24542,10 +24776,12 @@ "x-go-name": "Email" }, "full_name": { + "description": "The full display name of the user", "type": "string", "x-go-name": "FullName" }, "location": { + "description": "The user's location or address", "type": "string", "x-go-name": "Location" }, @@ -24556,23 +24792,28 @@ "x-go-name": "LoginName" }, "max_repo_creation": { + "description": "Maximum number of repositories the user can create", "type": "integer", "format": "int64", "x-go-name": "MaxRepoCreation" }, "must_change_password": { + "description": "Whether the user must change password on next login", "type": "boolean", "x-go-name": "MustChangePassword" }, "password": { + "description": "The plain text password for the user", "type": "string", "x-go-name": "Password" }, "prohibit_login": { + "description": "Whether the user is prohibited from logging in", "type": "boolean", "x-go-name": "ProhibitLogin" }, "restricted": { + "description": "Whether the user has restricted access privileges", "type": "boolean", "x-go-name": "Restricted" }, @@ -24582,10 +24823,12 @@ "x-go-name": "SourceID" }, "visibility": { + "description": "User visibility level: public, limited, or private", "type": "string", "x-go-name": "Visibility" }, "website": { + "description": "The user's personal website URL", "type": "string", "x-go-name": "Website" } @@ -24602,10 +24845,12 @@ "x-go-name": "Email" }, "primary": { + "description": "Whether this is the primary email address", "type": "boolean", "x-go-name": "Primary" }, "user_id": { + "description": "The unique identifier of the user who owns this email", "type": "integer", "format": "int64", "x-go-name": "UserID" @@ -24616,6 +24861,7 @@ "x-go-name": "UserName" }, "verified": { + "description": "Whether the email address has been verified", "type": "boolean", "x-go-name": "Verified" } @@ -24677,14 +24923,17 @@ "x-go-name": "Created" }, "html_url": { + "description": "HTMLURL is the web URL for viewing this commit", "type": "string", "x-go-name": "HTMLURL" }, "message": { + "description": "Message is the commit message", "type": "string", "x-go-name": "Message" }, "parents": { + "description": "Parents contains parent commit metadata", "type": "array", "items": { "$ref": "#/definitions/CommitMeta" @@ -24692,6 +24941,7 @@ "x-go-name": "Parents" }, "sha": { + "description": "SHA is the commit SHA hash", "type": "string", "x-go-name": "SHA" }, @@ -24699,6 +24949,7 @@ "$ref": "#/definitions/CommitMeta" }, "url": { + "description": "URL is the API URL for the commit", "type": "string", "x-go-name": "URL" } @@ -24713,6 +24964,7 @@ "$ref": "#/definitions/FileCommitResponse" }, "content": { + "description": "Content is always null for delete operations", "x-go-name": "Content" }, "verification": { @@ -24726,14 +24978,17 @@ "type": "object", "properties": { "git": { + "description": "GitURL is the Git API URL for this file", "type": "string", "x-go-name": "GitURL" }, "html": { + "description": "HTMLURL is the web URL for this file", "type": "string", "x-go-name": "HTMLURL" }, "self": { + "description": "Self is the API URL for this file", "type": "string", "x-go-name": "Self" } @@ -24764,6 +25019,7 @@ "$ref": "#/definitions/FileCommitResponse" }, "files": { + "description": "Files contains the list of file contents and metadata", "type": "array", "items": { "$ref": "#/definitions/ContentsResponse" @@ -24781,18 +25037,22 @@ "type": "object", "properties": { "can_certify": { + "description": "Whether the key can be used for certification", "type": "boolean", "x-go-name": "CanCertify" }, "can_encrypt_comms": { + "description": "Whether the key can be used for encrypting communications", "type": "boolean", "x-go-name": "CanEncryptComms" }, "can_encrypt_storage": { + "description": "Whether the key can be used for encrypting storage", "type": "boolean", "x-go-name": "CanEncryptStorage" }, "can_sign": { + "description": "Whether the key can be used for signing", "type": "boolean", "x-go-name": "CanSign" }, @@ -24802,6 +25062,7 @@ "x-go-name": "Created" }, "emails": { + "description": "List of email addresses associated with this GPG key", "type": "array", "items": { "$ref": "#/definitions/GPGKeyEmail" @@ -24814,23 +25075,28 @@ "x-go-name": "Expires" }, "id": { + "description": "The unique identifier of the GPG key", "type": "integer", "format": "int64", "x-go-name": "ID" }, "key_id": { + "description": "The key ID of the GPG key", "type": "string", "x-go-name": "KeyID" }, "primary_key_id": { + "description": "The primary key ID of the GPG key", "type": "string", "x-go-name": "PrimaryKeyID" }, "public_key": { + "description": "The public key content in armored format", "type": "string", "x-go-name": "PublicKey" }, "subkeys": { + "description": "List of subkeys of this GPG key", "type": "array", "items": { "$ref": "#/definitions/GPGKey" @@ -24838,6 +25104,7 @@ "x-go-name": "SubsKey" }, "verified": { + "description": "Whether the GPG key has been verified", "type": "boolean", "x-go-name": "Verified" } @@ -24849,10 +25116,12 @@ "type": "object", "properties": { "email": { + "description": "The email address associated with the GPG key", "type": "string", "x-go-name": "Email" }, "verified": { + "description": "Whether the email address has been verified", "type": "boolean", "x-go-name": "Verified" } @@ -24864,26 +25133,31 @@ "type": "object", "properties": { "default_git_trees_per_page": { + "description": "DefaultGitTreesPerPage is the default number of Git tree items per page", "type": "integer", "format": "int64", "x-go-name": "DefaultGitTreesPerPage" }, "default_max_blob_size": { + "description": "DefaultMaxBlobSize is the default maximum blob size for API responses", "type": "integer", "format": "int64", "x-go-name": "DefaultMaxBlobSize" }, "default_max_response_size": { + "description": "DefaultMaxResponseSize is the default maximum response size", "type": "integer", "format": "int64", "x-go-name": "DefaultMaxResponseSize" }, "default_paging_num": { + "description": "DefaultPagingNum is the default number of items per page", "type": "integer", "format": "int64", "x-go-name": "DefaultPagingNum" }, "max_response_items": { + "description": "MaxResponseItems is the maximum number of items returned in API responses", "type": "integer", "format": "int64", "x-go-name": "MaxResponseItems" @@ -24896,19 +25170,23 @@ "type": "object", "properties": { "allowed_types": { + "description": "AllowedTypes contains the allowed file types for attachments", "type": "string", "x-go-name": "AllowedTypes" }, "enabled": { + "description": "Enabled indicates if file attachments are enabled", "type": "boolean", "x-go-name": "Enabled" }, "max_files": { + "description": "MaxFiles is the maximum number of files per attachment", "type": "integer", "format": "int64", "x-go-name": "MaxFiles" }, "max_size": { + "description": "MaxSize is the maximum size for individual attachments", "type": "integer", "format": "int64", "x-go-name": "MaxSize" @@ -24921,26 +25199,32 @@ "type": "object", "properties": { "http_git_disabled": { + "description": "HTTPGitDisabled indicates if HTTP Git operations are disabled", "type": "boolean", "x-go-name": "HTTPGitDisabled" }, "lfs_disabled": { + "description": "LFSDisabled indicates if Git LFS support is disabled", "type": "boolean", "x-go-name": "LFSDisabled" }, "migrations_disabled": { + "description": "MigrationsDisabled indicates if repository migrations are disabled", "type": "boolean", "x-go-name": "MigrationsDisabled" }, "mirrors_disabled": { + "description": "MirrorsDisabled indicates if repository mirroring is disabled", "type": "boolean", "x-go-name": "MirrorsDisabled" }, "stars_disabled": { + "description": "StarsDisabled indicates if repository starring is disabled", "type": "boolean", "x-go-name": "StarsDisabled" }, "time_tracking_disabled": { + "description": "TimeTrackingDisabled indicates if time tracking is disabled", "type": "boolean", "x-go-name": "TimeTrackingDisabled" } @@ -24952,6 +25236,7 @@ "type": "object", "properties": { "allowed_reactions": { + "description": "AllowedReactions contains the list of allowed emoji reactions", "type": "array", "items": { "type": "string" @@ -24959,6 +25244,7 @@ "x-go-name": "AllowedReactions" }, "custom_emojis": { + "description": "CustomEmojis contains the list of custom emojis", "type": "array", "items": { "type": "string" @@ -24966,6 +25252,7 @@ "x-go-name": "CustomEmojis" }, "default_theme": { + "description": "DefaultTheme is the default UI theme", "type": "string", "x-go-name": "DefaultTheme" } @@ -25048,6 +25335,7 @@ "type": "object", "properties": { "files": { + "description": "Files is the list of file paths to retrieve", "type": "array", "items": { "type": "string" @@ -25062,32 +25350,39 @@ "type": "object", "properties": { "content": { + "description": "The content of the git blob (may be base64 encoded)", "type": "string", "x-go-name": "Content" }, "encoding": { + "description": "The encoding used for the content (e.g., \"base64\")", "type": "string", "x-go-name": "Encoding" }, "lfs_oid": { + "description": "The LFS object ID if this blob is stored in LFS", "type": "string", "x-go-name": "LfsOid" }, "lfs_size": { + "description": "The size of the LFS object if this blob is stored in LFS", "type": "integer", "format": "int64", "x-go-name": "LfsSize" }, "sha": { + "description": "The SHA hash of the git blob", "type": "string", "x-go-name": "SHA" }, "size": { + "description": "The size of the git blob in bytes", "type": "integer", "format": "int64", "x-go-name": "Size" }, "url": { + "description": "The URL to access this git blob", "type": "string", "x-go-name": "URL" } @@ -25099,27 +25394,33 @@ "type": "object", "properties": { "mode": { + "description": "Mode is the file mode (permissions)", "type": "string", "x-go-name": "Mode" }, "path": { + "description": "Path is the file or directory path", "type": "string", "x-go-name": "Path" }, "sha": { + "description": "SHA is the Git object SHA", "type": "string", "x-go-name": "SHA" }, "size": { + "description": "Size is the file size in bytes", "type": "integer", "format": "int64", "x-go-name": "Size" }, "type": { + "description": "Type indicates if this is a file, directory, or symlink", "type": "string", "x-go-name": "Type" }, "url": { + "description": "URL is the API URL for this tree entry", "type": "string", "x-go-name": "URL" } @@ -25131,14 +25432,17 @@ "type": "object", "properties": { "content": { + "description": "Content contains the script content of the hook", "type": "string", "x-go-name": "Content" }, "is_active": { + "description": "IsActive indicates if the hook is active", "type": "boolean", "x-go-name": "IsActive" }, "name": { + "description": "Name is the name of the Git hook", "type": "string", "x-go-name": "Name" } @@ -25150,14 +25454,17 @@ "title": "GitObject represents a Git object.", "properties": { "sha": { + "description": "The SHA hash of the Git object", "type": "string", "x-go-name": "SHA" }, "type": { + "description": "The type of the Git object (e.g., commit, tag, tree, blob)", "type": "string", "x-go-name": "Type" }, "url": { + "description": "The URL to access this Git object", "type": "string", "x-go-name": "URL" } @@ -25169,20 +25476,24 @@ "type": "object", "properties": { "page": { + "description": "Page is the current page number for pagination", "type": "integer", "format": "int64", "x-go-name": "Page" }, "sha": { + "description": "SHA is the tree object SHA", "type": "string", "x-go-name": "SHA" }, "total_count": { + "description": "TotalCount is the total number of entries in the tree", "type": "integer", "format": "int64", "x-go-name": "TotalCount" }, "tree": { + "description": "Entries contains the tree entries (files and directories)", "type": "array", "items": { "$ref": "#/definitions/GitEntry" @@ -25190,10 +25501,12 @@ "x-go-name": "Entries" }, "truncated": { + "description": "Truncated indicates if the response was truncated due to size", "type": "boolean", "x-go-name": "Truncated" }, "url": { + "description": "URL is the API URL for this tree", "type": "string", "x-go-name": "URL" } @@ -25205,10 +25518,12 @@ "type": "object", "properties": { "name": { + "description": "Name is the name of the gitignore template", "type": "string", "x-go-name": "Name" }, "source": { + "description": "Source contains the content of the gitignore template", "type": "string", "x-go-name": "Source" } @@ -25220,18 +25535,22 @@ "type": "object", "properties": { "active": { + "description": "Whether the webhook is active and will be triggered", "type": "boolean", "x-go-name": "Active" }, "authorization_header": { + "description": "Authorization header to include in webhook requests", "type": "string", "x-go-name": "AuthorizationHeader" }, "branch_filter": { + "description": "Branch filter pattern to determine which branches trigger the webhook", "type": "string", "x-go-name": "BranchFilter" }, "config": { + "description": "Configuration settings for the webhook", "type": "object", "additionalProperties": { "type": "string" @@ -25244,6 +25563,7 @@ "x-go-name": "Created" }, "events": { + "description": "List of events that trigger this webhook", "type": "array", "items": { "type": "string" @@ -25251,11 +25571,13 @@ "x-go-name": "Events" }, "id": { + "description": "The unique identifier of the webhook", "type": "integer", "format": "int64", "x-go-name": "ID" }, "type": { + "description": "The type of the webhook (e.g., gitea, slack, discord)", "type": "string", "x-go-name": "Type" }, @@ -25277,6 +25599,7 @@ "x-go-name": "Email" }, "name": { + "description": "Name is the person's name", "type": "string", "x-go-name": "Name" } @@ -25621,6 +25944,7 @@ "example": "00aabb" }, "description": { + "description": "Description provides additional context about the label's purpose", "type": "string", "x-go-name": "Description" }, @@ -25630,6 +25954,7 @@ "example": false }, "id": { + "description": "ID is the unique identifier for the label", "type": "integer", "format": "int64", "x-go-name": "ID" @@ -25640,10 +25965,12 @@ "example": false }, "name": { + "description": "Name is the display name of the label", "type": "string", "x-go-name": "Name" }, "url": { + "description": "URL is the API endpoint for accessing this label", "type": "string", "x-go-name": "URL" } @@ -25660,6 +25987,7 @@ "example": "00aabb" }, "description": { + "description": "Description provides additional context about the label template's purpose", "type": "string", "x-go-name": "Description" }, @@ -25669,6 +25997,7 @@ "example": false }, "name": { + "description": "Name is the display name of the label template", "type": "string", "x-go-name": "Name" } @@ -25680,22 +26009,27 @@ "type": "object", "properties": { "body": { + "description": "Body contains the full text of the license", "type": "string", "x-go-name": "Body" }, "implementation": { + "description": "Implementation contains license implementation details", "type": "string", "x-go-name": "Implementation" }, "key": { + "description": "Key is the unique identifier for the license template", "type": "string", "x-go-name": "Key" }, "name": { + "description": "Name is the display name of the license", "type": "string", "x-go-name": "Name" }, "url": { + "description": "URL is the reference URL for the license", "type": "string", "x-go-name": "URL" } @@ -25707,14 +26041,17 @@ "type": "object", "properties": { "key": { + "description": "Key is the unique identifier for the license template", "type": "string", "x-go-name": "Key" }, "name": { + "description": "Name is the display name of the license", "type": "string", "x-go-name": "Name" }, "url": { + "description": "URL is the reference URL for the license", "type": "string", "x-go-name": "URL" } @@ -25976,6 +26313,7 @@ "x-go-name": "Closed" }, "closed_issues": { + "description": "ClosedIssues is the number of closed issues in this milestone", "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" @@ -25986,6 +26324,7 @@ "x-go-name": "Created" }, "description": { + "description": "Description provides details about the milestone", "type": "string", "x-go-name": "Description" }, @@ -25995,11 +26334,13 @@ "x-go-name": "Deadline" }, "id": { + "description": "ID is the unique identifier for the milestone", "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { + "description": "OpenIssues is the number of open issues in this milestone", "type": "integer", "format": "int64", "x-go-name": "OpenIssues" @@ -26008,6 +26349,7 @@ "$ref": "#/definitions/StateType" }, "title": { + "description": "Title is the title of the milestone", "type": "string", "x-go-name": "Title" }, @@ -26039,14 +26381,17 @@ "type": "object", "properties": { "metadata": { + "description": "Metadata contains free form key value pairs for software specific values", "type": "object", "x-go-name": "Metadata" }, "openRegistrations": { + "description": "OpenRegistrations indicates if new user registrations are accepted", "type": "boolean", "x-go-name": "OpenRegistrations" }, "protocols": { + "description": "Protocols lists the protocols supported by this server", "type": "array", "items": { "type": "string" @@ -26063,6 +26408,7 @@ "$ref": "#/definitions/NodeInfoUsage" }, "version": { + "description": "Version specifies the schema version", "type": "string", "x-go-name": "Version" } @@ -26074,6 +26420,7 @@ "type": "object", "properties": { "inbound": { + "description": "Inbound lists services that can deliver content to this server", "type": "array", "items": { "type": "string" @@ -26081,6 +26428,7 @@ "x-go-name": "Inbound" }, "outbound": { + "description": "Outbound lists services this server can deliver content to", "type": "array", "items": { "type": "string" @@ -26095,18 +26443,22 @@ "type": "object", "properties": { "homepage": { + "description": "Homepage is the URL to the homepage of this server software", "type": "string", "x-go-name": "Homepage" }, "name": { + "description": "Name is the canonical name of this server software", "type": "string", "x-go-name": "Name" }, "repository": { + "description": "Repository is the URL to the source code repository", "type": "string", "x-go-name": "Repository" }, "version": { + "description": "Version is the version of this server software", "type": "string", "x-go-name": "Version" } @@ -26118,11 +26470,13 @@ "type": "object", "properties": { "localComments": { + "description": "LocalComments is the total amount of comments made by users local to this server", "type": "integer", "format": "int64", "x-go-name": "LocalComments" }, "localPosts": { + "description": "LocalPosts is the total amount of posts made by users local to this server", "type": "integer", "format": "int64", "x-go-name": "LocalPosts" @@ -26138,16 +26492,19 @@ "type": "object", "properties": { "activeHalfyear": { + "description": "ActiveHalfyear is the amount of users that signed in at least once in the last 180 days", "type": "integer", "format": "int64", "x-go-name": "ActiveHalfyear" }, "activeMonth": { + "description": "ActiveMonth is the amount of users that signed in at least once in the last 30 days", "type": "integer", "format": "int64", "x-go-name": "ActiveMonth" }, "total": { + "description": "Total is the total amount of users on this server", "type": "integer", "format": "int64", "x-go-name": "Total" @@ -26163,6 +26520,7 @@ "$ref": "#/definitions/Commit" }, "message": { + "description": "The content message of the git note", "type": "string", "x-go-name": "Message" } @@ -26174,6 +26532,7 @@ "type": "object", "properties": { "new": { + "description": "New is the number of unread notifications", "type": "integer", "format": "int64", "x-go-name": "New" @@ -26186,14 +26545,17 @@ "type": "object", "properties": { "html_url": { + "description": "HTMLURL is the web URL for the notification subject", "type": "string", "x-go-name": "HTMLURL" }, "latest_comment_html_url": { + "description": "LatestCommentHTMLURL is the web URL for the latest comment", "type": "string", "x-go-name": "LatestCommentHTMLURL" }, "latest_comment_url": { + "description": "LatestCommentURL is the API URL for the latest comment", "type": "string", "x-go-name": "LatestCommentURL" }, @@ -26201,6 +26563,7 @@ "$ref": "#/definitions/StateType" }, "title": { + "description": "Title is the title of the notification subject", "type": "string", "x-go-name": "Title" }, @@ -26208,6 +26571,7 @@ "$ref": "#/definitions/NotifySubjectType" }, "url": { + "description": "URL is the API URL for the notification subject", "type": "string", "x-go-name": "URL" } @@ -26219,11 +26583,13 @@ "type": "object", "properties": { "id": { + "description": "ID is the unique identifier for the notification thread", "type": "integer", "format": "int64", "x-go-name": "ID" }, "pinned": { + "description": "Pinned indicates if the notification is pinned", "type": "boolean", "x-go-name": "Pinned" }, @@ -26234,15 +26600,18 @@ "$ref": "#/definitions/NotificationSubject" }, "unread": { + "description": "Unread indicates if the notification has been read", "type": "boolean", "x-go-name": "Unread" }, "updated_at": { + "description": "UpdatedAt is the time when the notification was last updated", "type": "string", "format": "date-time", "x-go-name": "UpdatedAt" }, "url": { + "description": "URL is the API URL for this notification thread", "type": "string", "x-go-name": "URL" } @@ -26259,32 +26628,39 @@ "title": "OAuth2Application represents an OAuth2 application.", "properties": { "client_id": { + "description": "The client ID of the OAuth2 application", "type": "string", "x-go-name": "ClientID" }, "client_secret": { + "description": "The client secret of the OAuth2 application", "type": "string", "x-go-name": "ClientSecret" }, "confidential_client": { + "description": "Whether the client is confidential", "type": "boolean", "x-go-name": "ConfidentialClient" }, "created": { + "description": "The timestamp when the application was created", "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { + "description": "The unique identifier of the OAuth2 application", "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { + "description": "The name of the OAuth2 application", "type": "string", "x-go-name": "Name" }, "redirect_uris": { + "description": "The list of allowed redirect URIs", "type": "array", "items": { "type": "string" @@ -26292,6 +26668,7 @@ "x-go-name": "RedirectURIs" }, "skip_secondary_authorization": { + "description": "Whether to skip secondary authorization", "type": "boolean", "x-go-name": "SkipSecondaryAuthorization" } @@ -26303,35 +26680,43 @@ "type": "object", "properties": { "avatar_url": { + "description": "The URL of the organization's avatar", "type": "string", "x-go-name": "AvatarURL" }, "description": { + "description": "The description of the organization", "type": "string", "x-go-name": "Description" }, "email": { + "description": "The email address of the organization", "type": "string", "x-go-name": "Email" }, "full_name": { + "description": "The full display name of the organization", "type": "string", "x-go-name": "FullName" }, "id": { + "description": "The unique identifier of the organization", "type": "integer", "format": "int64", "x-go-name": "ID" }, "location": { + "description": "The location of the organization", "type": "string", "x-go-name": "Location" }, "name": { + "description": "The name of the organization", "type": "string", "x-go-name": "Name" }, "repo_admin_change_team_access": { + "description": "Whether repository administrators can change team access", "type": "boolean", "x-go-name": "RepoAdminChangeTeamAccess" }, @@ -26341,10 +26726,12 @@ "x-go-name": "UserName" }, "visibility": { + "description": "The visibility level of the organization (public, limited, private)", "type": "string", "x-go-name": "Visibility" }, "website": { + "description": "The website URL of the organization", "type": "string", "x-go-name": "Website" } @@ -26356,22 +26743,27 @@ "type": "object", "properties": { "can_create_repository": { + "description": "Whether the user can create repositories in the organization", "type": "boolean", "x-go-name": "CanCreateRepository" }, "can_read": { + "description": "Whether the user can read the organization", "type": "boolean", "x-go-name": "CanRead" }, "can_write": { + "description": "Whether the user can write to the organization", "type": "boolean", "x-go-name": "CanWrite" }, "is_admin": { + "description": "Whether the user is an admin of the organization", "type": "boolean", "x-go-name": "IsAdmin" }, "is_owner": { + "description": "Whether the user is an owner of the organization", "type": "boolean", "x-go-name": "IsOwner" } @@ -26383,10 +26775,12 @@ "type": "object", "properties": { "label": { + "description": "The display name of the branch", "type": "string", "x-go-name": "Name" }, "ref": { + "description": "The git reference of the branch", "type": "string", "x-go-name": "Ref" }, @@ -26394,11 +26788,13 @@ "$ref": "#/definitions/Repository" }, "repo_id": { + "description": "The unique identifier of the repository", "type": "integer", "format": "int64", "x-go-name": "RepoID" }, "sha": { + "description": "The commit SHA of the branch head", "type": "string", "x-go-name": "Sha" } @@ -26418,15 +26814,18 @@ "$ref": "#/definitions/User" }, "html_url": { + "description": "The HTML URL to view the package", "type": "string", "x-go-name": "HTMLURL" }, "id": { + "description": "The unique identifier of the package", "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { + "description": "The name of the package", "type": "string", "x-go-name": "Name" }, @@ -26437,10 +26836,12 @@ "$ref": "#/definitions/Repository" }, "type": { + "description": "The type of the package (e.g., npm, maven, docker)", "type": "string", "x-go-name": "Type" }, "version": { + "description": "The version of the package", "type": "string", "x-go-name": "Version" } @@ -26452,31 +26853,38 @@ "type": "object", "properties": { "id": { + "description": "The unique identifier of the package file", "type": "integer", "format": "int64", "x-go-name": "ID" }, "md5": { + "description": "The MD5 hash of the package file", "type": "string", "x-go-name": "HashMD5" }, "name": { + "description": "The name of the package file", "type": "string", "x-go-name": "Name" }, "sha1": { + "description": "The SHA1 hash of the package file", "type": "string", "x-go-name": "HashSHA1" }, "sha256": { + "description": "The SHA256 hash of the package file", "type": "string", "x-go-name": "HashSHA256" }, "sha512": { + "description": "The SHA512 hash of the package file", "type": "string", "x-go-name": "HashSHA512" }, "size": { + "description": "The size of the package file in bytes", "type": "integer", "format": "int64", "x-go-name": "Size" @@ -26489,6 +26897,7 @@ "type": "object", "properties": { "added": { + "description": "List of files added in this commit", "type": "array", "items": { "type": "string" @@ -26507,10 +26916,12 @@ "x-go-name": "ID" }, "message": { + "description": "The commit message", "type": "string", "x-go-name": "Message" }, "modified": { + "description": "List of files modified in this commit", "type": "array", "items": { "type": "string" @@ -26518,6 +26929,7 @@ "x-go-name": "Modified" }, "removed": { + "description": "List of files removed in this commit", "type": "array", "items": { "type": "string" @@ -26530,6 +26942,7 @@ "x-go-name": "Timestamp" }, "url": { + "description": "The URL to view this commit", "type": "string", "x-go-name": "URL" }, @@ -26544,14 +26957,17 @@ "type": "object", "properties": { "payload": { + "description": "The signed payload content", "type": "string", "x-go-name": "Payload" }, "reason": { + "description": "The reason for the verification status", "type": "string", "x-go-name": "Reason" }, "signature": { + "description": "The GPG signature of the commit", "type": "string", "x-go-name": "Signature" }, @@ -26559,6 +26975,7 @@ "$ref": "#/definitions/PayloadUser" }, "verified": { + "description": "Whether the commit signature is verified", "type": "boolean", "x-go-name": "Verified" } @@ -26616,36 +27033,44 @@ "x-go-name": "Created" }, "fingerprint": { + "description": "Fingerprint is the key's fingerprint", "type": "string", "x-go-name": "Fingerprint" }, "id": { + "description": "ID is the unique identifier for the public key", "type": "integer", "format": "int64", "x-go-name": "ID" }, "key": { + "description": "Key contains the actual SSH public key content", "type": "string", "x-go-name": "Key" }, "key_type": { + "description": "KeyType indicates the type of the SSH key", "type": "string", "x-go-name": "KeyType" }, "last_used_at": { + "description": "Updated is the time when the key was last used", "type": "string", "format": "date-time", "x-go-name": "Updated" }, "read_only": { + "description": "ReadOnly indicates if the key has read-only access", "type": "boolean", "x-go-name": "ReadOnly" }, "title": { + "description": "Title is the human-readable name for the key", "type": "string", "x-go-name": "Title" }, "url": { + "description": "URL is the API URL for this key", "type": "string", "x-go-name": "URL" }, @@ -26660,11 +27085,13 @@ "type": "object", "properties": { "additions": { + "description": "The number of lines added in the pull request", "type": "integer", "format": "int64", "x-go-name": "Additions" }, "allow_maintainer_edit": { + "description": "Whether maintainers can edit the pull request", "type": "boolean", "x-go-name": "AllowMaintainerEdit" }, @@ -26672,6 +27099,7 @@ "$ref": "#/definitions/User" }, "assignees": { + "description": "The list of users assigned to the pull request", "type": "array", "items": { "$ref": "#/definitions/User" @@ -26682,10 +27110,12 @@ "$ref": "#/definitions/PRBranchInfo" }, "body": { + "description": "The description body of the pull request", "type": "string", "x-go-name": "Body" }, "changed_files": { + "description": "The number of files changed in the pull request", "type": "integer", "format": "int64", "x-go-name": "ChangedFiles" @@ -26696,6 +27126,7 @@ "x-go-name": "Closed" }, "comments": { + "description": "The number of comments on the pull request", "type": "integer", "format": "int64", "x-go-name": "Comments" @@ -26706,15 +27137,18 @@ "x-go-name": "Created" }, "deletions": { + "description": "The number of lines deleted in the pull request", "type": "integer", "format": "int64", "x-go-name": "Deletions" }, "diff_url": { + "description": "The URL to download the diff patch", "type": "string", "x-go-name": "DiffURL" }, "draft": { + "description": "Whether the pull request is a draft", "type": "boolean", "x-go-name": "Draft" }, @@ -26727,19 +27161,23 @@ "$ref": "#/definitions/PRBranchInfo" }, "html_url": { + "description": "The HTML URL to view the pull request", "type": "string", "x-go-name": "HTMLURL" }, "id": { + "description": "The unique identifier of the pull request", "type": "integer", "format": "int64", "x-go-name": "ID" }, "is_locked": { + "description": "Whether the pull request conversation is locked", "type": "boolean", "x-go-name": "IsLocked" }, "labels": { + "description": "The labels attached to the pull request", "type": "array", "items": { "$ref": "#/definitions/Label" @@ -26747,18 +27185,22 @@ "x-go-name": "Labels" }, "merge_base": { + "description": "The merge base commit SHA", "type": "string", "x-go-name": "MergeBase" }, "merge_commit_sha": { + "description": "The SHA of the merge commit", "type": "string", "x-go-name": "MergedCommitID" }, "mergeable": { + "description": "Whether the pull request can be merged", "type": "boolean", "x-go-name": "Mergeable" }, "merged": { + "description": "Whether the pull request has been merged", "type": "boolean", "x-go-name": "HasMerged" }, @@ -26774,20 +27216,24 @@ "$ref": "#/definitions/Milestone" }, "number": { + "description": "The pull request number", "type": "integer", "format": "int64", "x-go-name": "Index" }, "patch_url": { + "description": "The URL to download the patch file", "type": "string", "x-go-name": "PatchURL" }, "pin_order": { + "description": "The pin order for the pull request", "type": "integer", "format": "int64", "x-go-name": "PinOrder" }, "requested_reviewers": { + "description": "The users requested to review the pull request", "type": "array", "items": { "$ref": "#/definitions/User" @@ -26795,6 +27241,7 @@ "x-go-name": "RequestedReviewers" }, "requested_reviewers_teams": { + "description": "The teams requested to review the pull request", "type": "array", "items": { "$ref": "#/definitions/Team" @@ -26811,6 +27258,7 @@ "$ref": "#/definitions/StateType" }, "title": { + "description": "The title of the pull request", "type": "string", "x-go-name": "Title" }, @@ -26820,6 +27268,7 @@ "x-go-name": "Updated" }, "url": { + "description": "The API URL of the pull request", "type": "string", "x-go-name": "URL" }, @@ -26875,6 +27324,7 @@ "x-go-name": "Dismissed" }, "html_url": { + "description": "HTMLURL is the web URL for viewing the review", "type": "string", "x-go-name": "HTMLURL" }, @@ -26888,6 +27338,7 @@ "x-go-name": "Official" }, "pull_request_url": { + "description": "HTMLPullURL is the web URL for the pull request", "type": "string", "x-go-name": "HTMLPullURL" }, @@ -27019,10 +27470,12 @@ "x-go-name": "CreatedUnix" }, "interval": { + "description": "The sync interval for automatic updates", "type": "string", "x-go-name": "Interval" }, "last_error": { + "description": "The last error message encountered during sync", "type": "string", "x-go-name": "LastError" }, @@ -27032,18 +27485,22 @@ "x-go-name": "LastUpdateUnix" }, "remote_address": { + "description": "The remote repository URL being mirrored to", "type": "string", "x-go-name": "RemoteAddress" }, "remote_name": { + "description": "The name of the remote in the git configuration", "type": "string", "x-go-name": "RemoteName" }, "repo_name": { + "description": "The name of the source repository", "type": "string", "x-go-name": "RepoName" }, "sync_on_commit": { + "description": "Whether to sync on every commit", "type": "boolean", "x-go-name": "SyncOnCommit" } @@ -27055,6 +27512,7 @@ "type": "object", "properties": { "content": { + "description": "The reaction content (e.g., emoji or reaction type)", "type": "string", "x-go-name": "Reaction" }, @@ -27077,10 +27535,12 @@ "$ref": "#/definitions/GitObject" }, "ref": { + "description": "The name of the Git reference (e.g., refs/heads/main)", "type": "string", "x-go-name": "Ref" }, "url": { + "description": "The URL to access this Git reference", "type": "string", "x-go-name": "URL" } @@ -27092,6 +27552,7 @@ "type": "object", "properties": { "assets": { + "description": "The files attached to the release", "type": "array", "items": { "$ref": "#/definitions/Attachment" @@ -27102,6 +27563,7 @@ "$ref": "#/definitions/User" }, "body": { + "description": "The release notes or description", "type": "string", "x-go-name": "Note" }, @@ -27111,23 +27573,28 @@ "x-go-name": "CreatedAt" }, "draft": { + "description": "Whether the release is a draft", "type": "boolean", "x-go-name": "IsDraft" }, "html_url": { + "description": "The HTML URL to view the release", "type": "string", "x-go-name": "HTMLURL" }, "id": { + "description": "The unique identifier of the release", "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { + "description": "The display title of the release", "type": "string", "x-go-name": "Title" }, "prerelease": { + "description": "Whether the release is a prerelease", "type": "boolean", "x-go-name": "IsPrerelease" }, @@ -27137,26 +27604,32 @@ "x-go-name": "PublishedAt" }, "tag_name": { + "description": "The name of the git tag associated with the release", "type": "string", "x-go-name": "TagName" }, "tarball_url": { + "description": "The URL to download the tarball archive", "type": "string", "x-go-name": "TarURL" }, "target_commitish": { + "description": "The target commitish for the release", "type": "string", "x-go-name": "Target" }, "upload_url": { + "description": "The URL template for uploading release assets", "type": "string", "x-go-name": "UploadURL" }, "url": { + "description": "The API URL of the release", "type": "string", "x-go-name": "URL" }, "zipball_url": { + "description": "The URL to download the zip archive", "type": "string", "x-go-name": "ZipURL" } @@ -27216,10 +27689,12 @@ "type": "object", "properties": { "permission": { + "description": "Permission level of the collaborator", "type": "string", "x-go-name": "Permission" }, "role_name": { + "description": "RoleName is the name of the permission role", "type": "string", "x-go-name": "RoleName" }, @@ -27240,6 +27715,7 @@ "$ref": "#/definitions/CommitUser" }, "message": { + "description": "Message is the commit message", "type": "string", "x-go-name": "Message" }, @@ -27247,6 +27723,7 @@ "$ref": "#/definitions/CommitMeta" }, "url": { + "description": "URL is the API URL for the commit", "type": "string", "x-go-name": "URL" }, @@ -27608,6 +28085,7 @@ "type": "object", "properties": { "data": { + "description": "Data contains the repository search results", "type": "array", "items": { "$ref": "#/definitions/Repository" @@ -27615,6 +28093,7 @@ "x-go-name": "Data" }, "ok": { + "description": "OK indicates if the search was successful", "type": "boolean", "x-go-name": "OK" } @@ -27648,6 +28127,7 @@ "type": "object", "properties": { "version": { + "description": "Version is the server version string", "type": "string", "x-go-name": "Version" } @@ -27669,27 +28149,33 @@ "x-go-name": "Created" }, "duration": { + "description": "Duration is a human-readable duration string", "type": "string", "x-go-name": "Duration" }, "issue_index": { + "description": "IssueIndex is the index number of the associated issue", "type": "integer", "format": "int64", "x-go-name": "IssueIndex" }, "issue_title": { + "description": "IssueTitle is the title of the associated issue", "type": "string", "x-go-name": "IssueTitle" }, "repo_name": { + "description": "RepoName is the name of the repository", "type": "string", "x-go-name": "RepoName" }, "repo_owner_name": { + "description": "RepoOwnerName is the name of the repository owner", "type": "string", "x-go-name": "RepoOwnerName" }, "seconds": { + "description": "Seconds is the total elapsed time in seconds", "type": "integer", "format": "int64", "x-go-name": "Seconds" @@ -27719,22 +28205,27 @@ "$ref": "#/definitions/CommitMeta" }, "id": { + "description": "The ID (SHA) of the tag", "type": "string", "x-go-name": "ID" }, "message": { + "description": "The message associated with the tag", "type": "string", "x-go-name": "Message" }, "name": { + "description": "The name of the tag", "type": "string", "x-go-name": "Name" }, "tarball_url": { + "description": "The URL to download the tarball archive", "type": "string", "x-go-name": "TarballURL" }, "zipball_url": { + "description": "The URL to download the zipball archive", "type": "string", "x-go-name": "ZipballURL" } @@ -27751,11 +28242,13 @@ "x-go-name": "Created" }, "id": { + "description": "The unique identifier of the tag protection", "type": "integer", "format": "int64", "x-go-name": "ID" }, "name_pattern": { + "description": "The pattern to match tag names for protection", "type": "string", "x-go-name": "NamePattern" }, @@ -27765,6 +28258,7 @@ "x-go-name": "Updated" }, "whitelist_teams": { + "description": "List of team names allowed to create/delete protected tags", "type": "array", "items": { "type": "string" @@ -27772,6 +28266,7 @@ "x-go-name": "WhitelistTeams" }, "whitelist_usernames": { + "description": "List of usernames allowed to create/delete protected tags", "type": "array", "items": { "type": "string" @@ -27786,23 +28281,28 @@ "type": "object", "properties": { "can_create_org_repo": { + "description": "Whether the team can create repositories in the organization", "type": "boolean", "x-go-name": "CanCreateOrgRepo" }, "description": { + "description": "The description of the team", "type": "string", "x-go-name": "Description" }, "id": { + "description": "The unique identifier of the team", "type": "integer", "format": "int64", "x-go-name": "ID" }, "includes_all_repositories": { + "description": "Whether the team has access to all repositories in the organization", "type": "boolean", "x-go-name": "IncludesAllRepositories" }, "name": { + "description": "The name of the team", "type": "string", "x-go-name": "Name" }, @@ -27874,6 +28374,7 @@ "$ref": "#/definitions/Team" }, "body": { + "description": "Body contains the timeline event content", "type": "string", "x-go-name": "Body" }, @@ -27886,15 +28387,18 @@ "$ref": "#/definitions/Issue" }, "html_url": { + "description": "HTMLURL is the web URL for viewing the comment", "type": "string", "x-go-name": "HTMLURL" }, "id": { + "description": "ID is the unique identifier for the timeline comment", "type": "integer", "format": "int64", "x-go-name": "ID" }, "issue_url": { + "description": "IssueURL is the API URL for the issue", "type": "string", "x-go-name": "IssueURL" }, @@ -27934,6 +28438,7 @@ "x-go-name": "ProjectID" }, "pull_request_url": { + "description": "PRURL is the API URL for the pull request (if applicable)", "type": "string", "x-go-name": "PRURL" }, @@ -27969,6 +28474,7 @@ "$ref": "#/definitions/TrackedTime" }, "type": { + "description": "Type indicates the type of timeline event", "type": "string", "x-go-name": "Type" }, @@ -27988,6 +28494,7 @@ "type": "object", "properties": { "topics": { + "description": "List of topic names", "type": "array", "items": { "type": "string" @@ -28002,25 +28509,30 @@ "type": "object", "properties": { "created": { + "description": "The date and time when the topic was created", "type": "string", "format": "date-time", "x-go-name": "Created" }, "id": { + "description": "The unique identifier of the topic", "type": "integer", "format": "int64", "x-go-name": "ID" }, "repo_count": { + "description": "The number of repositories using this topic", "type": "integer", "format": "int64", "x-go-name": "RepoCount" }, "topic_name": { + "description": "The name of the topic", "type": "string", "x-go-name": "Name" }, "updated": { + "description": "The date and time when the topic was last updated", "type": "string", "format": "date-time", "x-go-name": "Updated" @@ -28038,6 +28550,7 @@ "x-go-name": "Created" }, "id": { + "description": "ID is the unique identifier for the tracked time entry", "type": "integer", "format": "int64", "x-go-name": "ID" @@ -28460,26 +28973,32 @@ "type": "object", "properties": { "created_at": { + "description": "The timestamp when the watch status was created", "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "ignored": { + "description": "Whether notifications for the repository are ignored", "type": "boolean", "x-go-name": "Ignored" }, "reason": { + "description": "The reason for the current watch status", "x-go-name": "Reason" }, "repository_url": { + "description": "The URL of the repository being watched", "type": "string", "x-go-name": "RepositoryURL" }, "subscribed": { + "description": "Whether the repository is being watched for notifications", "type": "boolean", "x-go-name": "Subscribed" }, "url": { + "description": "The URL for managing the watch status", "type": "string", "x-go-name": "URL" } @@ -28497,10 +29016,12 @@ "$ref": "#/definitions/CommitUser" }, "message": { + "description": "The commit message", "type": "string", "x-go-name": "Message" }, "sha": { + "description": "The commit SHA hash", "type": "string", "x-go-name": "ID" } @@ -28512,6 +29033,7 @@ "type": "object", "properties": { "commits": { + "description": "The list of wiki commits", "type": "array", "items": { "$ref": "#/definitions/WikiCommit" @@ -28519,6 +29041,7 @@ "x-go-name": "WikiCommits" }, "count": { + "description": "The total count of commits", "type": "integer", "format": "int64", "x-go-name": "Count" @@ -28531,6 +29054,7 @@ "type": "object", "properties": { "commit_count": { + "description": "The number of commits that modified this page", "type": "integer", "format": "int64", "x-go-name": "CommitCount" @@ -28541,10 +29065,12 @@ "x-go-name": "ContentBase64" }, "footer": { + "description": "The footer content for the wiki page", "type": "string", "x-go-name": "Footer" }, "html_url": { + "description": "The HTML URL to view the wiki page", "type": "string", "x-go-name": "HTMLURL" }, @@ -28552,14 +29078,17 @@ "$ref": "#/definitions/WikiCommit" }, "sidebar": { + "description": "The sidebar content for the wiki page", "type": "string", "x-go-name": "Sidebar" }, "sub_url": { + "description": "The sub URL path for the wiki page", "type": "string", "x-go-name": "SubURL" }, "title": { + "description": "The title of the wiki page", "type": "string", "x-go-name": "Title" } @@ -28571,6 +29100,7 @@ "type": "object", "properties": { "html_url": { + "description": "The HTML URL to view the wiki page", "type": "string", "x-go-name": "HTMLURL" }, @@ -28578,10 +29108,12 @@ "$ref": "#/definitions/WikiCommit" }, "sub_url": { + "description": "The sub URL path for the wiki page", "type": "string", "x-go-name": "SubURL" }, "title": { + "description": "The title of the wiki page", "type": "string", "x-go-name": "Title" } From 014612a69972c7c2397733dea366f0969d9f71d0 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 5 Sep 2025 12:27:25 -0700 Subject: [PATCH 2/5] Fix fmt --- modules/structs/activity.go | 24 +-- modules/structs/attachment.go | 14 +- modules/structs/cron.go | 10 +- modules/structs/git_blob.go | 12 +- modules/structs/git_hook.go | 6 +- modules/structs/hook.go | 250 +++++++++++++------------- modules/structs/issue_comment.go | 28 +-- modules/structs/issue_label.go | 12 +- modules/structs/issue_milestone.go | 22 +-- modules/structs/issue_reaction.go | 2 +- modules/structs/issue_stopwatch.go | 14 +- modules/structs/issue_tracked_time.go | 4 +- modules/structs/lfs_lock.go | 22 +-- modules/structs/mirror.go | 16 +- modules/structs/miscellaneous.go | 20 +-- modules/structs/nodeinfo.go | 32 ++-- modules/structs/notifications.go | 28 +-- modules/structs/org.go | 54 +++--- modules/structs/org_team.go | 34 ++-- modules/structs/package.go | 24 +-- modules/structs/pull_review.go | 2 +- modules/structs/release.go | 54 +++--- modules/structs/repo_actions.go | 34 ++-- modules/structs/repo_branch.go | 22 +-- modules/structs/repo_collaborator.go | 4 +- modules/structs/repo_commit.go | 28 +-- modules/structs/repo_file.go | 56 +++--- modules/structs/repo_key.go | 14 +- modules/structs/repo_note.go | 4 +- modules/structs/repo_refs.go | 8 +- modules/structs/repo_tag.go | 44 ++--- modules/structs/repo_topic.go | 10 +- modules/structs/repo_tree.go | 18 +- modules/structs/repo_watch.go | 12 +- modules/structs/repo_wiki.go | 20 +-- modules/structs/settings.go | 28 +-- modules/structs/status.go | 36 ++-- modules/structs/user_app.go | 38 ++-- modules/structs/user_email.go | 8 +- modules/structs/user_gpgkey.go | 30 ++-- modules/structs/user_key.go | 18 +- 41 files changed, 558 insertions(+), 558 deletions(-) diff --git a/modules/structs/activity.go b/modules/structs/activity.go index 7f664c874eb8c..9085495593a8e 100644 --- a/modules/structs/activity.go +++ b/modules/structs/activity.go @@ -7,31 +7,31 @@ import "time" type Activity struct { // The unique identifier of the activity - ID int64 `json:"id"` + ID int64 `json:"id"` // The ID of the user who receives/sees this activity UserID int64 `json:"user_id"` // Receiver user // the type of action // // enum: create_repo,rename_repo,star_repo,watch_repo,commit_repo,create_issue,create_pull_request,transfer_repo,push_tag,comment_issue,merge_pull_request,close_issue,reopen_issue,close_pull_request,reopen_pull_request,delete_tag,delete_branch,mirror_sync_push,mirror_sync_create,mirror_sync_delete,approve_pull_request,reject_pull_request,comment_pull,publish_release,pull_review_dismissed,pull_request_ready_for_review,auto_merge_pull_request - OpType string `json:"op_type"` + OpType string `json:"op_type"` // The ID of the user who performed the action - ActUserID int64 `json:"act_user_id"` + ActUserID int64 `json:"act_user_id"` // The user who performed the action - ActUser *User `json:"act_user"` + ActUser *User `json:"act_user"` // The ID of the repository associated with the activity - RepoID int64 `json:"repo_id"` + RepoID int64 `json:"repo_id"` // The repository associated with the activity - Repo *Repository `json:"repo"` + Repo *Repository `json:"repo"` // The ID of the comment associated with the activity (if applicable) - CommentID int64 `json:"comment_id"` + CommentID int64 `json:"comment_id"` // The comment associated with the activity (if applicable) - Comment *Comment `json:"comment"` + Comment *Comment `json:"comment"` // The name of the git reference (branch/tag) associated with the activity - RefName string `json:"ref_name"` + RefName string `json:"ref_name"` // Whether this activity is from a private repository - IsPrivate bool `json:"is_private"` + IsPrivate bool `json:"is_private"` // Additional content or details about the activity - Content string `json:"content"` + Content string `json:"content"` // The date and time when the activity occurred - Created time.Time `json:"created"` + Created time.Time `json:"created"` } diff --git a/modules/structs/attachment.go b/modules/structs/attachment.go index eee381d47c469..e9499d2ee7d6e 100644 --- a/modules/structs/attachment.go +++ b/modules/structs/attachment.go @@ -11,20 +11,20 @@ import ( // swagger:model type Attachment struct { // ID is the unique identifier for the attachment - ID int64 `json:"id"` + ID int64 `json:"id"` // Name is the filename of the attachment - Name string `json:"name"` + Name string `json:"name"` // Size is the file size in bytes - Size int64 `json:"size"` + Size int64 `json:"size"` // DownloadCount is the number of times the attachment has been downloaded - DownloadCount int64 `json:"download_count"` + DownloadCount int64 `json:"download_count"` // swagger:strfmt date-time // Created is the time when the attachment was uploaded - Created time.Time `json:"created_at"` + Created time.Time `json:"created_at"` // UUID is the unique identifier for the attachment file - UUID string `json:"uuid"` + UUID string `json:"uuid"` // DownloadURL is the URL to download the attachment - DownloadURL string `json:"browser_download_url"` + DownloadURL string `json:"browser_download_url"` } // EditAttachmentOptions options for editing attachments diff --git a/modules/structs/cron.go b/modules/structs/cron.go index 299b0b0f61e67..49fc4638080b4 100644 --- a/modules/structs/cron.go +++ b/modules/structs/cron.go @@ -8,13 +8,13 @@ import "time" // Cron represents a Cron task type Cron struct { // The name of the cron task - Name string `json:"name"` + Name string `json:"name"` // The cron schedule expression (e.g., "0 0 * * *") - Schedule string `json:"schedule"` + Schedule string `json:"schedule"` // The next scheduled execution time - Next time.Time `json:"next"` + Next time.Time `json:"next"` // The previous execution time - Prev time.Time `json:"prev"` + Prev time.Time `json:"prev"` // The total number of times this cron task has been executed - ExecTimes int64 `json:"exec_times"` + ExecTimes int64 `json:"exec_times"` } diff --git a/modules/structs/git_blob.go b/modules/structs/git_blob.go index b7700dfaf727b..3c12eb8fb33a3 100644 --- a/modules/structs/git_blob.go +++ b/modules/structs/git_blob.go @@ -6,18 +6,18 @@ package structs // GitBlobResponse represents a git blob type GitBlobResponse struct { // The content of the git blob (may be base64 encoded) - Content *string `json:"content"` + Content *string `json:"content"` // The encoding used for the content (e.g., "base64") Encoding *string `json:"encoding"` // The URL to access this git blob - URL string `json:"url"` + URL string `json:"url"` // The SHA hash of the git blob - SHA string `json:"sha"` + SHA string `json:"sha"` // The size of the git blob in bytes - Size int64 `json:"size"` + Size int64 `json:"size"` // The LFS object ID if this blob is stored in LFS - LfsOid *string `json:"lfs_oid,omitempty"` + LfsOid *string `json:"lfs_oid,omitempty"` // The size of the LFS object if this blob is stored in LFS - LfsSize *int64 `json:"lfs_size,omitempty"` + LfsSize *int64 `json:"lfs_size,omitempty"` } diff --git a/modules/structs/git_hook.go b/modules/structs/git_hook.go index eb2c37ff8f329..c11e2acbdc2a6 100644 --- a/modules/structs/git_hook.go +++ b/modules/structs/git_hook.go @@ -6,11 +6,11 @@ package structs // GitHook represents a Git repository hook type GitHook struct { // Name is the name of the Git hook - Name string `json:"name"` + Name string `json:"name"` // IsActive indicates if the hook is active - IsActive bool `json:"is_active"` + IsActive bool `json:"is_active"` // Content contains the script content of the hook - Content string `json:"content,omitempty"` + Content string `json:"content,omitempty"` } // GitHookList represents a list of Git hooks diff --git a/modules/structs/hook.go b/modules/structs/hook.go index 5f8930665ccc5..776e44ccec54d 100644 --- a/modules/structs/hook.go +++ b/modules/structs/hook.go @@ -18,21 +18,21 @@ var ErrInvalidReceiveHook = errors.New("Invalid JSON payload received over webho // Hook a hook is a web hook when one repository changed type Hook struct { // The unique identifier of the webhook - ID int64 `json:"id"` + ID int64 `json:"id"` // The type of the webhook (e.g., gitea, slack, discord) - Type string `json:"type"` + Type string `json:"type"` // Branch filter pattern to determine which branches trigger the webhook - BranchFilter string `json:"branch_filter"` + BranchFilter string `json:"branch_filter"` // The URL of the webhook endpoint (hidden in JSON) - URL string `json:"-"` + URL string `json:"-"` // Configuration settings for the webhook - Config map[string]string `json:"config"` + Config map[string]string `json:"config"` // List of events that trigger this webhook - Events []string `json:"events"` + Events []string `json:"events"` // Authorization header to include in webhook requests - AuthorizationHeader string `json:"authorization_header"` + AuthorizationHeader string `json:"authorization_header"` // Whether the webhook is active and will be triggered - Active bool `json:"active"` + Active bool `json:"active"` // swagger:strfmt date-time // The date and time when the webhook was last updated Updated time.Time `json:"updated_at"` @@ -56,13 +56,13 @@ type CreateHookOption struct { Type string `json:"type" binding:"Required"` // required: true // Configuration settings for the webhook - Config CreateHookOptionConfig `json:"config" binding:"Required"` + Config CreateHookOptionConfig `json:"config" binding:"Required"` // List of events that will trigger this webhook - Events []string `json:"events"` + Events []string `json:"events"` // Branch filter pattern to determine which branches trigger the webhook - BranchFilter string `json:"branch_filter" binding:"GlobPattern"` + BranchFilter string `json:"branch_filter" binding:"GlobPattern"` // Authorization header to include in webhook requests - AuthorizationHeader string `json:"authorization_header"` + AuthorizationHeader string `json:"authorization_header"` // default: false // Whether the webhook should be active upon creation Active bool `json:"active"` @@ -71,15 +71,15 @@ type CreateHookOption struct { // EditHookOption options when modify one hook type EditHookOption struct { // Configuration settings for the webhook - Config map[string]string `json:"config"` + Config map[string]string `json:"config"` // List of events that trigger this webhook - Events []string `json:"events"` + Events []string `json:"events"` // Branch filter pattern to determine which branches trigger the webhook - BranchFilter string `json:"branch_filter" binding:"GlobPattern"` + BranchFilter string `json:"branch_filter" binding:"GlobPattern"` // Authorization header to include in webhook requests - AuthorizationHeader string `json:"authorization_header"` + AuthorizationHeader string `json:"authorization_header"` // Whether the webhook is active and will be triggered - Active *bool `json:"active"` + Active *bool `json:"active"` } // Payloader payload is some part of one hook @@ -103,40 +103,40 @@ type PayloadUser struct { // PayloadCommit represents a commit type PayloadCommit struct { // sha1 hash of the commit - ID string `json:"id"` + ID string `json:"id"` // The commit message - Message string `json:"message"` + Message string `json:"message"` // The URL to view this commit - URL string `json:"url"` + URL string `json:"url"` // The author of the commit - Author *PayloadUser `json:"author"` + Author *PayloadUser `json:"author"` // The committer of the commit - Committer *PayloadUser `json:"committer"` + Committer *PayloadUser `json:"committer"` // GPG verification information for the commit Verification *PayloadCommitVerification `json:"verification"` // swagger:strfmt date-time // The timestamp when the commit was made Timestamp time.Time `json:"timestamp"` // List of files added in this commit - Added []string `json:"added"` + Added []string `json:"added"` // List of files removed in this commit - Removed []string `json:"removed"` + Removed []string `json:"removed"` // List of files modified in this commit - Modified []string `json:"modified"` + Modified []string `json:"modified"` } // PayloadCommitVerification represents the GPG verification of a commit type PayloadCommitVerification struct { // Whether the commit signature is verified - Verified bool `json:"verified"` + Verified bool `json:"verified"` // The reason for the verification status - Reason string `json:"reason"` + Reason string `json:"reason"` // The GPG signature of the commit - Signature string `json:"signature"` + Signature string `json:"signature"` // The user who signed the commit - Signer *PayloadUser `json:"signer"` + Signer *PayloadUser `json:"signer"` // The signed payload content - Payload string `json:"payload"` + Payload string `json:"payload"` } var ( @@ -155,15 +155,15 @@ var ( // CreatePayload represents a payload information of create event. type CreatePayload struct { // The SHA hash of the created reference - Sha string `json:"sha"` + Sha string `json:"sha"` // The full name of the created reference - Ref string `json:"ref"` + Ref string `json:"ref"` // The type of reference created (branch or tag) - RefType string `json:"ref_type"` + RefType string `json:"ref_type"` // The repository where the reference was created - Repo *Repository `json:"repository"` + Repo *Repository `json:"repository"` // The user who created the reference - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload return payload information @@ -202,15 +202,15 @@ const ( // DeletePayload represents delete payload type DeletePayload struct { // The name of the deleted reference - Ref string `json:"ref"` + Ref string `json:"ref"` // The type of reference deleted (branch or tag) - RefType string `json:"ref_type"` + RefType string `json:"ref_type"` // The type of entity that performed the deletion - PusherType PusherType `json:"pusher_type"` + PusherType PusherType `json:"pusher_type"` // The repository where the reference was deleted - Repo *Repository `json:"repository"` + Repo *Repository `json:"repository"` // The user who deleted the reference - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload implements Payload @@ -223,9 +223,9 @@ type ForkPayload struct { // The forked repository (the new fork) Forkee *Repository `json:"forkee"` // The original repository that was forked - Repo *Repository `json:"repository"` + Repo *Repository `json:"repository"` // The user who created the fork - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload implements Payload @@ -246,21 +246,21 @@ const ( // IssueCommentPayload represents a payload information of issue comment event. type IssueCommentPayload struct { // The action performed on the comment (created, edited, deleted) - Action HookIssueCommentAction `json:"action"` + Action HookIssueCommentAction `json:"action"` // The issue that the comment belongs to - Issue *Issue `json:"issue"` + Issue *Issue `json:"issue"` // The pull request if the comment is on a pull request - PullRequest *PullRequest `json:"pull_request,omitempty"` + PullRequest *PullRequest `json:"pull_request,omitempty"` // The comment that was acted upon - Comment *Comment `json:"comment"` + Comment *Comment `json:"comment"` // Changes made to the comment (for edit actions) - Changes *ChangesPayload `json:"changes,omitempty"` + Changes *ChangesPayload `json:"changes,omitempty"` // The repository containing the issue/pull request - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The user who performed the action - Sender *User `json:"sender"` + Sender *User `json:"sender"` // Whether this comment is on a pull request - IsPull bool `json:"is_pull"` + IsPull bool `json:"is_pull"` } // JSONPayload implements Payload @@ -281,13 +281,13 @@ const ( // ReleasePayload represents a payload information of release event. type ReleasePayload struct { // The action performed on the release (published, updated, deleted) - Action HookReleaseAction `json:"action"` + Action HookReleaseAction `json:"action"` // The release that was acted upon - Release *Release `json:"release"` + Release *Release `json:"release"` // The repository containing the release - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The user who performed the action - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload implements Payload @@ -298,25 +298,25 @@ func (p *ReleasePayload) JSONPayload() ([]byte, error) { // PushPayload represents a payload information of push event. type PushPayload struct { // The full name of the pushed reference - Ref string `json:"ref"` + Ref string `json:"ref"` // The SHA of the most recent commit before the push - Before string `json:"before"` + Before string `json:"before"` // The SHA of the most recent commit after the push - After string `json:"after"` + After string `json:"after"` // URL to compare the changes in this push - CompareURL string `json:"compare_url"` + CompareURL string `json:"compare_url"` // List of commits included in the push - Commits []*PayloadCommit `json:"commits"` + Commits []*PayloadCommit `json:"commits"` // Total number of commits in the push - TotalCommits int `json:"total_commits"` + TotalCommits int `json:"total_commits"` // The most recent commit in the push - HeadCommit *PayloadCommit `json:"head_commit"` + HeadCommit *PayloadCommit `json:"head_commit"` // The repository that was pushed to - Repo *Repository `json:"repository"` + Repo *Repository `json:"repository"` // The user who performed the push - Pusher *User `json:"pusher"` + Pusher *User `json:"pusher"` // The user who triggered the webhook - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload FIXME @@ -384,19 +384,19 @@ const ( // IssuePayload represents the payload information that is sent along with an issue event. type IssuePayload struct { // The action performed on the issue - Action HookIssueAction `json:"action"` + Action HookIssueAction `json:"action"` // The index number of the issue - Index int64 `json:"number"` + Index int64 `json:"number"` // Changes made to the issue (for edit actions) - Changes *ChangesPayload `json:"changes,omitempty"` + Changes *ChangesPayload `json:"changes,omitempty"` // The issue that was acted upon - Issue *Issue `json:"issue"` + Issue *Issue `json:"issue"` // The repository containing the issue - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The user who performed the action - Sender *User `json:"sender"` + Sender *User `json:"sender"` // The commit ID related to the issue action - CommitID string `json:"commit_id"` + CommitID string `json:"commit_id"` } // JSONPayload encodes the IssuePayload to JSON, with an indentation of two spaces. @@ -415,31 +415,31 @@ type ChangesPayload struct { // Changes made to the title Title *ChangesFromPayload `json:"title,omitempty"` // Changes made to the body/description - Body *ChangesFromPayload `json:"body,omitempty"` + Body *ChangesFromPayload `json:"body,omitempty"` // Changes made to the reference - Ref *ChangesFromPayload `json:"ref,omitempty"` + Ref *ChangesFromPayload `json:"ref,omitempty"` } // PullRequestPayload represents a payload information of pull request event. type PullRequestPayload struct { // The action performed on the pull request - Action HookIssueAction `json:"action"` + Action HookIssueAction `json:"action"` // The index number of the pull request - Index int64 `json:"number"` + Index int64 `json:"number"` // Changes made to the pull request (for edit actions) - Changes *ChangesPayload `json:"changes,omitempty"` + Changes *ChangesPayload `json:"changes,omitempty"` // The pull request that was acted upon - PullRequest *PullRequest `json:"pull_request"` + PullRequest *PullRequest `json:"pull_request"` // The reviewer that was requested (for review request actions) - RequestedReviewer *User `json:"requested_reviewer"` + RequestedReviewer *User `json:"requested_reviewer"` // The repository containing the pull request - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The user who performed the action - Sender *User `json:"sender"` + Sender *User `json:"sender"` // The commit ID related to the pull request action - CommitID string `json:"commit_id"` + CommitID string `json:"commit_id"` // The review information (for review actions) - Review *ReviewPayload `json:"review"` + Review *ReviewPayload `json:"review"` } // JSONPayload FIXME @@ -450,7 +450,7 @@ func (p *PullRequestPayload) JSONPayload() ([]byte, error) { // ReviewPayload FIXME type ReviewPayload struct { // The type of review (approved, rejected, comment) - Type string `json:"type"` + Type string `json:"type"` // The content/body of the review Content string `json:"content"` } @@ -470,15 +470,15 @@ const ( // WikiPayload payload for repository webhooks type WikiPayload struct { // The action performed on the wiki page - Action HookWikiAction `json:"action"` + Action HookWikiAction `json:"action"` // The repository containing the wiki - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The user who performed the action - Sender *User `json:"sender"` + Sender *User `json:"sender"` // The name of the wiki page - Page string `json:"page"` + Page string `json:"page"` // The comment/commit message for the wiki change - Comment string `json:"comment"` + Comment string `json:"comment"` } // JSONPayload JSON representation of the payload @@ -499,13 +499,13 @@ const ( // RepositoryPayload payload for repository webhooks type RepositoryPayload struct { // The action performed on the repository - Action HookRepoAction `json:"action"` + Action HookRepoAction `json:"action"` // The repository that was acted upon - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The organization that owns the repository (if applicable) - Organization *User `json:"organization"` + Organization *User `json:"organization"` // The user who performed the action - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload JSON representation of the payload @@ -526,15 +526,15 @@ const ( // PackagePayload represents a package payload type PackagePayload struct { // The action performed on the package - Action HookPackageAction `json:"action"` + Action HookPackageAction `json:"action"` // The repository associated with the package - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The package that was acted upon - Package *Package `json:"package"` + Package *Package `json:"package"` // The organization that owns the package (if applicable) - Organization *Organization `json:"organization"` + Organization *Organization `json:"organization"` // The user who performed the action - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload implements Payload @@ -545,15 +545,15 @@ func (p *PackagePayload) JSONPayload() ([]byte, error) { // WorkflowDispatchPayload represents a workflow dispatch payload type WorkflowDispatchPayload struct { // The name or path of the workflow file - Workflow string `json:"workflow"` + Workflow string `json:"workflow"` // The git reference (branch, tag, or commit SHA) to run the workflow on - Ref string `json:"ref"` + Ref string `json:"ref"` // Input parameters for the workflow dispatch event - Inputs map[string]any `json:"inputs"` + Inputs map[string]any `json:"inputs"` // The repository containing the workflow - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // The user who triggered the workflow dispatch - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload implements Payload @@ -565,26 +565,26 @@ func (p *WorkflowDispatchPayload) JSONPayload() ([]byte, error) { type CommitStatusPayload struct { // TODO: add Branches per https://docs.github.com/en/webhooks/webhook-events-and-payloads#status // The commit that the status is associated with - Commit *PayloadCommit `json:"commit"` + Commit *PayloadCommit `json:"commit"` // The context/identifier for this status check - Context string `json:"context"` + Context string `json:"context"` // swagger:strfmt date-time // The date and time when the status was created - CreatedAt time.Time `json:"created_at"` + CreatedAt time.Time `json:"created_at"` // A short description of the status - Description string `json:"description"` + Description string `json:"description"` // The unique identifier of the status - ID int64 `json:"id"` + ID int64 `json:"id"` // The repository containing the commit - Repo *Repository `json:"repository"` + Repo *Repository `json:"repository"` // The user who created the status - Sender *User `json:"sender"` + Sender *User `json:"sender"` // The SHA hash of the commit - SHA string `json:"sha"` + SHA string `json:"sha"` // The state of the status (pending, success, error, failure) - State string `json:"state"` + State string `json:"state"` // The target URL to associate with this status - TargetURL string `json:"target_url"` + TargetURL string `json:"target_url"` // swagger:strfmt date-time // The date and time when the status was last updated UpdatedAt *time.Time `json:"updated_at"` @@ -598,19 +598,19 @@ func (p *CommitStatusPayload) JSONPayload() ([]byte, error) { // WorkflowRunPayload represents a payload information of workflow run event. type WorkflowRunPayload struct { // The action performed on the workflow run - Action string `json:"action"` + Action string `json:"action"` // The workflow definition - Workflow *ActionWorkflow `json:"workflow"` + Workflow *ActionWorkflow `json:"workflow"` // The workflow run that was acted upon - WorkflowRun *ActionWorkflowRun `json:"workflow_run"` + WorkflowRun *ActionWorkflowRun `json:"workflow_run"` // The pull request associated with the workflow run (if applicable) - PullRequest *PullRequest `json:"pull_request,omitempty"` + PullRequest *PullRequest `json:"pull_request,omitempty"` // The organization that owns the repository (if applicable) - Organization *Organization `json:"organization,omitempty"` + Organization *Organization `json:"organization,omitempty"` // The repository containing the workflow - Repo *Repository `json:"repository"` + Repo *Repository `json:"repository"` // The user who triggered the workflow run - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload implements Payload @@ -621,17 +621,17 @@ func (p *WorkflowRunPayload) JSONPayload() ([]byte, error) { // WorkflowJobPayload represents a payload information of workflow job event. type WorkflowJobPayload struct { // The action performed on the workflow job - Action string `json:"action"` + Action string `json:"action"` // The workflow job that was acted upon - WorkflowJob *ActionWorkflowJob `json:"workflow_job"` + WorkflowJob *ActionWorkflowJob `json:"workflow_job"` // The pull request associated with the workflow job (if applicable) - PullRequest *PullRequest `json:"pull_request,omitempty"` + PullRequest *PullRequest `json:"pull_request,omitempty"` // The organization that owns the repository (if applicable) - Organization *Organization `json:"organization,omitempty"` + Organization *Organization `json:"organization,omitempty"` // The repository containing the workflow - Repo *Repository `json:"repository"` + Repo *Repository `json:"repository"` // The user who triggered the workflow job - Sender *User `json:"sender"` + Sender *User `json:"sender"` } // JSONPayload implements Payload diff --git a/modules/structs/issue_comment.go b/modules/structs/issue_comment.go index 00828fcd6930f..5223602e1a625 100644 --- a/modules/structs/issue_comment.go +++ b/modules/structs/issue_comment.go @@ -10,23 +10,23 @@ import ( // Comment represents a comment on a commit or issue type Comment struct { // ID is the unique identifier for the comment - ID int64 `json:"id"` + ID int64 `json:"id"` // HTMLURL is the web URL for viewing the comment - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // PRURL is the API URL for the pull request (if applicable) - PRURL string `json:"pull_request_url"` + PRURL string `json:"pull_request_url"` // IssueURL is the API URL for the issue - IssueURL string `json:"issue_url"` + IssueURL string `json:"issue_url"` // Poster is the user who posted the comment - Poster *User `json:"user"` + Poster *User `json:"user"` // OriginalAuthor is the original author name (for imported comments) - OriginalAuthor string `json:"original_author"` + OriginalAuthor string `json:"original_author"` // OriginalAuthorID is the original author ID (for imported comments) - OriginalAuthorID int64 `json:"original_author_id"` + OriginalAuthorID int64 `json:"original_author_id"` // Body contains the comment text content - Body string `json:"body"` + Body string `json:"body"` // Attachments contains files attached to the comment - Attachments []*Attachment `json:"assets"` + Attachments []*Attachment `json:"assets"` // swagger:strfmt date-time Created time.Time `json:"created_at"` // swagger:strfmt date-time @@ -50,20 +50,20 @@ type EditIssueCommentOption struct { // TimelineComment represents a timeline comment (comment of any type) on a commit or issue type TimelineComment struct { // ID is the unique identifier for the timeline comment - ID int64 `json:"id"` + ID int64 `json:"id"` // Type indicates the type of timeline event Type string `json:"type"` // HTMLURL is the web URL for viewing the comment - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // PRURL is the API URL for the pull request (if applicable) - PRURL string `json:"pull_request_url"` + PRURL string `json:"pull_request_url"` // IssueURL is the API URL for the issue IssueURL string `json:"issue_url"` // Poster is the user who created the timeline event - Poster *User `json:"user"` + Poster *User `json:"user"` // Body contains the timeline event content - Body string `json:"body"` + Body string `json:"body"` // swagger:strfmt date-time Created time.Time `json:"created_at"` // swagger:strfmt date-time diff --git a/modules/structs/issue_label.go b/modules/structs/issue_label.go index e110b31aa7d3b..16bd0b3c94a31 100644 --- a/modules/structs/issue_label.go +++ b/modules/structs/issue_label.go @@ -8,7 +8,7 @@ package structs // swagger:model type Label struct { // ID is the unique identifier for the label - ID int64 `json:"id"` + ID int64 `json:"id"` // Name is the display name of the label Name string `json:"name"` // example: false @@ -16,11 +16,11 @@ type Label struct { // example: false IsArchived bool `json:"is_archived"` // example: 00aabb - Color string `json:"color"` + Color string `json:"color"` // Description provides additional context about the label's purpose Description string `json:"description"` // URL is the API endpoint for accessing this label - URL string `json:"url"` + URL string `json:"url"` } // CreateLabelOption options for creating a label @@ -32,7 +32,7 @@ type CreateLabelOption struct { Exclusive bool `json:"exclusive"` // required:true // example: #00aabb - Color string `json:"color" binding:"Required"` + Color string `json:"color" binding:"Required"` // Description provides additional context about the label's purpose Description string `json:"description"` // example: false @@ -46,7 +46,7 @@ type EditLabelOption struct { // example: false Exclusive *bool `json:"exclusive"` // example: #00aabb - Color *string `json:"color"` + Color *string `json:"color"` // Description provides additional context about the label's purpose Description *string `json:"description"` // example: false @@ -67,7 +67,7 @@ type LabelTemplate struct { // example: false Exclusive bool `json:"exclusive"` // example: 00aabb - Color string `json:"color"` + Color string `json:"color"` // Description provides additional context about the label template's purpose Description string `json:"description"` } diff --git a/modules/structs/issue_milestone.go b/modules/structs/issue_milestone.go index f38664e214efa..226c613d47be6 100644 --- a/modules/structs/issue_milestone.go +++ b/modules/structs/issue_milestone.go @@ -10,17 +10,17 @@ import ( // Milestone milestone is a collection of issues on one repository type Milestone struct { // ID is the unique identifier for the milestone - ID int64 `json:"id"` + ID int64 `json:"id"` // Title is the title of the milestone - Title string `json:"title"` + Title string `json:"title"` // Description provides details about the milestone - Description string `json:"description"` + Description string `json:"description"` // State indicates if the milestone is open or closed - State StateType `json:"state"` + State StateType `json:"state"` // OpenIssues is the number of open issues in this milestone - OpenIssues int `json:"open_issues"` + OpenIssues int `json:"open_issues"` // ClosedIssues is the number of closed issues in this milestone - ClosedIssues int `json:"closed_issues"` + ClosedIssues int `json:"closed_issues"` // swagger:strfmt date-time Created time.Time `json:"created_at"` // swagger:strfmt date-time @@ -34,7 +34,7 @@ type Milestone struct { // CreateMilestoneOption options for creating a milestone type CreateMilestoneOption struct { // Title is the title of the new milestone - Title string `json:"title"` + Title string `json:"title"` // Description provides details about the milestone Description string `json:"description"` // swagger:strfmt date-time @@ -48,11 +48,11 @@ type CreateMilestoneOption struct { // EditMilestoneOption options for editing a milestone type EditMilestoneOption struct { // Title is the updated title of the milestone - Title string `json:"title"` + Title string `json:"title"` // Description provides updated details about the milestone - Description *string `json:"description"` + Description *string `json:"description"` // State indicates the updated state of the milestone - State *string `json:"state"` + State *string `json:"state"` // Deadline is the updated due date for the milestone - Deadline *time.Time `json:"due_on"` + Deadline *time.Time `json:"due_on"` } diff --git a/modules/structs/issue_reaction.go b/modules/structs/issue_reaction.go index 538946170d506..d611b5bc67dcf 100644 --- a/modules/structs/issue_reaction.go +++ b/modules/structs/issue_reaction.go @@ -16,7 +16,7 @@ type EditReactionOption struct { // Reaction contain one reaction type Reaction struct { // The user who created the reaction - User *User `json:"user"` + User *User `json:"user"` // The reaction content (e.g., emoji or reaction type) Reaction string `json:"content"` // swagger:strfmt date-time diff --git a/modules/structs/issue_stopwatch.go b/modules/structs/issue_stopwatch.go index a99dbcfd4c510..77c41593efe1a 100644 --- a/modules/structs/issue_stopwatch.go +++ b/modules/structs/issue_stopwatch.go @@ -11,19 +11,19 @@ import ( type StopWatch struct { // swagger:strfmt date-time // Created is the time when the stopwatch was started - Created time.Time `json:"created"` + Created time.Time `json:"created"` // Seconds is the total elapsed time in seconds - Seconds int64 `json:"seconds"` + Seconds int64 `json:"seconds"` // Duration is a human-readable duration string - Duration string `json:"duration"` + Duration string `json:"duration"` // IssueIndex is the index number of the associated issue - IssueIndex int64 `json:"issue_index"` + IssueIndex int64 `json:"issue_index"` // IssueTitle is the title of the associated issue - IssueTitle string `json:"issue_title"` + IssueTitle string `json:"issue_title"` // RepoOwnerName is the name of the repository owner - RepoOwnerName string `json:"repo_owner_name"` + RepoOwnerName string `json:"repo_owner_name"` // RepoName is the name of the repository - RepoName string `json:"repo_name"` + RepoName string `json:"repo_name"` } // StopWatches represent a list of stopwatches diff --git a/modules/structs/issue_tracked_time.go b/modules/structs/issue_tracked_time.go index 2f7da24cf275b..b59f0598f80a4 100644 --- a/modules/structs/issue_tracked_time.go +++ b/modules/structs/issue_tracked_time.go @@ -31,9 +31,9 @@ type TrackedTime struct { // username of the user UserName string `json:"user_name"` // deprecated (only for backwards compatibility) - IssueID int64 `json:"issue_id"` + IssueID int64 `json:"issue_id"` // Issue contains the associated issue information - Issue *Issue `json:"issue"` + Issue *Issue `json:"issue"` } // TrackedTimeList represents a list of tracked times diff --git a/modules/structs/lfs_lock.go b/modules/structs/lfs_lock.go index c05abb78969b3..2f226e91abeed 100644 --- a/modules/structs/lfs_lock.go +++ b/modules/structs/lfs_lock.go @@ -11,13 +11,13 @@ import ( // for use with the locks API. type LFSLock struct { // The unique identifier of the lock - ID string `json:"id"` + ID string `json:"id"` // The file path that is locked - Path string `json:"path"` + Path string `json:"path"` // The timestamp when the lock was created - LockedAt time.Time `json:"locked_at"` + LockedAt time.Time `json:"locked_at"` // The owner of the lock - Owner *LFSLockOwner `json:"owner"` + Owner *LFSLockOwner `json:"owner"` } // LFSLockOwner represent a lock owner @@ -47,30 +47,30 @@ type LFSLockList struct { // The list of locks Locks []*LFSLock `json:"locks"` // The cursor for pagination to the next set of results - Next string `json:"next_cursor,omitempty"` + Next string `json:"next_cursor,omitempty"` } // LFSLockListVerify represent a list of lock verification requested // https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md#list-locks-for-verification type LFSLockListVerify struct { // Locks owned by the requesting user - Ours []*LFSLock `json:"ours"` + Ours []*LFSLock `json:"ours"` // Locks owned by other users Theirs []*LFSLock `json:"theirs"` // The cursor for pagination to the next set of results - Next string `json:"next_cursor,omitempty"` + Next string `json:"next_cursor,omitempty"` } // LFSLockError contains information on the error that occurs type LFSLockError struct { // The error message - Message string `json:"message"` + Message string `json:"message"` // The lock related to the error, if any - Lock *LFSLock `json:"lock,omitempty"` + Lock *LFSLock `json:"lock,omitempty"` // URL to documentation about the error - Documentation string `json:"documentation_url,omitempty"` + Documentation string `json:"documentation_url,omitempty"` // The request ID for debugging purposes - RequestID string `json:"request_id,omitempty"` + RequestID string `json:"request_id,omitempty"` } // LFSLockDeleteRequest contains params of a delete request diff --git a/modules/structs/mirror.go b/modules/structs/mirror.go index 49559f64f659e..50b0a5d2ccccb 100644 --- a/modules/structs/mirror.go +++ b/modules/structs/mirror.go @@ -8,24 +8,24 @@ import "time" // CreatePushMirrorOption represents need information to create a push mirror of a repository. type CreatePushMirrorOption struct { // The remote repository URL to push to - RemoteAddress string `json:"remote_address"` + RemoteAddress string `json:"remote_address"` // The username for authentication with the remote repository RemoteUsername string `json:"remote_username"` // The password for authentication with the remote repository RemotePassword string `json:"remote_password"` // The sync interval for automatic updates - Interval string `json:"interval"` + Interval string `json:"interval"` // Whether to sync on every commit - SyncOnCommit bool `json:"sync_on_commit"` + SyncOnCommit bool `json:"sync_on_commit"` } // PushMirror represents information of a push mirror // swagger:model type PushMirror struct { // The name of the source repository - RepoName string `json:"repo_name"` + RepoName string `json:"repo_name"` // The name of the remote in the git configuration - RemoteName string `json:"remote_name"` + RemoteName string `json:"remote_name"` // The remote repository URL being mirrored to RemoteAddress string `json:"remote_address"` // swagger:strfmt date-time @@ -33,9 +33,9 @@ type PushMirror struct { // swagger:strfmt date-time LastUpdateUnix *time.Time `json:"last_update"` // The last error message encountered during sync - LastError string `json:"last_error"` + LastError string `json:"last_error"` // The sync interval for automatic updates - Interval string `json:"interval"` + Interval string `json:"interval"` // Whether to sync on every commit - SyncOnCommit bool `json:"sync_on_commit"` + SyncOnCommit bool `json:"sync_on_commit"` } diff --git a/modules/structs/miscellaneous.go b/modules/structs/miscellaneous.go index 92a10cb98d351..293ba99579a11 100644 --- a/modules/structs/miscellaneous.go +++ b/modules/structs/miscellaneous.go @@ -6,7 +6,7 @@ package structs // SearchResults results of a successful search type SearchResults struct { // OK indicates if the search was successful - OK bool `json:"ok"` + OK bool `json:"ok"` // Data contains the repository search results Data []*Repository `json:"data"` } @@ -14,7 +14,7 @@ type SearchResults struct { // SearchError error of a failed search type SearchError struct { // OK indicates the search status (always false for errors) - OK bool `json:"ok"` + OK bool `json:"ok"` // Error contains the error message Error string `json:"error"` } @@ -84,7 +84,7 @@ type ServerVersion struct { // GitignoreTemplateInfo name and text of a gitignore template type GitignoreTemplateInfo struct { // Name is the name of the gitignore template - Name string `json:"name"` + Name string `json:"name"` // Source contains the content of the gitignore template Source string `json:"source"` } @@ -92,25 +92,25 @@ type GitignoreTemplateInfo struct { // LicensesListEntry is used for the API type LicensesTemplateListEntry struct { // Key is the unique identifier for the license template - Key string `json:"key"` + Key string `json:"key"` // Name is the display name of the license Name string `json:"name"` // URL is the reference URL for the license - URL string `json:"url"` + URL string `json:"url"` } // LicensesInfo contains information about a License type LicenseTemplateInfo struct { // Key is the unique identifier for the license template - Key string `json:"key"` + Key string `json:"key"` // Name is the display name of the license - Name string `json:"name"` + Name string `json:"name"` // URL is the reference URL for the license - URL string `json:"url"` + URL string `json:"url"` // Implementation contains license implementation details Implementation string `json:"implementation"` // Body contains the full text of the license - Body string `json:"body"` + Body string `json:"body"` } // APIError is an api error with a message @@ -118,5 +118,5 @@ type APIError struct { // Message contains the error description Message string `json:"message"` // URL contains the documentation URL for this error - URL string `json:"url"` + URL string `json:"url"` } diff --git a/modules/structs/nodeinfo.go b/modules/structs/nodeinfo.go index 4329b86021cf3..7af056ff49cf6 100644 --- a/modules/structs/nodeinfo.go +++ b/modules/structs/nodeinfo.go @@ -6,37 +6,37 @@ package structs // NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks type NodeInfo struct { // Version specifies the schema version - Version string `json:"version"` + Version string `json:"version"` // Software contains information about the server software - Software NodeInfoSoftware `json:"software"` + Software NodeInfoSoftware `json:"software"` // Protocols lists the protocols supported by this server - Protocols []string `json:"protocols"` + Protocols []string `json:"protocols"` // Services contains third party services this server can connect to - Services NodeInfoServices `json:"services"` + Services NodeInfoServices `json:"services"` // OpenRegistrations indicates if new user registrations are accepted - OpenRegistrations bool `json:"openRegistrations"` + OpenRegistrations bool `json:"openRegistrations"` // Usage contains server usage statistics - Usage NodeInfoUsage `json:"usage"` + Usage NodeInfoUsage `json:"usage"` // Metadata contains free form key value pairs for software specific values - Metadata struct{} `json:"metadata"` + Metadata struct{} `json:"metadata"` } // NodeInfoSoftware contains Metadata about server software in use type NodeInfoSoftware struct { // Name is the canonical name of this server software - Name string `json:"name"` + Name string `json:"name"` // Version is the version of this server software - Version string `json:"version"` + Version string `json:"version"` // Repository is the URL to the source code repository Repository string `json:"repository"` // Homepage is the URL to the homepage of this server software - Homepage string `json:"homepage"` + Homepage string `json:"homepage"` } // NodeInfoServices contains the third party sites this server can connect to via their application API type NodeInfoServices struct { // Inbound lists services that can deliver content to this server - Inbound []string `json:"inbound"` + Inbound []string `json:"inbound"` // Outbound lists services this server can deliver content to Outbound []string `json:"outbound"` } @@ -44,19 +44,19 @@ type NodeInfoServices struct { // NodeInfoUsage contains usage statistics for this server type NodeInfoUsage struct { // Users contains user statistics - Users NodeInfoUsageUsers `json:"users"` + Users NodeInfoUsageUsers `json:"users"` // LocalPosts is the total amount of posts made by users local to this server - LocalPosts int `json:"localPosts,omitempty"` + LocalPosts int `json:"localPosts,omitempty"` // LocalComments is the total amount of comments made by users local to this server - LocalComments int `json:"localComments,omitempty"` + LocalComments int `json:"localComments,omitempty"` } // NodeInfoUsageUsers contains statistics about the users of this server type NodeInfoUsageUsers struct { // Total is the total amount of users on this server - Total int `json:"total,omitempty"` + Total int `json:"total,omitempty"` // ActiveHalfyear is the amount of users that signed in at least once in the last 180 days ActiveHalfyear int `json:"activeHalfyear,omitempty"` // ActiveMonth is the amount of users that signed in at least once in the last 30 days - ActiveMonth int `json:"activeMonth,omitempty"` + ActiveMonth int `json:"activeMonth,omitempty"` } diff --git a/modules/structs/notifications.go b/modules/structs/notifications.go index c5455d0b07ff8..cee5da6624d88 100644 --- a/modules/structs/notifications.go +++ b/modules/structs/notifications.go @@ -10,37 +10,37 @@ import ( // NotificationThread expose Notification on API type NotificationThread struct { // ID is the unique identifier for the notification thread - ID int64 `json:"id"` + ID int64 `json:"id"` // Repository is the repository associated with the notification - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // Subject contains details about the notification subject - Subject *NotificationSubject `json:"subject"` + Subject *NotificationSubject `json:"subject"` // Unread indicates if the notification has been read - Unread bool `json:"unread"` + Unread bool `json:"unread"` // Pinned indicates if the notification is pinned - Pinned bool `json:"pinned"` + Pinned bool `json:"pinned"` // UpdatedAt is the time when the notification was last updated - UpdatedAt time.Time `json:"updated_at"` + UpdatedAt time.Time `json:"updated_at"` // URL is the API URL for this notification thread - URL string `json:"url"` + URL string `json:"url"` } // NotificationSubject contains the notification subject (Issue/Pull/Commit) type NotificationSubject struct { // Title is the title of the notification subject - Title string `json:"title"` + Title string `json:"title"` // URL is the API URL for the notification subject - URL string `json:"url"` + URL string `json:"url"` // LatestCommentURL is the API URL for the latest comment - LatestCommentURL string `json:"latest_comment_url"` + LatestCommentURL string `json:"latest_comment_url"` // HTMLURL is the web URL for the notification subject - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // LatestCommentHTMLURL is the web URL for the latest comment - LatestCommentHTMLURL string `json:"latest_comment_html_url"` + LatestCommentHTMLURL string `json:"latest_comment_html_url"` // Type indicates the type of the notification subject - Type NotifySubjectType `json:"type" binding:"In(Issue,Pull,Commit,Repository)"` + Type NotifySubjectType `json:"type" binding:"In(Issue,Pull,Commit,Repository)"` // State indicates the current state of the notification subject - State StateType `json:"state"` + State StateType `json:"state"` } // NotificationCount number of unread notifications diff --git a/modules/structs/org.go b/modules/structs/org.go index 1c0cb14ecbd3c..c3d70ebf000b7 100644 --- a/modules/structs/org.go +++ b/modules/structs/org.go @@ -6,25 +6,25 @@ package structs // Organization represents an organization type Organization struct { // The unique identifier of the organization - ID int64 `json:"id"` + ID int64 `json:"id"` // The name of the organization - Name string `json:"name"` + Name string `json:"name"` // The full display name of the organization - FullName string `json:"full_name"` + FullName string `json:"full_name"` // The email address of the organization - Email string `json:"email"` + Email string `json:"email"` // The URL of the organization's avatar - AvatarURL string `json:"avatar_url"` + AvatarURL string `json:"avatar_url"` // The description of the organization - Description string `json:"description"` + Description string `json:"description"` // The website URL of the organization - Website string `json:"website"` + Website string `json:"website"` // The location of the organization - Location string `json:"location"` + Location string `json:"location"` // The visibility level of the organization (public, limited, private) - Visibility string `json:"visibility"` + Visibility string `json:"visibility"` // Whether repository administrators can change team access - RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` + RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` // username of the organization // deprecated UserName string `json:"username"` @@ -33,13 +33,13 @@ type Organization struct { // OrganizationPermissions list different users permissions on an organization type OrganizationPermissions struct { // Whether the user is an owner of the organization - IsOwner bool `json:"is_owner"` + IsOwner bool `json:"is_owner"` // Whether the user is an admin of the organization - IsAdmin bool `json:"is_admin"` + IsAdmin bool `json:"is_admin"` // Whether the user can write to the organization - CanWrite bool `json:"can_write"` + CanWrite bool `json:"can_write"` // Whether the user can read the organization - CanRead bool `json:"can_read"` + CanRead bool `json:"can_read"` // Whether the user can create repositories in the organization CanCreateRepository bool `json:"can_create_repository"` } @@ -48,22 +48,22 @@ type OrganizationPermissions struct { type CreateOrgOption struct { // username of the organization // required: true - UserName string `json:"username" binding:"Required;Username;MaxSize(40)"` + UserName string `json:"username" binding:"Required;Username;MaxSize(40)"` // The full display name of the organization - FullName string `json:"full_name" binding:"MaxSize(100)"` + FullName string `json:"full_name" binding:"MaxSize(100)"` // The email address of the organization - Email string `json:"email" binding:"MaxSize(255)"` + Email string `json:"email" binding:"MaxSize(255)"` // The description of the organization Description string `json:"description" binding:"MaxSize(255)"` // The website URL of the organization - Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` + Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` // The location of the organization - Location string `json:"location" binding:"MaxSize(50)"` + Location string `json:"location" binding:"MaxSize(50)"` // possible values are `public` (default), `limited` or `private` // enum: public,limited,private - Visibility string `json:"visibility" binding:"In(,public,limited,private)"` + Visibility string `json:"visibility" binding:"In(,public,limited,private)"` // Whether repository administrators can change team access - RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` + RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` } // TODO: make EditOrgOption fields optional after https://gitea.com/go-chi/binding/pulls/5 got merged @@ -71,20 +71,20 @@ type CreateOrgOption struct { // EditOrgOption options for editing an organization type EditOrgOption struct { // The full display name of the organization - FullName string `json:"full_name" binding:"MaxSize(100)"` + FullName string `json:"full_name" binding:"MaxSize(100)"` // The email address of the organization - Email string `json:"email" binding:"MaxSize(255)"` + Email string `json:"email" binding:"MaxSize(255)"` // The description of the organization Description string `json:"description" binding:"MaxSize(255)"` // The website URL of the organization - Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` + Website string `json:"website" binding:"ValidUrl;MaxSize(255)"` // The location of the organization - Location string `json:"location" binding:"MaxSize(50)"` + Location string `json:"location" binding:"MaxSize(50)"` // possible values are `public`, `limited` or `private` // enum: public,limited,private - Visibility string `json:"visibility" binding:"In(,public,limited,private)"` + Visibility string `json:"visibility" binding:"In(,public,limited,private)"` // Whether repository administrators can change team access - RepoAdminChangeTeamAccess *bool `json:"repo_admin_change_team_access"` + RepoAdminChangeTeamAccess *bool `json:"repo_admin_change_team_access"` } // RenameOrgOption options when renaming an organization diff --git a/modules/structs/org_team.go b/modules/structs/org_team.go index ef690f14f7186..d34de5b6d2e0b 100644 --- a/modules/structs/org_team.go +++ b/modules/structs/org_team.go @@ -7,60 +7,60 @@ package structs // Team represents a team in an organization type Team struct { // The unique identifier of the team - ID int64 `json:"id"` + ID int64 `json:"id"` // The name of the team - Name string `json:"name"` + Name string `json:"name"` // The description of the team - Description string `json:"description"` + Description string `json:"description"` // The organization that the team belongs to - Organization *Organization `json:"organization"` + Organization *Organization `json:"organization"` // Whether the team has access to all repositories in the organization - IncludesAllRepositories bool `json:"includes_all_repositories"` + IncludesAllRepositories bool `json:"includes_all_repositories"` // enum: none,read,write,admin,owner Permission string `json:"permission"` // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"] // Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions. Units []string `json:"units"` // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"} - UnitsMap map[string]string `json:"units_map"` + UnitsMap map[string]string `json:"units_map"` // Whether the team can create repositories in the organization - CanCreateOrgRepo bool `json:"can_create_org_repo"` + CanCreateOrgRepo bool `json:"can_create_org_repo"` } // CreateTeamOption options for creating a team type CreateTeamOption struct { // required: true - Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(255)"` + Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(255)"` // The description of the team - Description string `json:"description" binding:"MaxSize(255)"` + Description string `json:"description" binding:"MaxSize(255)"` // Whether the team has access to all repositories in the organization - IncludesAllRepositories bool `json:"includes_all_repositories"` + IncludesAllRepositories bool `json:"includes_all_repositories"` // enum: read,write,admin Permission string `json:"permission"` // example: ["repo.actions","repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.ext_wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"] // Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions. Units []string `json:"units"` // example: {"repo.actions","repo.packages","repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"} - UnitsMap map[string]string `json:"units_map"` + UnitsMap map[string]string `json:"units_map"` // Whether the team can create repositories in the organization - CanCreateOrgRepo bool `json:"can_create_org_repo"` + CanCreateOrgRepo bool `json:"can_create_org_repo"` } // EditTeamOption options for editing a team type EditTeamOption struct { // required: true - Name string `json:"name" binding:"AlphaDashDot;MaxSize(255)"` + Name string `json:"name" binding:"AlphaDashDot;MaxSize(255)"` // The description of the team - Description *string `json:"description" binding:"MaxSize(255)"` + Description *string `json:"description" binding:"MaxSize(255)"` // Whether the team has access to all repositories in the organization - IncludesAllRepositories *bool `json:"includes_all_repositories"` + IncludesAllRepositories *bool `json:"includes_all_repositories"` // enum: read,write,admin Permission string `json:"permission"` // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"] // Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions. Units []string `json:"units"` // example: {"repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"} - UnitsMap map[string]string `json:"units_map"` + UnitsMap map[string]string `json:"units_map"` // Whether the team can create repositories in the organization - CanCreateOrgRepo *bool `json:"can_create_org_repo"` + CanCreateOrgRepo *bool `json:"can_create_org_repo"` } diff --git a/modules/structs/package.go b/modules/structs/package.go index 720ab2372aeb5..e656e26cd0a4d 100644 --- a/modules/structs/package.go +++ b/modules/structs/package.go @@ -10,21 +10,21 @@ import ( // Package represents a package type Package struct { // The unique identifier of the package - ID int64 `json:"id"` + ID int64 `json:"id"` // The owner of the package - Owner *User `json:"owner"` + Owner *User `json:"owner"` // The repository that contains this package Repository *Repository `json:"repository"` // The user who created this package - Creator *User `json:"creator"` + Creator *User `json:"creator"` // The type of the package (e.g., npm, maven, docker) - Type string `json:"type"` + Type string `json:"type"` // The name of the package - Name string `json:"name"` + Name string `json:"name"` // The version of the package - Version string `json:"version"` + Version string `json:"version"` // The HTML URL to view the package - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // swagger:strfmt date-time // The date and time when the package was created CreatedAt time.Time `json:"created_at"` @@ -33,15 +33,15 @@ type Package struct { // PackageFile represents a package file type PackageFile struct { // The unique identifier of the package file - ID int64 `json:"id"` + ID int64 `json:"id"` // The size of the package file in bytes - Size int64 `json:"size"` + Size int64 `json:"size"` // The name of the package file - Name string `json:"name"` + Name string `json:"name"` // The MD5 hash of the package file - HashMD5 string `json:"md5"` + HashMD5 string `json:"md5"` // The SHA1 hash of the package file - HashSHA1 string `json:"sha1"` + HashSHA1 string `json:"sha1"` // The SHA256 hash of the package file HashSHA256 string `json:"sha256"` // The SHA512 hash of the package file diff --git a/modules/structs/pull_review.go b/modules/structs/pull_review.go index cdb49286d6d9c..e93e4e9720ea9 100644 --- a/modules/structs/pull_review.go +++ b/modules/structs/pull_review.go @@ -43,7 +43,7 @@ type PullReview struct { Updated time.Time `json:"updated_at"` // HTMLURL is the web URL for viewing the review - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // HTMLPullURL is the web URL for the pull request HTMLPullURL string `json:"pull_request_url"` } diff --git a/modules/structs/release.go b/modules/structs/release.go index 051fb9d207794..6a3e87ccbc9d0 100644 --- a/modules/structs/release.go +++ b/modules/structs/release.go @@ -10,35 +10,35 @@ import ( // Release represents a repository release type Release struct { // The unique identifier of the release - ID int64 `json:"id"` + ID int64 `json:"id"` // The name of the git tag associated with the release - TagName string `json:"tag_name"` + TagName string `json:"tag_name"` // The target commitish for the release - Target string `json:"target_commitish"` + Target string `json:"target_commitish"` // The display title of the release - Title string `json:"name"` + Title string `json:"name"` // The release notes or description - Note string `json:"body"` + Note string `json:"body"` // The API URL of the release - URL string `json:"url"` + URL string `json:"url"` // The HTML URL to view the release - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // The URL to download the tarball archive - TarURL string `json:"tarball_url"` + TarURL string `json:"tarball_url"` // The URL to download the zip archive - ZipURL string `json:"zipball_url"` + ZipURL string `json:"zipball_url"` // The URL template for uploading release assets - UploadURL string `json:"upload_url"` + UploadURL string `json:"upload_url"` // Whether the release is a draft - IsDraft bool `json:"draft"` + IsDraft bool `json:"draft"` // Whether the release is a prerelease - IsPrerelease bool `json:"prerelease"` + IsPrerelease bool `json:"prerelease"` // swagger:strfmt date-time CreatedAt time.Time `json:"created_at"` // swagger:strfmt date-time - PublishedAt time.Time `json:"published_at"` + PublishedAt time.Time `json:"published_at"` // The user who published the release - Publisher *User `json:"author"` + Publisher *User `json:"author"` // The files attached to the release Attachments []*Attachment `json:"assets"` } @@ -46,33 +46,33 @@ type Release struct { // CreateReleaseOption options when creating a release type CreateReleaseOption struct { // required: true - TagName string `json:"tag_name" binding:"Required"` + TagName string `json:"tag_name" binding:"Required"` // The message for the git tag - TagMessage string `json:"tag_message"` + TagMessage string `json:"tag_message"` // The target commitish for the release - Target string `json:"target_commitish"` + Target string `json:"target_commitish"` // The display title of the release - Title string `json:"name"` + Title string `json:"name"` // The release notes or description - Note string `json:"body"` + Note string `json:"body"` // Whether to create the release as a draft - IsDraft bool `json:"draft"` + IsDraft bool `json:"draft"` // Whether to mark the release as a prerelease - IsPrerelease bool `json:"prerelease"` + IsPrerelease bool `json:"prerelease"` } // EditReleaseOption options when editing a release type EditReleaseOption struct { // The new name of the git tag - TagName string `json:"tag_name"` + TagName string `json:"tag_name"` // The new target commitish for the release - Target string `json:"target_commitish"` + Target string `json:"target_commitish"` // The new display title of the release - Title string `json:"name"` + Title string `json:"name"` // The new release notes or description - Note string `json:"body"` + Note string `json:"body"` // Whether to change the draft status - IsDraft *bool `json:"draft"` + IsDraft *bool `json:"draft"` // Whether to change the prerelease status - IsPrerelease *bool `json:"prerelease"` + IsPrerelease *bool `json:"prerelease"` } diff --git a/modules/structs/repo_actions.go b/modules/structs/repo_actions.go index 6c2ddcc60e691..b491d6ccce0c3 100644 --- a/modules/structs/repo_actions.go +++ b/modules/structs/repo_actions.go @@ -10,25 +10,25 @@ import ( // ActionTask represents a ActionTask type ActionTask struct { // ID is the unique identifier for the action task - ID int64 `json:"id"` + ID int64 `json:"id"` // Name is the name of the workflow - Name string `json:"name"` + Name string `json:"name"` // HeadBranch is the branch that triggered the workflow - HeadBranch string `json:"head_branch"` + HeadBranch string `json:"head_branch"` // HeadSHA is the commit SHA that triggered the workflow - HeadSHA string `json:"head_sha"` + HeadSHA string `json:"head_sha"` // RunNumber is the sequential number of the workflow run - RunNumber int64 `json:"run_number"` + RunNumber int64 `json:"run_number"` // Event is the type of event that triggered the workflow - Event string `json:"event"` + Event string `json:"event"` // DisplayTitle is the display title for the workflow run DisplayTitle string `json:"display_title"` // Status indicates the current status of the workflow run - Status string `json:"status"` + Status string `json:"status"` // WorkflowID is the identifier of the workflow - WorkflowID string `json:"workflow_id"` + WorkflowID string `json:"workflow_id"` // URL is the API URL for this workflow run - URL string `json:"url"` + URL string `json:"url"` // swagger:strfmt date-time CreatedAt time.Time `json:"created_at"` // swagger:strfmt date-time @@ -40,9 +40,9 @@ type ActionTask struct { // ActionTaskResponse returns a ActionTask type ActionTaskResponse struct { // Entries contains the list of workflow runs - Entries []*ActionTask `json:"workflow_runs"` + Entries []*ActionTask `json:"workflow_runs"` // TotalCount is the total number of workflow runs - TotalCount int64 `json:"total_count"` + TotalCount int64 `json:"total_count"` } // CreateActionWorkflowDispatch represents the payload for triggering a workflow dispatch event @@ -58,11 +58,11 @@ type CreateActionWorkflowDispatch struct { // ActionWorkflow represents a ActionWorkflow type ActionWorkflow struct { // ID is the unique identifier for the workflow - ID string `json:"id"` + ID string `json:"id"` // Name is the name of the workflow - Name string `json:"name"` + Name string `json:"name"` // Path is the file path of the workflow - Path string `json:"path"` + Path string `json:"path"` // State indicates if the workflow is active or disabled State string `json:"state"` // swagger:strfmt date-time @@ -70,11 +70,11 @@ type ActionWorkflow struct { // swagger:strfmt date-time UpdatedAt time.Time `json:"updated_at"` // URL is the API URL for this workflow - URL string `json:"url"` + URL string `json:"url"` // HTMLURL is the web URL for viewing the workflow - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // BadgeURL is the URL for the workflow badge - BadgeURL string `json:"badge_url"` + BadgeURL string `json:"badge_url"` // swagger:strfmt date-time DeletedAt time.Time `json:"deleted_at"` } diff --git a/modules/structs/repo_branch.go b/modules/structs/repo_branch.go index 55bb58d09e19a..75f7878aa6a39 100644 --- a/modules/structs/repo_branch.go +++ b/modules/structs/repo_branch.go @@ -10,31 +10,31 @@ import ( // Branch represents a repository branch type Branch struct { // Name is the branch name - Name string `json:"name"` + Name string `json:"name"` // Commit contains the latest commit information for this branch - Commit *PayloadCommit `json:"commit"` + Commit *PayloadCommit `json:"commit"` // Protected indicates if the branch is protected - Protected bool `json:"protected"` + Protected bool `json:"protected"` // RequiredApprovals is the number of required approvals for pull requests - RequiredApprovals int64 `json:"required_approvals"` + RequiredApprovals int64 `json:"required_approvals"` // EnableStatusCheck indicates if status checks are enabled - EnableStatusCheck bool `json:"enable_status_check"` + EnableStatusCheck bool `json:"enable_status_check"` // StatusCheckContexts contains the list of required status check contexts - StatusCheckContexts []string `json:"status_check_contexts"` + StatusCheckContexts []string `json:"status_check_contexts"` // UserCanPush indicates if the current user can push to this branch - UserCanPush bool `json:"user_can_push"` + UserCanPush bool `json:"user_can_push"` // UserCanMerge indicates if the current user can merge to this branch - UserCanMerge bool `json:"user_can_merge"` + UserCanMerge bool `json:"user_can_merge"` // EffectiveBranchProtectionName is the name of the effective branch protection rule - EffectiveBranchProtectionName string `json:"effective_branch_protection_name"` + EffectiveBranchProtectionName string `json:"effective_branch_protection_name"` } // BranchProtection represents a branch protection for a repository type BranchProtection struct { // Deprecated: true - BranchName string `json:"branch_name"` + BranchName string `json:"branch_name"` // RuleName is the name of the branch protection rule - RuleName string `json:"rule_name"` + RuleName string `json:"rule_name"` // Priority is the priority of this branch protection rule Priority int64 `json:"priority"` EnablePush bool `json:"enable_push"` diff --git a/modules/structs/repo_collaborator.go b/modules/structs/repo_collaborator.go index de566b6d33bf3..9ede7f075a66f 100644 --- a/modules/structs/repo_collaborator.go +++ b/modules/structs/repo_collaborator.go @@ -15,7 +15,7 @@ type RepoCollaboratorPermission struct { // Permission level of the collaborator Permission string `json:"permission"` // RoleName is the name of the permission role - RoleName string `json:"role_name"` + RoleName string `json:"role_name"` // User information of the collaborator - User *User `json:"user"` + User *User `json:"user"` } diff --git a/modules/structs/repo_commit.go b/modules/structs/repo_commit.go index 1a176e19751d7..14d8a86bcf5b9 100644 --- a/modules/structs/repo_commit.go +++ b/modules/structs/repo_commit.go @@ -38,15 +38,15 @@ type CommitUser struct { // RepoCommit contains information of a commit in the context of a repository. type RepoCommit struct { // URL is the API URL for the commit - URL string `json:"url"` + URL string `json:"url"` // Author contains the commit author information - Author *CommitUser `json:"author"` + Author *CommitUser `json:"author"` // Committer contains the commit committer information - Committer *CommitUser `json:"committer"` + Committer *CommitUser `json:"committer"` // Message is the commit message - Message string `json:"message"` + Message string `json:"message"` // Tree contains the tree information for the commit - Tree *CommitMeta `json:"tree"` + Tree *CommitMeta `json:"tree"` // Verification contains commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } @@ -54,7 +54,7 @@ type RepoCommit struct { // CommitStats is statistics for a RepoCommit type CommitStats struct { // Total is the total number of lines changed - Total int `json:"total"` + Total int `json:"total"` // Additions is the number of lines added Additions int `json:"additions"` // Deletions is the number of lines deleted @@ -65,19 +65,19 @@ type CommitStats struct { type Commit struct { *CommitMeta // HTMLURL is the web URL for viewing the commit - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // RepoCommit contains the commit information - RepoCommit *RepoCommit `json:"commit"` + RepoCommit *RepoCommit `json:"commit"` // Author is the GitHub/Gitea user who authored the commit - Author *User `json:"author"` + Author *User `json:"author"` // Committer is the GitHub/Gitea user who committed the commit - Committer *User `json:"committer"` + Committer *User `json:"committer"` // Parents contains the parent commit information - Parents []*CommitMeta `json:"parents"` + Parents []*CommitMeta `json:"parents"` // Files contains information about files affected by the commit - Files []*CommitAffectedFiles `json:"files"` + Files []*CommitAffectedFiles `json:"files"` // Stats contains statistics about the commit changes - Stats *CommitStats `json:"stats"` + Stats *CommitStats `json:"stats"` } // CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE @@ -95,5 +95,5 @@ type CommitAffectedFiles struct { // Filename is the path of the affected file Filename string `json:"filename"` // Status indicates how the file was affected (added, modified, deleted) - Status string `json:"status"` + Status string `json:"status"` } diff --git a/modules/structs/repo_file.go b/modules/structs/repo_file.go index dab5de948fe20..99efe19e4fe6e 100644 --- a/modules/structs/repo_file.go +++ b/modules/structs/repo_file.go @@ -105,18 +105,18 @@ type ApplyDiffPatchFileOptions struct { // FileLinksResponse contains the links for a repo's file type FileLinksResponse struct { // Self is the API URL for this file - Self *string `json:"self"` + Self *string `json:"self"` // GitURL is the Git API URL for this file - GitURL *string `json:"git"` + GitURL *string `json:"git"` // HTMLURL is the web URL for this file HTMLURL *string `json:"html"` } type ContentsExtResponse struct { // FileContents contains file information when the path represents a file - FileContents *ContentsResponse `json:"file_contents,omitempty"` + FileContents *ContentsResponse `json:"file_contents,omitempty"` // DirContents contains directory listing when the path represents a directory - DirContents []*ContentsResponse `json:"dir_contents,omitempty"` + DirContents []*ContentsResponse `json:"dir_contents,omitempty"` } // ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content @@ -126,69 +126,69 @@ type ContentsResponse struct { // Path is the full path to the file or directory Path string `json:"path"` // SHA is the Git blob or tree SHA - SHA string `json:"sha"` + SHA string `json:"sha"` // LastCommitSHA is the SHA of the last commit that affected this file 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"` + LastAuthorDate *time.Time `json:"last_author_date,omitempty"` // LastCommitMessage is the message of the last commit that affected this file - LastCommitMessage *string `json:"last_commit_message,omitempty"` + LastCommitMessage *string `json:"last_commit_message,omitempty"` // `type` will be `file`, `dir`, `symlink`, or `submodule` Type string `json:"type"` // Size is the file size in bytes - Size int64 `json:"size"` + 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"` + Target *string `json:"target"` // URL is the API URL for this file or directory - URL *string `json:"url"` + URL *string `json:"url"` // HTMLURL is the web URL for this file or directory - HTMLURL *string `json:"html_url"` + HTMLURL *string `json:"html_url"` // GitURL is the Git API URL for this blob or tree - GitURL *string `json:"git_url"` + GitURL *string `json:"git_url"` // DownloadURL is the direct download URL for this file DownloadURL *string `json:"download_url"` // `submodule_git_url` is populated when `type` is `submodule`, otherwise null - SubmoduleGitURL *string `json:"submodule_git_url"` + SubmoduleGitURL *string `json:"submodule_git_url"` // Links contains related URLs for this file or directory - Links *FileLinksResponse `json:"_links"` + Links *FileLinksResponse `json:"_links"` // LfsOid is the Git LFS object ID if this file is stored in LFS - LfsOid *string `json:"lfs_oid,omitempty"` + LfsOid *string `json:"lfs_oid,omitempty"` // LfsSize is the file size if this file is stored in LFS - LfsSize *int64 `json:"lfs_size,omitempty"` + LfsSize *int64 `json:"lfs_size,omitempty"` } // FileCommitResponse contains information generated from a Git commit for a repo's file. type FileCommitResponse struct { CommitMeta // HTMLURL is the web URL for viewing this commit - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // Author is the commit author information - Author *CommitUser `json:"author"` + Author *CommitUser `json:"author"` // Committer is the commit committer information - Committer *CommitUser `json:"committer"` + Committer *CommitUser `json:"committer"` // Parents contains parent commit metadata - Parents []*CommitMeta `json:"parents"` + Parents []*CommitMeta `json:"parents"` // Message is the commit message - Message string `json:"message"` + Message string `json:"message"` // Tree contains the tree metadata for this commit - Tree *CommitMeta `json:"tree"` + Tree *CommitMeta `json:"tree"` } // FileResponse contains information about a repo's file type FileResponse struct { // Content contains the file content and metadata - Content *ContentsResponse `json:"content"` + Content *ContentsResponse `json:"content"` // Commit contains the commit information for this file operation - Commit *FileCommitResponse `json:"commit"` + Commit *FileCommitResponse `json:"commit"` // Verification contains the commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } @@ -196,9 +196,9 @@ type FileResponse struct { // FilesResponse contains information about multiple files from a repo type FilesResponse struct { // Files contains the list of file contents and metadata - Files []*ContentsResponse `json:"files"` + Files []*ContentsResponse `json:"files"` // Commit contains the commit information for this file operation - Commit *FileCommitResponse `json:"commit"` + Commit *FileCommitResponse `json:"commit"` // Verification contains the commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } @@ -206,9 +206,9 @@ type FilesResponse struct { // FileDeleteResponse contains information about a repo's file that was deleted type FileDeleteResponse struct { // Content is always null for delete operations - Content any `json:"content"` // to be set to nil + Content any `json:"content"` // to be set to nil // Commit contains the commit information for this delete operation - Commit *FileCommitResponse `json:"commit"` + Commit *FileCommitResponse `json:"commit"` // Verification contains the commit signature verification information Verification *PayloadCommitVerification `json:"verification"` } diff --git a/modules/structs/repo_key.go b/modules/structs/repo_key.go index 4acabf6dc4a2b..a13cde71fbf9c 100644 --- a/modules/structs/repo_key.go +++ b/modules/structs/repo_key.go @@ -10,22 +10,22 @@ import ( // DeployKey a deploy key type DeployKey struct { // ID is the unique identifier for the deploy key - ID int64 `json:"id"` + ID int64 `json:"id"` // KeyID is the associated public key ID - KeyID int64 `json:"key_id"` + KeyID int64 `json:"key_id"` // Key contains the actual SSH key content - Key string `json:"key"` + Key string `json:"key"` // URL is the API URL for this deploy key - URL string `json:"url"` + URL string `json:"url"` // Title is the human-readable name for the key - Title string `json:"title"` + Title string `json:"title"` // Fingerprint is the key's fingerprint Fingerprint string `json:"fingerprint"` // swagger:strfmt date-time // Created is the time when the deploy key was added - Created time.Time `json:"created_at"` + Created time.Time `json:"created_at"` // ReadOnly indicates if the key has read-only access - ReadOnly bool `json:"read_only"` + ReadOnly bool `json:"read_only"` // Repository is the repository this deploy key belongs to Repository *Repository `json:"repository,omitempty"` } diff --git a/modules/structs/repo_note.go b/modules/structs/repo_note.go index 1e24b1ca8e80e..fcd3f7abd6d38 100644 --- a/modules/structs/repo_note.go +++ b/modules/structs/repo_note.go @@ -6,7 +6,7 @@ package structs // Note contains information related to a git note type Note struct { // The content message of the git note - Message string `json:"message"` + Message string `json:"message"` // The commit that this note is attached to - Commit *Commit `json:"commit"` + Commit *Commit `json:"commit"` } diff --git a/modules/structs/repo_refs.go b/modules/structs/repo_refs.go index f4cdb0dcc7646..9ea7f4305e7ee 100644 --- a/modules/structs/repo_refs.go +++ b/modules/structs/repo_refs.go @@ -6,9 +6,9 @@ package structs // Reference represents a Git reference. type Reference struct { // The name of the Git reference (e.g., refs/heads/main) - Ref string `json:"ref"` + Ref string `json:"ref"` // The URL to access this Git reference - URL string `json:"url"` + URL string `json:"url"` // The Git object that this reference points to Object *GitObject `json:"object"` } @@ -18,7 +18,7 @@ type GitObject struct { // The type of the Git object (e.g., commit, tag, tree, blob) Type string `json:"type"` // The SHA hash of the Git object - SHA string `json:"sha"` + SHA string `json:"sha"` // The URL to access this Git object - URL string `json:"url"` + URL string `json:"url"` } diff --git a/modules/structs/repo_tag.go b/modules/structs/repo_tag.go index 7273ff36baa24..429c715ad981a 100644 --- a/modules/structs/repo_tag.go +++ b/modules/structs/repo_tag.go @@ -8,33 +8,33 @@ import "time" // Tag represents a repository tag type Tag struct { // The name of the tag - Name string `json:"name"` + Name string `json:"name"` // The message associated with the tag - Message string `json:"message"` + Message string `json:"message"` // The ID (SHA) of the tag - ID string `json:"id"` + ID string `json:"id"` // The commit information associated with this tag - Commit *CommitMeta `json:"commit"` + Commit *CommitMeta `json:"commit"` // The URL to download the zipball archive - ZipballURL string `json:"zipball_url,omitempty"` + ZipballURL string `json:"zipball_url,omitempty"` // The URL to download the tarball archive - TarballURL string `json:"tarball_url,omitempty"` + TarballURL string `json:"tarball_url,omitempty"` } // AnnotatedTag represents an annotated tag type AnnotatedTag struct { // The name of the annotated tag - Tag string `json:"tag"` + Tag string `json:"tag"` // The SHA hash of the annotated tag - SHA string `json:"sha"` + SHA string `json:"sha"` // The URL to access the annotated tag - URL string `json:"url"` + URL string `json:"url"` // The message associated with the annotated tag - Message string `json:"message"` + Message string `json:"message"` // The user who created the annotated tag - Tagger *CommitUser `json:"tagger"` + Tagger *CommitUser `json:"tagger"` // The object that the annotated tag points to - Object *AnnotatedTagObject `json:"object"` + Object *AnnotatedTagObject `json:"object"` // The verification information for the annotated tag Verification *PayloadCommitVerification `json:"verification"` } @@ -44,9 +44,9 @@ type AnnotatedTagObject struct { // The type of the tagged object (e.g., commit, tree) Type string `json:"type"` // The URL to access the tagged object - URL string `json:"url"` + URL string `json:"url"` // The SHA hash of the tagged object - SHA string `json:"sha"` + SHA string `json:"sha"` } // CreateTagOption options when creating a tag @@ -57,19 +57,19 @@ type CreateTagOption struct { // The message to associate with the tag Message string `json:"message"` // The target commit SHA or branch name for the tag - Target string `json:"target"` + Target string `json:"target"` } // TagProtection represents a tag protection type TagProtection struct { // The unique identifier of the tag protection - ID int64 `json:"id"` + ID int64 `json:"id"` // The pattern to match tag names for protection - NamePattern string `json:"name_pattern"` + NamePattern string `json:"name_pattern"` // List of usernames allowed to create/delete protected tags WhitelistUsernames []string `json:"whitelist_usernames"` // List of team names allowed to create/delete protected tags - WhitelistTeams []string `json:"whitelist_teams"` + WhitelistTeams []string `json:"whitelist_teams"` // swagger:strfmt date-time // The date and time when the tag protection was created Created time.Time `json:"created_at"` @@ -81,19 +81,19 @@ type TagProtection struct { // CreateTagProtectionOption options for creating a tag protection type CreateTagProtectionOption struct { // The pattern to match tag names for protection - NamePattern string `json:"name_pattern"` + NamePattern string `json:"name_pattern"` // List of usernames allowed to create/delete protected tags WhitelistUsernames []string `json:"whitelist_usernames"` // List of team names allowed to create/delete protected tags - WhitelistTeams []string `json:"whitelist_teams"` + WhitelistTeams []string `json:"whitelist_teams"` } // EditTagProtectionOption options for editing a tag protection type EditTagProtectionOption struct { // The pattern to match tag names for protection - NamePattern *string `json:"name_pattern"` + NamePattern *string `json:"name_pattern"` // List of usernames allowed to create/delete protected tags WhitelistUsernames []string `json:"whitelist_usernames"` // List of team names allowed to create/delete protected tags - WhitelistTeams []string `json:"whitelist_teams"` + WhitelistTeams []string `json:"whitelist_teams"` } diff --git a/modules/structs/repo_topic.go b/modules/structs/repo_topic.go index ae2c0ef25220d..6a79297943aa0 100644 --- a/modules/structs/repo_topic.go +++ b/modules/structs/repo_topic.go @@ -10,15 +10,15 @@ import ( // TopicResponse for returning topics type TopicResponse struct { // The unique identifier of the topic - ID int64 `json:"id"` + ID int64 `json:"id"` // The name of the topic - Name string `json:"topic_name"` + Name string `json:"topic_name"` // The number of repositories using this topic - RepoCount int `json:"repo_count"` + RepoCount int `json:"repo_count"` // The date and time when the topic was created - Created time.Time `json:"created"` + Created time.Time `json:"created"` // The date and time when the topic was last updated - Updated time.Time `json:"updated"` + Updated time.Time `json:"updated"` } // TopicName a list of repo topic names diff --git a/modules/structs/repo_tree.go b/modules/structs/repo_tree.go index 480af18b4ec28..9d91f303b70fe 100644 --- a/modules/structs/repo_tree.go +++ b/modules/structs/repo_tree.go @@ -12,25 +12,25 @@ type GitEntry struct { // Type indicates if this is a file, directory, or symlink Type string `json:"type"` // Size is the file size in bytes - Size int64 `json:"size"` + Size int64 `json:"size"` // SHA is the Git object SHA - SHA string `json:"sha"` + SHA string `json:"sha"` // URL is the API URL for this tree entry - URL string `json:"url"` + URL string `json:"url"` } // GitTreeResponse returns a git tree type GitTreeResponse struct { // SHA is the tree object SHA - SHA string `json:"sha"` + SHA string `json:"sha"` // URL is the API URL for this tree - URL string `json:"url"` + URL string `json:"url"` // Entries contains the tree entries (files and directories) - Entries []GitEntry `json:"tree"` + Entries []GitEntry `json:"tree"` // Truncated indicates if the response was truncated due to size - Truncated bool `json:"truncated"` + Truncated bool `json:"truncated"` // Page is the current page number for pagination - Page int `json:"page"` + Page int `json:"page"` // TotalCount is the total number of entries in the tree - TotalCount int `json:"total_count"` + TotalCount int `json:"total_count"` } diff --git a/modules/structs/repo_watch.go b/modules/structs/repo_watch.go index 70ad9688379c7..439af28892a90 100644 --- a/modules/structs/repo_watch.go +++ b/modules/structs/repo_watch.go @@ -10,15 +10,15 @@ import ( // WatchInfo represents an API watch status of one repository type WatchInfo struct { // Whether the repository is being watched for notifications - Subscribed bool `json:"subscribed"` + Subscribed bool `json:"subscribed"` // Whether notifications for the repository are ignored - Ignored bool `json:"ignored"` + Ignored bool `json:"ignored"` // The reason for the current watch status - Reason any `json:"reason"` + Reason any `json:"reason"` // The timestamp when the watch status was created - CreatedAt time.Time `json:"created_at"` + CreatedAt time.Time `json:"created_at"` // The URL for managing the watch status - URL string `json:"url"` + URL string `json:"url"` // The URL of the repository being watched - RepositoryURL string `json:"repository_url"` + RepositoryURL string `json:"repository_url"` } diff --git a/modules/structs/repo_wiki.go b/modules/structs/repo_wiki.go index dfb38ac066121..1944c1a3f7a89 100644 --- a/modules/structs/repo_wiki.go +++ b/modules/structs/repo_wiki.go @@ -6,13 +6,13 @@ package structs // WikiCommit page commit/revision type WikiCommit struct { // The commit SHA hash - ID string `json:"sha"` + ID string `json:"sha"` // The author of the commit - Author *CommitUser `json:"author"` + Author *CommitUser `json:"author"` // The committer of the commit Committer *CommitUser `json:"commiter"` // The commit message - Message string `json:"message"` + Message string `json:"message"` } // WikiPage a wiki page @@ -21,21 +21,21 @@ type WikiPage struct { // Page content, base64 encoded ContentBase64 string `json:"content_base64"` // The number of commits that modified this page - CommitCount int64 `json:"commit_count"` + CommitCount int64 `json:"commit_count"` // The sidebar content for the wiki page - Sidebar string `json:"sidebar"` + Sidebar string `json:"sidebar"` // The footer content for the wiki page - Footer string `json:"footer"` + Footer string `json:"footer"` } // WikiPageMetaData wiki page meta information type WikiPageMetaData struct { // The title of the wiki page - Title string `json:"title"` + Title string `json:"title"` // The HTML URL to view the wiki page - HTMLURL string `json:"html_url"` + HTMLURL string `json:"html_url"` // The sub URL path for the wiki page - SubURL string `json:"sub_url"` + SubURL string `json:"sub_url"` // The last commit that modified this wiki page LastCommit *WikiCommit `json:"last_commit"` } @@ -55,5 +55,5 @@ type WikiCommitList struct { // The list of wiki commits WikiCommits []*WikiCommit `json:"commits"` // The total count of commits - Count int64 `json:"count"` + Count int64 `json:"count"` } diff --git a/modules/structs/settings.go b/modules/structs/settings.go index c4397bec2ebb0..403afda9ff5bc 100644 --- a/modules/structs/settings.go +++ b/modules/structs/settings.go @@ -6,39 +6,39 @@ package structs // GeneralRepoSettings contains global repository settings exposed by API type GeneralRepoSettings struct { // MirrorsDisabled indicates if repository mirroring is disabled - MirrorsDisabled bool `json:"mirrors_disabled"` + MirrorsDisabled bool `json:"mirrors_disabled"` // HTTPGitDisabled indicates if HTTP Git operations are disabled - HTTPGitDisabled bool `json:"http_git_disabled"` + HTTPGitDisabled bool `json:"http_git_disabled"` // MigrationsDisabled indicates if repository migrations are disabled - MigrationsDisabled bool `json:"migrations_disabled"` + MigrationsDisabled bool `json:"migrations_disabled"` // StarsDisabled indicates if repository starring is disabled - StarsDisabled bool `json:"stars_disabled"` + StarsDisabled bool `json:"stars_disabled"` // TimeTrackingDisabled indicates if time tracking is disabled TimeTrackingDisabled bool `json:"time_tracking_disabled"` // LFSDisabled indicates if Git LFS support is disabled - LFSDisabled bool `json:"lfs_disabled"` + LFSDisabled bool `json:"lfs_disabled"` } // GeneralUISettings contains global ui settings exposed by API type GeneralUISettings struct { // DefaultTheme is the default UI theme - DefaultTheme string `json:"default_theme"` + DefaultTheme string `json:"default_theme"` // AllowedReactions contains the list of allowed emoji reactions AllowedReactions []string `json:"allowed_reactions"` // CustomEmojis contains the list of custom emojis - CustomEmojis []string `json:"custom_emojis"` + CustomEmojis []string `json:"custom_emojis"` } // GeneralAPISettings contains global api settings exposed by it type GeneralAPISettings struct { // MaxResponseItems is the maximum number of items returned in API responses - MaxResponseItems int `json:"max_response_items"` + MaxResponseItems int `json:"max_response_items"` // DefaultPagingNum is the default number of items per page - DefaultPagingNum int `json:"default_paging_num"` + DefaultPagingNum int `json:"default_paging_num"` // DefaultGitTreesPerPage is the default number of Git tree items per page - DefaultGitTreesPerPage int `json:"default_git_trees_per_page"` + DefaultGitTreesPerPage int `json:"default_git_trees_per_page"` // DefaultMaxBlobSize is the default maximum blob size for API responses - DefaultMaxBlobSize int64 `json:"default_max_blob_size"` + DefaultMaxBlobSize int64 `json:"default_max_blob_size"` // DefaultMaxResponseSize is the default maximum response size DefaultMaxResponseSize int64 `json:"default_max_response_size"` } @@ -46,11 +46,11 @@ type GeneralAPISettings struct { // GeneralAttachmentSettings contains global Attachment settings exposed by API type GeneralAttachmentSettings struct { // Enabled indicates if file attachments are enabled - Enabled bool `json:"enabled"` + Enabled bool `json:"enabled"` // AllowedTypes contains the allowed file types for attachments AllowedTypes string `json:"allowed_types"` // MaxSize is the maximum size for individual attachments - MaxSize int64 `json:"max_size"` + MaxSize int64 `json:"max_size"` // MaxFiles is the maximum number of files per attachment - MaxFiles int `json:"max_files"` + MaxFiles int `json:"max_files"` } diff --git a/modules/structs/status.go b/modules/structs/status.go index f161efd95a5e6..923a245c46b54 100644 --- a/modules/structs/status.go +++ b/modules/structs/status.go @@ -12,19 +12,19 @@ import ( // CommitStatus holds a single status of a single Commit type CommitStatus struct { // ID is the unique identifier for the commit status - ID int64 `json:"id"` + ID int64 `json:"id"` // State represents the status state (pending, success, error, failure) - State commitstatus.CommitStatusState `json:"status"` + State commitstatus.CommitStatusState `json:"status"` // TargetURL is the URL to link to for more details - TargetURL string `json:"target_url"` + TargetURL string `json:"target_url"` // Description provides a brief description of the status - Description string `json:"description"` + Description string `json:"description"` // URL is the API URL for this status - URL string `json:"url"` + URL string `json:"url"` // Context is the unique context identifier for the status - Context string `json:"context"` + Context string `json:"context"` // Creator is the user who created the status - Creator *User `json:"creator"` + Creator *User `json:"creator"` // swagger:strfmt date-time Created time.Time `json:"created_at"` // swagger:strfmt date-time @@ -34,29 +34,29 @@ type CommitStatus struct { // CombinedStatus holds the combined state of several statuses for a single commit type CombinedStatus struct { // State is the overall combined status state - State commitstatus.CommitStatusState `json:"state"` + State commitstatus.CommitStatusState `json:"state"` // SHA is the commit SHA this status applies to - SHA string `json:"sha"` + SHA string `json:"sha"` // TotalCount is the total number of statuses - TotalCount int `json:"total_count"` + TotalCount int `json:"total_count"` // Statuses contains all individual commit statuses - Statuses []*CommitStatus `json:"statuses"` + Statuses []*CommitStatus `json:"statuses"` // Repository is the repository this status belongs to - Repository *Repository `json:"repository"` + Repository *Repository `json:"repository"` // CommitURL is the API URL for the commit - CommitURL string `json:"commit_url"` + CommitURL string `json:"commit_url"` // URL is the API URL for this combined status - URL string `json:"url"` + URL string `json:"url"` } // CreateStatusOption holds the information needed to create a new CommitStatus for a Commit type CreateStatusOption struct { // State represents the status state to set (pending, success, error, failure) - State commitstatus.CommitStatusState `json:"state"` + State commitstatus.CommitStatusState `json:"state"` // TargetURL is the URL to link to for more details - TargetURL string `json:"target_url"` + TargetURL string `json:"target_url"` // Description provides a brief description of the status - Description string `json:"description"` + Description string `json:"description"` // Context is the unique context identifier for the status - Context string `json:"context"` + Context string `json:"context"` } diff --git a/modules/structs/user_app.go b/modules/structs/user_app.go index eab24f41c8762..76add1c635b10 100644 --- a/modules/structs/user_app.go +++ b/modules/structs/user_app.go @@ -12,19 +12,19 @@ import ( // swagger:response AccessToken type AccessToken struct { // The unique identifier of the access token - ID int64 `json:"id"` + ID int64 `json:"id"` // The name of the access token - Name string `json:"name"` + Name string `json:"name"` // The SHA1 hash of the access token - Token string `json:"sha1"` + Token string `json:"sha1"` // The last eight characters of the token - TokenLastEight string `json:"token_last_eight"` + TokenLastEight string `json:"token_last_eight"` // The scopes granted to this access token - Scopes []string `json:"scopes"` + Scopes []string `json:"scopes"` // The timestamp when the token was created - Created time.Time `json:"created_at"` + Created time.Time `json:"created_at"` // The timestamp when the token was last used - Updated time.Time `json:"last_used_at"` + Updated time.Time `json:"last_used_at"` } // AccessTokenList represents a list of API access token. @@ -43,34 +43,34 @@ type CreateAccessTokenOption struct { // CreateOAuth2ApplicationOptions holds options to create an oauth2 application type CreateOAuth2ApplicationOptions struct { // The name of the OAuth2 application - Name string `json:"name" binding:"Required"` + Name string `json:"name" binding:"Required"` // Whether the client is confidential - ConfidentialClient bool `json:"confidential_client"` + ConfidentialClient bool `json:"confidential_client"` // Whether to skip secondary authorization - SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` + SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` // The list of allowed redirect URIs - RedirectURIs []string `json:"redirect_uris" binding:"Required"` + RedirectURIs []string `json:"redirect_uris" binding:"Required"` } // OAuth2Application represents an OAuth2 application. // swagger:response OAuth2Application type OAuth2Application struct { // The unique identifier of the OAuth2 application - ID int64 `json:"id"` + ID int64 `json:"id"` // The name of the OAuth2 application - Name string `json:"name"` + Name string `json:"name"` // The client ID of the OAuth2 application - ClientID string `json:"client_id"` + ClientID string `json:"client_id"` // The client secret of the OAuth2 application - ClientSecret string `json:"client_secret"` + ClientSecret string `json:"client_secret"` // Whether the client is confidential - ConfidentialClient bool `json:"confidential_client"` + ConfidentialClient bool `json:"confidential_client"` // Whether to skip secondary authorization - SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` + SkipSecondaryAuthorization bool `json:"skip_secondary_authorization"` // The list of allowed redirect URIs - RedirectURIs []string `json:"redirect_uris"` + RedirectURIs []string `json:"redirect_uris"` // The timestamp when the application was created - Created time.Time `json:"created"` + Created time.Time `json:"created"` } // OAuth2ApplicationList represents a list of OAuth2 applications. diff --git a/modules/structs/user_email.go b/modules/structs/user_email.go index 6c5f817f74d0f..57e4af1993807 100644 --- a/modules/structs/user_email.go +++ b/modules/structs/user_email.go @@ -8,13 +8,13 @@ package structs type Email struct { // swagger:strfmt email // The email address - Email string `json:"email"` + Email string `json:"email"` // Whether the email address has been verified - Verified bool `json:"verified"` + Verified bool `json:"verified"` // Whether this is the primary email address - Primary bool `json:"primary"` + Primary bool `json:"primary"` // The unique identifier of the user who owns this email - UserID int64 `json:"user_id"` + UserID int64 `json:"user_id"` // username of the user UserName string `json:"username"` } diff --git a/modules/structs/user_gpgkey.go b/modules/structs/user_gpgkey.go index c6c6b498add06..183a26c3b4ba1 100644 --- a/modules/structs/user_gpgkey.go +++ b/modules/structs/user_gpgkey.go @@ -10,27 +10,27 @@ import ( // GPGKey a user GPG key to sign commit and tag in repository type GPGKey struct { // The unique identifier of the GPG key - ID int64 `json:"id"` + ID int64 `json:"id"` // The primary key ID of the GPG key - PrimaryKeyID string `json:"primary_key_id"` + PrimaryKeyID string `json:"primary_key_id"` // The key ID of the GPG key - KeyID string `json:"key_id"` + KeyID string `json:"key_id"` // The public key content in armored format - PublicKey string `json:"public_key"` + PublicKey string `json:"public_key"` // List of email addresses associated with this GPG key - Emails []*GPGKeyEmail `json:"emails"` + Emails []*GPGKeyEmail `json:"emails"` // List of subkeys of this GPG key - SubsKey []*GPGKey `json:"subkeys"` + SubsKey []*GPGKey `json:"subkeys"` // Whether the key can be used for signing - CanSign bool `json:"can_sign"` + CanSign bool `json:"can_sign"` // Whether the key can be used for encrypting communications - CanEncryptComms bool `json:"can_encrypt_comms"` + CanEncryptComms bool `json:"can_encrypt_comms"` // Whether the key can be used for encrypting storage - CanEncryptStorage bool `json:"can_encrypt_storage"` + CanEncryptStorage bool `json:"can_encrypt_storage"` // Whether the key can be used for certification - CanCertify bool `json:"can_certify"` + CanCertify bool `json:"can_certify"` // Whether the GPG key has been verified - Verified bool `json:"verified"` + Verified bool `json:"verified"` // swagger:strfmt date-time // The date and time when the GPG key was created Created time.Time `json:"created_at"` @@ -43,9 +43,9 @@ type GPGKey struct { // swagger:model GPGKeyEmail type GPGKeyEmail struct { // The email address associated with the GPG key - Email string `json:"email"` + Email string `json:"email"` // Whether the email address has been verified - Verified bool `json:"verified"` + Verified bool `json:"verified"` } // CreateGPGKeyOption options create user GPG key @@ -56,7 +56,7 @@ type CreateGPGKeyOption struct { // unique: true ArmoredKey string `json:"armored_public_key" binding:"Required"` // An optional armored signature for the GPG key - Signature string `json:"armored_signature,omitempty"` + Signature string `json:"armored_signature,omitempty"` } // VerifyGPGKeyOption options verifies user GPG key @@ -65,7 +65,7 @@ type VerifyGPGKeyOption struct { // // required: true // The key ID of the GPG key to verify - KeyID string `json:"key_id" binding:"Required"` + KeyID string `json:"key_id" binding:"Required"` // The armored signature to verify the GPG key Signature string `json:"armored_signature" binding:"Required"` } diff --git a/modules/structs/user_key.go b/modules/structs/user_key.go index b04be5191ecfc..f61ce5df1069a 100644 --- a/modules/structs/user_key.go +++ b/modules/structs/user_key.go @@ -10,24 +10,24 @@ import ( // PublicKey publickey is a user key to push code to repository type PublicKey struct { // ID is the unique identifier for the public key - ID int64 `json:"id"` + ID int64 `json:"id"` // Key contains the actual SSH public key content - Key string `json:"key"` + Key string `json:"key"` // URL is the API URL for this key - URL string `json:"url,omitempty"` + URL string `json:"url,omitempty"` // Title is the human-readable name for the key - Title string `json:"title,omitempty"` + Title string `json:"title,omitempty"` // Fingerprint is the key's fingerprint Fingerprint string `json:"fingerprint,omitempty"` // swagger:strfmt date-time // Created is the time when the key was added - Created time.Time `json:"created_at"` + Created time.Time `json:"created_at"` // Updated is the time when the key was last used - Updated time.Time `json:"last_used_at"` + Updated time.Time `json:"last_used_at"` // Owner is the user who owns this key - Owner *User `json:"user,omitempty"` + Owner *User `json:"user,omitempty"` // ReadOnly indicates if the key has read-only access - ReadOnly bool `json:"read_only,omitempty"` + ReadOnly bool `json:"read_only,omitempty"` // KeyType indicates the type of the SSH key - KeyType string `json:"key_type,omitempty"` + KeyType string `json:"key_type,omitempty"` } From 82a1385932aa26e5425b8311d85bfc8e95b39956 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 5 Sep 2025 12:28:57 -0700 Subject: [PATCH 3/5] Fix lint --- modules/globallock/locker_test.go | 6 ++---- modules/log/event_writer_conn_test.go | 6 ++---- modules/queue/workergroup.go | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/modules/globallock/locker_test.go b/modules/globallock/locker_test.go index c9e73c25d2e5b..14cb0ec388898 100644 --- a/modules/globallock/locker_test.go +++ b/modules/globallock/locker_test.go @@ -105,15 +105,13 @@ func testLocker(t *testing.T, locker Locker) { require.NoError(t, err) wg := &sync.WaitGroup{} - wg.Add(1) - go func() { - defer wg.Done() + wg.Go(func() { started := time.Now() release, err := locker.Lock(t.Context(), "test") // should be blocked for seconds defer release() assert.Greater(t, time.Since(started), time.Second) assert.NoError(t, err) - }() + }) time.Sleep(2 * time.Second) release() diff --git a/modules/log/event_writer_conn_test.go b/modules/log/event_writer_conn_test.go index 2aff37812d639..e7011da79cb8b 100644 --- a/modules/log/event_writer_conn_test.go +++ b/modules/log/event_writer_conn_test.go @@ -62,11 +62,9 @@ func TestConnLogger(t *testing.T) { } expected := fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.Filename, event.Line, event.Caller, strings.ToUpper(event.Level.String())[0], event.MsgSimpleText) var wg sync.WaitGroup - wg.Add(1) - go func() { - defer wg.Done() + wg.Go(func() { listenReadAndClose(t, l, expected) - }() + }) logger.SendLogEvent(&event) wg.Wait() diff --git a/modules/queue/workergroup.go b/modules/queue/workergroup.go index 82b0790d5a9c2..3910179a6bb42 100644 --- a/modules/queue/workergroup.go +++ b/modules/queue/workergroup.go @@ -153,10 +153,8 @@ func resetIdleTicker(t *time.Ticker, dur time.Duration) { // doStartNewWorker starts a new worker for the queue, the worker reads from worker's channel and handles the items. func (q *WorkerPoolQueue[T]) doStartNewWorker(wp *workerGroup[T]) { - wp.wg.Add(1) - go func() { - defer wp.wg.Done() + &{wp wg}.Go(func() { log.Debug("Queue %q starts new worker", q.GetName()) defer log.Debug("Queue %q stops idle worker", q.GetName()) @@ -192,7 +190,7 @@ func (q *WorkerPoolQueue[T]) doStartNewWorker(wp *workerGroup[T]) { q.workerNumMu.Unlock() } } - }() + }) } // doFlush flushes the queue: it tries to read all items from the queue and handles them. From fa0ef27506caed38b15565c0f89ab9a1a1038276 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 5 Sep 2025 15:49:37 -0700 Subject: [PATCH 4/5] upgrade to go 1.25.1 --- go.mod | 2 +- templates/swagger/v1_json.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 09b150e3e5dde..5597079416296 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module code.gitea.io/gitea -go 1.25.0 +go 1.25.1 // rfc5280 said: "The serial number is an integer assigned by the CA to each certificate." // But some CAs use negative serial number, just relax the check. related: diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index a3065228c6e47..59da3ae9be744 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -23269,7 +23269,7 @@ "x-go-name": "Deadline" }, "head": { - "description": "The head branch for the pull request", + "description": "The head branch for the pull request, it could be a branch name on the base repository or\na form like `\u003cusername\u003e:\u003cbranch\u003e` which refers to the user's fork repository's branch.", "type": "string", "x-go-name": "Head" }, From c6bb7e0150c760ba11126e562a689bacd4ba8698 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 5 Sep 2025 15:54:56 -0700 Subject: [PATCH 5/5] Fix lint --- modules/queue/workergroup.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/queue/workergroup.go b/modules/queue/workergroup.go index 3910179a6bb42..c7e33497c6416 100644 --- a/modules/queue/workergroup.go +++ b/modules/queue/workergroup.go @@ -153,9 +153,7 @@ func resetIdleTicker(t *time.Ticker, dur time.Duration) { // doStartNewWorker starts a new worker for the queue, the worker reads from worker's channel and handles the items. func (q *WorkerPoolQueue[T]) doStartNewWorker(wp *workerGroup[T]) { - - &{wp wg}.Go(func() { - + wp.wg.Go(func() { log.Debug("Queue %q starts new worker", q.GetName()) defer log.Debug("Queue %q stops idle worker", q.GetName())