From 154b3c74e32da70479ca6f1aa8e1e8b579f61fd1 Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Tue, 22 Apr 2025 23:12:38 +0100 Subject: [PATCH] Bump WoofWare.Myriad and upgrade Gitea (#138) --- Directory.Build.props | 2 +- Gitea.Declarative.Lib/ConfigSchema.fs | 8 + .../GeneratedSwaggerGitea.fs | 1443 +++- .../Gitea.Declarative.Lib.fsproj | 4 +- Gitea.Declarative.Lib/Gitea.fs | 39 +- Gitea.Declarative.Lib/GiteaConfig.schema.json | 6 + .../SerialisedConfigSchema.fs | 4 + Gitea.Declarative.Lib/swagger.v1.json | 5869 ++++++++++++++++- Gitea.Declarative.Test/Utils.fs | 12 + Gitea.InMemory/Server.fs | 4 +- nix/deps.json | 24 +- 11 files changed, 7257 insertions(+), 158 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 3045b41..a8e1127 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,7 +9,7 @@ - + diff --git a/Gitea.Declarative.Lib/ConfigSchema.fs b/Gitea.Declarative.Lib/ConfigSchema.fs index d7a3395..74f2821 100644 --- a/Gitea.Declarative.Lib/ConfigSchema.fs +++ b/Gitea.Declarative.Lib/ConfigSchema.fs @@ -61,6 +61,8 @@ type ProtectedBranch = BranchName : string BlockOnOutdatedBranch : bool option RequiredStatusChecks : string list option + IgnoreStaleApprovals : bool option + EnableForcePush : bool option } static member OfSerialised (s : SerialisedProtectedBranch) : ProtectedBranch = @@ -68,6 +70,8 @@ type ProtectedBranch = BranchName = s.BranchName BlockOnOutdatedBranch = Option.ofNullable s.BlockOnOutdatedBranch RequiredStatusChecks = Option.ofObj s.RequiredStatusChecks |> Option.map List.ofArray + IgnoreStaleApprovals = Option.ofNullable s.IgnoreStaleApprovals + EnableForcePush = Option.ofNullable s.EnableForcePush } member this.ToSerialised () : SerialisedProtectedBranch = @@ -78,6 +82,8 @@ type ProtectedBranch = match this.RequiredStatusChecks with | None -> null | Some l -> List.toArray l + IgnoreStaleApprovals = Option.toNullable this.IgnoreStaleApprovals + EnableForcePush = Option.toNullable this.EnableForcePush } type NativeRepo = @@ -375,6 +381,8 @@ type Repo = bp.StatusCheckContexts else None + IgnoreStaleApprovals = bp.IgnoreStaleApprovals + EnableForcePush = bp.EnableForcePush } ) |> Set.ofSeq diff --git a/Gitea.Declarative.Lib/GeneratedSwaggerGitea.fs b/Gitea.Declarative.Lib/GeneratedSwaggerGitea.fs index 4437d2b..645eaed 100644 --- a/Gitea.Declarative.Lib/GeneratedSwaggerGitea.fs +++ b/Gitea.Declarative.Lib/GeneratedSwaggerGitea.fs @@ -43,6 +43,68 @@ type AccessToken = TokenLastEight : string option } +/// ActionTask represents a ActionTask +[] +type ActionTask = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + CreatedAt : string option + [] + DisplayTitle : string option + [] + Event : string option + [] + HeadBranch : string option + [] + HeadSha : string option + [] + Id : int option + [] + Name : string option + [] + RunNumber : int option + [] + RunStartedAt : string option + [] + Status : string option + [] + UpdatedAt : string option + [] + Url : string option + [] + WorkflowId : string option + } + +/// ActionTaskResponse returns a ActionTask +[] +type ActionTaskResponse = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + TotalCount : int option + [] + WorkflowRuns : ActionTask list option + } + +/// ActionVariable return value of the query API +[] +type ActionVariable = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Data : string option + [] + Name : string option + [] + OwnerId : int option + [] + RepoId : int option + } + /// ActivityPub type [] type ActivityPub = @@ -113,6 +175,22 @@ type Attachment = Uuid : string option } +/// Badge represents a user badge +[] +type Badge = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Description : string option + [] + Id : int option + [] + ImageUrl : string option + [] + Slug : string option + } + /// BranchProtection represents a branch protection for a repository [] type BranchProtection = @@ -123,6 +201,8 @@ type BranchProtection = ApprovalsWhitelistTeams : string list option [] ApprovalsWhitelistUsername : string list option + [] + BlockAdminMergeOverride : bool option [] BlockOnOfficialReviewRequests : bool option [] @@ -137,6 +217,10 @@ type BranchProtection = DismissStaleApprovals : bool option [] EnableApprovalsWhitelist : bool option + [] + EnableForcePush : bool option + [] + EnableForcePushAllowlist : bool option [] EnableMergeWhitelist : bool option [] @@ -145,10 +229,20 @@ type BranchProtection = EnablePushWhitelist : bool option [] EnableStatusCheck : bool option + [] + ForcePushAllowlistDeployKeys : bool option + [] + ForcePushAllowlistTeams : string list option + [] + ForcePushAllowlistUsernames : string list option + [] + IgnoreStaleApprovals : bool option [] MergeWhitelistTeams : string list option [] MergeWhitelistUsernames : string list option + [] + Priority : int option [] ProtectedFilePatterns : string option [] @@ -171,6 +265,24 @@ type BranchProtection = UpdatedAt : string option } +/// ChangeFileOperation for creating, updating or deleting a file +[] +type ChangeFileOperation = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Content : string option + [] + FromPath : string option + [] + Operation : string + [] + Path : string + [] + Sha : string option + } + /// ChangedFile store information about files affected by the pull request [] type ChangedFile = @@ -205,6 +317,8 @@ type CommitAffectedFiles = AdditionalProperties : System.Collections.Generic.Dictionary [] Filename : string option + [] + Status : string option } /// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE @@ -283,6 +397,8 @@ type CreateBranchProtectionOption = ApprovalsWhitelistTeams : string list option [] ApprovalsWhitelistUsername : string list option + [] + BlockAdminMergeOverride : bool option [] BlockOnOfficialReviewRequests : bool option [] @@ -295,6 +411,10 @@ type CreateBranchProtectionOption = DismissStaleApprovals : bool option [] EnableApprovalsWhitelist : bool option + [] + EnableForcePush : bool option + [] + EnableForcePushAllowlist : bool option [] EnableMergeWhitelist : bool option [] @@ -303,10 +423,20 @@ type CreateBranchProtectionOption = EnablePushWhitelist : bool option [] EnableStatusCheck : bool option + [] + ForcePushAllowlistDeployKeys : bool option + [] + ForcePushAllowlistTeams : string list option + [] + ForcePushAllowlistUsernames : string list option + [] + IgnoreStaleApprovals : bool option [] MergeWhitelistTeams : string list option [] MergeWhitelistUsernames : string list option + [] + Priority : int option [] ProtectedFilePatterns : string option [] @@ -337,6 +467,8 @@ type CreateBranchRepoOption = NewBranchName : string [] OldBranchName : string option + [] + OldRefName : string option } /// CreateEmailOption options when creating email addresses @@ -444,6 +576,8 @@ type CreateLabelOption = Description : string option [] Exclusive : bool option + [] + IsArchived : bool option [] Name : string } @@ -476,6 +610,18 @@ type CreateOAuth2ApplicationOptions = Name : string option [] RedirectUris : string list option + [] + SkipSecondaryAuthorization : bool option + } + +/// CreateOrUpdateSecretOption options when creating or updating secret +[] +type CreateOrUpdateSecretOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Data : string } /// CreateOrgOption options for creating an organization @@ -486,6 +632,8 @@ type CreateOrgOption = AdditionalProperties : System.Collections.Generic.Dictionary [] Description : string option + [] + Email : string option [] FullName : string option [] @@ -522,6 +670,10 @@ type CreatePullRequestOption = Labels : int list option [] Milestone : int option + [] + Reviewers : string list option + [] + TeamReviewers : string list option [] Title : string option } @@ -600,6 +752,8 @@ type CreateRepoOption = License : string option [] Name : string + [] + ObjectFormatName : string option [] Private : bool option [] @@ -640,6 +794,20 @@ type CreateTagOption = Target : string option } +/// CreateTagProtectionOption options for creating a tag protection +[] +type CreateTagProtectionOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + NamePattern : string option + [] + WhitelistTeams : string list option + [] + WhitelistUsernames : string list option + } + [] type Type1 = { @@ -686,7 +854,7 @@ type CreateUserOption = [] MustChangePassword : bool option [] - Password : string + Password : string option [] Restricted : bool option [] @@ -699,6 +867,16 @@ type CreateUserOption = Visibility : string option } +/// CreateVariableOption the option when creating variable +[] +type CreateVariableOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Value : string + } + /// CreateWikiPageOptions form for creating wiki [] type CreateWikiPageOptions = @@ -773,6 +951,8 @@ type EditBranchProtectionOption = ApprovalsWhitelistTeams : string list option [] ApprovalsWhitelistUsername : string list option + [] + BlockAdminMergeOverride : bool option [] BlockOnOfficialReviewRequests : bool option [] @@ -783,6 +963,10 @@ type EditBranchProtectionOption = DismissStaleApprovals : bool option [] EnableApprovalsWhitelist : bool option + [] + EnableForcePush : bool option + [] + EnableForcePushAllowlist : bool option [] EnableMergeWhitelist : bool option [] @@ -791,10 +975,20 @@ type EditBranchProtectionOption = EnablePushWhitelist : bool option [] EnableStatusCheck : bool option + [] + ForcePushAllowlistDeployKeys : bool option + [] + ForcePushAllowlistTeams : string list option + [] + ForcePushAllowlistUsernames : string list option + [] + IgnoreStaleApprovals : bool option [] MergeWhitelistTeams : string list option [] MergeWhitelistUsernames : string list option + [] + Priority : int option [] ProtectedFilePatterns : string option [] @@ -906,6 +1100,8 @@ type EditLabelOption = Description : string option [] Exclusive : bool option + [] + IsArchived : bool option [] Name : string option } @@ -934,6 +1130,8 @@ type EditOrgOption = AdditionalProperties : System.Collections.Generic.Dictionary [] Description : string option + [] + Email : string option [] FullName : string option [] @@ -1006,6 +1204,20 @@ type EditReleaseOption = TargetCommitish : string option } +/// EditTagProtectionOption options for editing a tag protection +[] +type EditTagProtectionOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + NamePattern : string option + [] + WhitelistTeams : string list option + [] + WhitelistUsernames : string list option + } + [] type Type3 = { @@ -1089,6 +1301,10 @@ type Email = Email : string option [] Primary : bool option + [] + UserId : int option + [] + Username : string option [] Verified : bool option } @@ -1261,6 +1477,8 @@ type GenerateRepoOption = Owner : string [] Private : bool option + [] + ProtectedBranch : bool option [] Topics : bool option [] @@ -1353,6 +1571,18 @@ type GitTreeResponse = Url : string option } +/// GitignoreTemplateInfo name and text of a gitignore template +[] +type GitignoreTemplateInfo = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Name : string option + [] + Source : string option + } + [] type Type4 = { @@ -1370,6 +1600,8 @@ type Hook = Active : bool option [] AuthorizationHeader : string option + [] + BranchFilter : string option [] Config : Type4 option [] @@ -1410,6 +1642,30 @@ type InternalTracker = EnableTimeTracker : bool option } +[] +type IssueConfigContactLink = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + About : string option + [] + Name : string option + [] + Url : string option + } + +[] +type IssueConfigValidation = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Message : string option + [] + Valid : bool option + } + /// IssueDeadline represents an issue deadline [] type IssueDeadline = @@ -1441,7 +1697,21 @@ type IssueLabelsOption = [] AdditionalProperties : System.Collections.Generic.Dictionary [] - Labels : int list option + Labels : unit list option + } + +/// IssueMeta basic issue information +[] +type IssueMeta = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Index : int option + [] + Owner : string option + [] + Repo : string option } /// Label a label to an issue or a pr @@ -1458,6 +1728,56 @@ type Label = Exclusive : bool option [] Id : int option + [] + IsArchived : bool option + [] + Name : string option + [] + Url : string option + } + +/// LabelTemplate info of a Label template +[] +type LabelTemplate = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Color : string option + [] + Description : string option + [] + Exclusive : bool option + [] + Name : string option + } + +/// LicensesInfo contains information about a License +[] +type LicenseTemplateInfo = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Body : string option + [] + Implementation : string option + [] + Key : string option + [] + Name : string option + [] + Url : string option + } + +/// LicensesListEntry is used for the API +[] +type LicensesTemplateListEntry = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Key : string option [] Name : string option [] @@ -1480,6 +1800,24 @@ type MarkdownOption = Wiki : bool option } +/// MarkupOption markup options +[] +type MarkupOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Context : string option + [] + FilePath : string option + [] + Mode : string option + [] + Text : string option + [] + Wiki : bool option + } + /// MergePullRequestForm form for merging Pull Request [] type MergePullRequestOption = @@ -1504,6 +1842,24 @@ type MergePullRequestOption = MergeWhenChecksSucceed : bool option } +[] +type MergeUpstreamRequest = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Branch : string option + } + +[] +type MergeUpstreamResponse = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + MergeType : string option + } + /// MigrateRepoOptions options for migrating repository's /// this is used to interact with api v1 [] @@ -1517,6 +1873,10 @@ type MigrateRepoOptions = AuthToken : string option [] AuthUsername : string option + [] + AwsAccessKeyId : string option + [] + AwsSecretAccessKey : string option [] CloneAddr : string [] @@ -1553,6 +1913,18 @@ type MigrateRepoOptions = Wiki : bool option } +/// NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed +[] +type NewIssuePinsAllowed = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Issues : bool option + [] + PullRequests : bool option + } + [] type Type7 = { @@ -1632,6 +2004,8 @@ type OAuth2Application = Name : string option [] RedirectUris : string list option + [] + SkipSecondaryAuthorization : bool option } /// Organization represents an organization @@ -1644,6 +2018,8 @@ type Organization = AvatarUrl : string option [] Description : string option + [] + Email : string option [] FullName : string option [] @@ -1736,6 +2112,10 @@ type PullRequestMeta = { [] AdditionalProperties : System.Collections.Generic.Dictionary + [] + Draft : bool option + [] + HtmlUrl : string option [] Merged : bool option [] @@ -1792,6 +2172,16 @@ type Reference = Url : string option } +/// RenameUserOption options when renaming a user +[] +type RenameUserOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + NewUsername : string + } + /// RepoTopicOptions a collection of repo topic names [] type RepoTopicOptions = @@ -1818,6 +2208,18 @@ type RepositoryMeta = Owner : string option } +/// Secret represents a secret +[] +type Secret = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + CreatedAt : string option + [] + Name : string option + } + /// ServerVersion wraps the version of the server [] type ServerVersion = @@ -1882,6 +2284,26 @@ type Tag = ZipballUrl : string option } +/// TagProtection represents a tag protection +[] +type TagProtection = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + CreatedAt : string option + [] + Id : int option + [] + NamePattern : string option + [] + UpdatedAt : string option + [] + WhitelistTeams : string list option + [] + WhitelistUsernames : string list option + } + [] type Type8 = { @@ -1955,6 +2377,26 @@ type TransferRepoOption = TeamIds : int list option } +/// UpdateBranchProtectionPriories a list to update the branch protection rule priorities +[] +type UpdateBranchProtectionPriories = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Ids : int list option + } + +/// UpdateBranchRepoOption options when updating a branch in a repository +[] +type UpdateBranchRepoOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Name : string + } + /// UpdateFileOptions options for updating files /// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) [] @@ -1984,6 +2426,38 @@ type UpdateFileOptions = Signoff : bool option } +/// UpdateRepoAvatarUserOption options when updating the repo avatar +[] +type UpdateRepoAvatarOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Image : string option + } + +/// UpdateUserAvatarUserOption options when updating the user avatar +[] +type UpdateUserAvatarOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Image : string option + } + +/// UpdateVariableOption the option when updating variable +[] +type UpdateVariableOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Name : string option + [] + Value : string + } + /// User represents a user [] type User = @@ -2006,6 +2480,8 @@ type User = FollowingCount : int option [] FullName : string option + [] + HtmlUrl : string option [] Id : int option [] @@ -2024,6 +2500,8 @@ type User = ProhibitLogin : bool option [] Restricted : bool option + [] + SourceId : int option [] StarredReposCount : int option [] @@ -2032,6 +2510,16 @@ type User = Website : string option } +/// UserBadgeOption options for link between users and badges +[] +type UserBadgeOption = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + BadgeSlugs : string list option + } + /// UserHeatmapData represents the data needed to create a heatmap [] type UserHeatmapData = @@ -2184,6 +2672,31 @@ type WikiPageMetaData = Title : string option } +/// ChangeFilesOptions options for creating, updating or deleting multiple files +/// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) +[] +type ChangeFilesOptions = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Author : Identity option + [] + Branch : string option + [] + Committer : Identity option + [] + Dates : CommitDateOptions option + [] + Files : ChangeFileOperation list + [] + Message : string option + [] + NewBranch : string option + [] + Signoff : bool option + } + /// Comment represents a comment on a commit or issue [] type Comment = @@ -2370,6 +2883,8 @@ type EditRepoOption = { [] AdditionalProperties : System.Collections.Generic.Dictionary + [] + AllowFastForwardOnlyMerge : bool option [] AllowManualMerge : bool option [] @@ -2402,12 +2917,18 @@ type EditRepoOption = ExternalTracker : ExternalTracker option [] ExternalWiki : ExternalWiki option + [] + HasActions : bool option [] HasIssues : bool option + [] + HasPackages : bool option [] HasProjects : bool option [] HasPullRequests : bool option + [] + HasReleases : bool option [] HasWiki : bool option [] @@ -2420,12 +2941,25 @@ type EditRepoOption = Name : string option [] Private : bool option + [] + ProjectsMode : string option [] Template : bool option [] Website : string option } +[] +type IssueConfig = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + BlankIssuesEnabled : bool option + [] + ContactLinks : IssueConfigContactLink list option + } + /// IssueFormField represents a form field [] type IssueFormField = @@ -2440,6 +2974,8 @@ type IssueFormField = Type : string option [] Validations : Type6 option + [] + Visible : string list option } /// IssueTemplate represents an issue template for a repository @@ -2450,6 +2986,8 @@ type IssueTemplate = AdditionalProperties : System.Collections.Generic.Dictionary [] About : string option + [] + Assignees : string list option [] Body : IssueFormField list option [] @@ -2694,6 +3232,8 @@ type Release = TarballUrl : string option [] TargetCommitish : string option + [] + UploadUrl : string option [] Url : string option [] @@ -2754,6 +3294,8 @@ type Repository = { [] AdditionalProperties : System.Collections.Generic.Dictionary + [] + AllowFastForwardOnlyMerge : bool option [] AllowMergeCommits : bool option [] @@ -2766,6 +3308,8 @@ type Repository = AllowSquashMerge : bool option [] Archived : bool option + [] + ArchivedAt : string option [] AvatarUrl : string option [] @@ -2794,12 +3338,18 @@ type Repository = ForksCount : int option [] FullName : string option + [] + HasActions : bool option [] HasIssues : bool option + [] + HasPackages : bool option [] HasProjects : bool option [] HasPullRequests : bool option + [] + HasReleases : bool option [] HasWiki : bool option [] @@ -2816,6 +3366,8 @@ type Repository = Language : string option [] LanguagesUrl : string option + [] + Licenses : string list option [] Link : string option [] @@ -2826,6 +3378,8 @@ type Repository = MirrorUpdated : string option [] Name : string option + [] + ObjectFormatName : string option [] OpenIssuesCount : int option [] @@ -2840,6 +3394,8 @@ type Repository = Permissions : Permission option [] Private : bool option + [] + ProjectsMode : string option [] ReleaseCounter : int option [] @@ -2852,8 +3408,12 @@ type Repository = StarsCount : int option [] Template : bool option + [] + Topics : string list option [] UpdatedAt : string option + [] + Url : string option [] WatchersCount : int option [] @@ -2872,6 +3432,39 @@ type SearchResults = Ok : bool option } +[] +type Activity = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + ActUser : User option + [] + ActUserId : int option + [] + Comment : Comment option + [] + CommentId : int option + [] + Content : string option + [] + Created : string option + [] + Id : int option + [] + IsPrivate : bool option + [] + OpType : string option + [] + RefName : string option + [] + Repo : Repository option + [] + RepoId : int option + [] + UserId : int option + } + /// AnnotatedTag represents an annotated tag [] type AnnotatedTag = @@ -2944,6 +3537,18 @@ type Commit = Url : string option } +/// Compare represents a comparison between two commits. +[] +type Compare = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Commits : Commit list option + [] + TotalCommits : int option + } + /// DeployKey a deploy key [] type DeployKey = @@ -2998,6 +3603,20 @@ type FileResponse = Verification : PayloadCommitVerification option } +/// FilesResponse contains information about multiple files from a repo +[] +type FilesResponse = + { + [] + AdditionalProperties : System.Collections.Generic.Dictionary + [] + Commit : FileCommitResponse option + [] + Files : ContentsResponse list option + [] + Verification : PayloadCommitVerification option + } + /// Issue represents an issue in a repository [] type Issue = @@ -3036,6 +3655,8 @@ type Issue = OriginalAuthor : string option [] OriginalAuthorId : int option + [] + PinOrder : int option [] PullRequest : PullRequestMeta option [] @@ -3138,6 +3759,8 @@ type Package = CreatedAt : string option [] Creator : User option + [] + HtmlUrl : string option [] Id : int option [] @@ -3186,6 +3809,8 @@ type PullRequest = { [] AdditionalProperties : System.Collections.Generic.Dictionary + [] + Additions : int option [] AllowMaintainerEdit : bool option [] @@ -3196,14 +3821,20 @@ type PullRequest = Base : PRBranchInfo option [] Body : string option + [] + ChangedFiles : int option [] ClosedAt : string option [] Comments : int option [] CreatedAt : string option + [] + Deletions : int option [] DiffUrl : string option + [] + Draft : bool option [] DueDate : string option [] @@ -3234,6 +3865,14 @@ type PullRequest = Number : int option [] PatchUrl : string option + [] + PinOrder : int option + [] + RequestedReviewers : User list option + [] + RequestedReviewersTeams : Team list option + [] + ReviewComments : int option [] State : string option [] @@ -3371,17 +4010,17 @@ type LanguageStatistics = [] type IGiteaClient = /// Returns the Person actor for a user - [] + [] [] abstract ActivitypubPerson : - [] username : string * ?ct : System.Threading.CancellationToken -> + [] user_id : int * ?ct : System.Threading.CancellationToken -> ActivityPub System.Threading.Tasks.Task /// Send to the inbox - [] + [] [] abstract ActivitypubPersonInbox : - [] username : string * ?ct : System.Threading.CancellationToken -> + [] user_id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List cron tasks @@ -3400,6 +4039,25 @@ type IGiteaClient = [] task : string * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// List all emails + [] + [] + abstract AdminGetAllEmails : + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Email list System.Threading.Tasks.Task + + /// Search all emails + [] + [] + abstract AdminSearchEmails : + [] q : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Email list System.Threading.Tasks.Task + /// List system's webhooks [] [] @@ -3422,8 +4080,14 @@ type IGiteaClient = abstract AdminGetHook : [] id : int * ?ct : System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task + /// Delete a hook + [] + [] + abstract AdminDeleteHook : + [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// Update a hook - [] + [] [] abstract AdminEditHook : [] id : int * @@ -3440,6 +4104,12 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> Organization list System.Threading.Tasks.Task + /// Get an global actions runner registration token + [] + [] + abstract AdminGetRunnerRegistrationToken : + ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// List unadopted repositories [] [] @@ -3468,10 +4138,12 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task - /// List all users + /// Search users according filter conditions [] [] - abstract AdminGetAllUsers : + abstract AdminSearchUsers : + [] source_id : int * + [] login_name : string * [] page : int * [] limit : int * ?ct : System.Threading.CancellationToken -> @@ -3494,7 +4166,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit an existing user - [] + [] [] abstract AdminEditUser : [] username : string * @@ -3502,6 +4174,31 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> User System.Threading.Tasks.Task + /// List a user's badges + [] + [] + abstract AdminListUserBadges : + [] username : string * ?ct : System.Threading.CancellationToken -> + Badge list System.Threading.Tasks.Task + + /// Add a badge to a user + [] + [] + abstract AdminAddUserBadges : + [] username : string * + [] body : UserBadgeOption * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Remove a badge from a user + [] + [] + abstract AdminDeleteUserBadges : + [] username : string * + [] body : UserBadgeOption * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// Add a public key on behalf of a user [] [] @@ -3529,6 +4226,15 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> Organization System.Threading.Tasks.Task + /// Rename a user + [] + [] + abstract AdminRenameUser : + [] username : string * + [] body : RenameUserOption * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// Create a repository on behalf of a user [] [] @@ -3538,11 +4244,43 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task - /// Delete a hook - [] + /// Returns a list of all gitignore templates + [] [] - abstract AdminDeleteHook : - [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + abstract ListGitignoresTemplates : + ?ct : System.Threading.CancellationToken -> string list System.Threading.Tasks.Task + + /// Returns information about a gitignore template + [] + [] + abstract GetGitignoreTemplateInfo : + [] name : string * ?ct : System.Threading.CancellationToken -> + GitignoreTemplateInfo System.Threading.Tasks.Task + + /// Returns a list of all label templates + [] + [] + abstract ListLabelTemplates : ?ct : System.Threading.CancellationToken -> string list System.Threading.Tasks.Task + + /// Returns all labels in a template + [] + [] + abstract GetLabelTemplateInfo : + [] name : string * ?ct : System.Threading.CancellationToken -> + LabelTemplate list System.Threading.Tasks.Task + + /// Returns a list of all license templates + [] + [] + abstract ListLicenseTemplates : + ?ct : System.Threading.CancellationToken -> LicensesTemplateListEntry list System.Threading.Tasks.Task + + /// Returns information about a license template + [] + [] + abstract GetLicenseTemplateInfo : + [] name : string * ?ct : System.Threading.CancellationToken -> + LicenseTemplateInfo System.Threading.Tasks.Task /// Render a markdown document as HTML [] @@ -3557,6 +4295,13 @@ type IGiteaClient = abstract RenderMarkdownRaw : [] body : string * ?ct : System.Threading.CancellationToken -> string System.Threading.Tasks.Task + /// Render a markup document as HTML + [] + [] + abstract RenderMarkup : + [] body : MarkupOption * ?ct : System.Threading.CancellationToken -> + string System.Threading.Tasks.Task + /// Returns the nodeinfo of the Gitea application [] [] @@ -3601,7 +4346,7 @@ type IGiteaClient = NotificationThread System.Threading.Tasks.Task /// Mark notification thread as read by ID - [] + [] [] abstract NotifyReadThread : [] id : string * @@ -3649,7 +4394,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit an organization - [] + [] [] abstract OrgEdit : [] org : string * @@ -3657,6 +4402,116 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> Organization System.Threading.Tasks.Task + /// Get an organization's actions runner registration token + [] + [] + abstract OrgGetRunnerRegistrationToken : + [] org : string * ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// List an organization's actions secrets + [] + [] + abstract OrgListActionsSecrets : + [] org : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Secret list System.Threading.Tasks.Task + + /// Delete a secret in an organization + [] + [] + abstract DeleteOrgSecret : + [] org : string * + [] secretname : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Get an org-level variables list + [] + [] + abstract GetOrgVariablesList : + [] org : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + ActionVariable list System.Threading.Tasks.Task + + /// Get an org-level variable + [] + [] + abstract GetOrgVariable : + [] org : string * + [] variablename : string * + ?ct : System.Threading.CancellationToken -> + ActionVariable System.Threading.Tasks.Task + + /// List an organization's activity feeds + [] + [] + abstract OrgListActivityFeeds : + [] org : string * + [] date : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Activity list System.Threading.Tasks.Task + + /// Update Avatar + [] + [] + abstract OrgUpdateAvatar : + [] org : string * + [] body : UpdateUserAvatarOption * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Delete Avatar + [] + [] + abstract OrgDeleteAvatar : + [] org : string * ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// List users blocked by the organization + [] + [] + abstract OrganizationListBlocks : + [] org : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + User list System.Threading.Tasks.Task + + /// Check if a user is blocked by the organization + [] + [] + abstract OrganizationCheckUserBlock : + [] org : string * + [] username : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Unblock a user + [] + [] + abstract OrganizationUnblockUser : + [] org : string * + [] username : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Block a user + [] + [] + abstract OrganizationBlockUser : + [] org : string * + [] username : string * + [] note : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// List an organization's webhooks [] [] @@ -3695,7 +4550,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Update a hook - [] + [] [] abstract OrgEditHook : [] org : string * @@ -3742,7 +4597,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Update a label - [] + [] [] abstract OrgEditLabel : [] org : string * @@ -3927,6 +4782,7 @@ type IGiteaClient = [] created : bool * [] mentioned : bool * [] review_requested : bool * + [] reviewed : bool * [] owner : string * [] team : string * [] page : int * @@ -3984,7 +4840,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit a repository's properties. Only fields that are set will be changed. - [] + [] [] abstract RepoEdit : [] owner : string * @@ -3993,6 +4849,80 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task + /// Get a repository's actions runner registration token + [] + [] + abstract RepoGetRunnerRegistrationToken : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// List an repo's actions secrets + [] + [] + abstract RepoListActionsSecrets : + [] owner : string * + [] repo : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Secret list System.Threading.Tasks.Task + + /// Delete a secret in a repository + [] + [] + abstract DeleteRepoSecret : + [] owner : string * + [] repo : string * + [] secretname : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// List a repository's action tasks + [] + [] + abstract ListActionTasks : + [] owner : string * + [] repo : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + ActionTaskResponse System.Threading.Tasks.Task + + /// Get repo-level variables list + [] + [] + abstract GetRepoVariablesList : + [] owner : string * + [] repo : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + ActionVariable list System.Threading.Tasks.Task + + /// Get a repo-level variable + [] + [] + abstract GetRepoVariable : + [] owner : string * + [] repo : string * + [] variablename : string * + ?ct : System.Threading.CancellationToken -> + ActionVariable System.Threading.Tasks.Task + + /// List a repository's activity feeds + [] + [] + abstract RepoListActivityFeeds : + [] owner : string * + [] repo : string * + [] date : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Activity list System.Threading.Tasks.Task + /// Get an archive of a repository [] [] @@ -4012,6 +4942,25 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> User list System.Threading.Tasks.Task + /// Update avatar + [] + [] + abstract RepoUpdateAvatar : + [] owner : string * + [] repo : string * + [] body : UpdateRepoAvatarOption * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Delete avatar + [] + [] + abstract RepoDeleteAvatar : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// List branch protections for a repository [] [] @@ -4031,6 +4980,16 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> BranchProtection System.Threading.Tasks.Task + /// Update the priorities of branch protections for a repository. + [] + [] + abstract RepoUpdateBranchProtectionPriories : + [] owner : string * + [] repo : string * + [] body : UpdateBranchProtectionPriories * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// Get a specific branch protection for the repository [] [] @@ -4052,7 +5011,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit a branch protections for a repository. Only fields that are set will be changed - [] + [] [] abstract RepoEditBranchProtection : [] owner : string * @@ -4103,6 +5062,17 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// Update a branch + [] + [] + abstract RepoUpdateBranch : + [] owner : string * + [] repo : string * + [] branch : string * + [] body : UpdateBranchRepoOption * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// List a repository's collaborators [] [] @@ -4134,7 +5104,7 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task - /// Add a collaborator to a repository + /// Add or Update a collaborator to a repository [] [] abstract RepoAddCollaborator : @@ -4164,8 +5134,11 @@ type IGiteaClient = [] sha : string * [] path : string * [] stat : bool * + [] verification : bool * + [] files : bool * [] page : int * [] limit : int * + [] not : string * ?ct : System.Threading.CancellationToken -> Commit list System.Threading.Tasks.Task @@ -4195,6 +5168,26 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> CommitStatus list System.Threading.Tasks.Task + /// Get the merged pull request of the commit + [] + [] + abstract RepoGetCommitPullRequest : + [] owner : string * + [] repo : string * + [] sha : string * + ?ct : System.Threading.CancellationToken -> + PullRequest System.Threading.Tasks.Task + + /// Get commit comparison information + [] + [] + abstract RepoCompareDiff : + [] owner : string * + [] repo : string * + [] basehead : string * + ?ct : System.Threading.CancellationToken -> + Compare System.Threading.Tasks.Task + /// Gets the metadata of all the entries of the root dir [] [] @@ -4205,6 +5198,16 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> ContentsResponse list System.Threading.Tasks.Task + /// Modify multiple files in a repository + [] + [] + abstract RepoChangeFiles : + [] owner : string * + [] repo : string * + [] body : ChangeFilesOptions * + ?ct : System.Threading.CancellationToken -> + FilesResponse System.Threading.Tasks.Task + /// Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir [] [] @@ -4308,6 +5311,9 @@ type IGiteaClient = [] owner : string * [] repo : string * [] sha : string * + [] stat : bool * + [] verification : bool * + [] files : bool * ?ct : System.Threading.CancellationToken -> Commit System.Threading.Tasks.Task @@ -4329,6 +5335,8 @@ type IGiteaClient = [] owner : string * [] repo : string * [] sha : string * + [] verification : bool * + [] files : bool * ?ct : System.Threading.CancellationToken -> Note System.Threading.Tasks.Task @@ -4425,7 +5433,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit a Git hook in a repository - [] + [] [] abstract RepoEditGitHook : [] owner : string * @@ -4456,7 +5464,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit a hook in a repository - [] + [] [] abstract RepoEditHook : [] owner : string * @@ -4477,6 +5485,24 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// Returns the issue config for a repo + [] + [] + abstract RepoGetIssueConfig : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + IssueConfig System.Threading.Tasks.Task + + /// Returns the validation information for a issue config + [] + [] + abstract RepoValidateIssueConfig : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + IssueConfigValidation System.Threading.Tasks.Task + /// Get available issue templates for a repository [] [] @@ -4573,7 +5599,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit a comment attachment - [] + [] [] abstract IssueEditIssueCommentAttachment : [] owner : string * @@ -4605,6 +5631,15 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// List a repo's pinned issues + [] + [] + abstract RepoListPinnedIssues : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + Issue list System.Threading.Tasks.Task + /// Get an issue [] [] @@ -4626,7 +5661,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. - [] + [] [] abstract IssueEditIssue : [] owner : string * @@ -4669,7 +5704,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit an issue attachment - [] + [] [] abstract IssueEditIssueAttachment : [] owner : string * @@ -4680,6 +5715,40 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> Attachment System.Threading.Tasks.Task + /// List issues that are blocked by this issue + [] + [] + abstract IssueListBlocks : + [] owner : string * + [] repo : string * + [] index : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Issue list System.Threading.Tasks.Task + + /// Block the issue given in the body by the issue in path + [] + [] + abstract IssueCreateIssueBlocking : + [] owner : string * + [] repo : string * + [] index : string * + [] body : IssueMeta * + ?ct : System.Threading.CancellationToken -> + Issue System.Threading.Tasks.Task + + /// Unblock the issue given in the body by the issue in path + [] + [] + abstract IssueRemoveIssueBlocking : + [] owner : string * + [] repo : string * + [] index : string * + [] body : IssueMeta * + ?ct : System.Threading.CancellationToken -> + Issue System.Threading.Tasks.Task + /// List all comments on an issue [] [] @@ -4725,6 +5794,40 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> IssueDeadline System.Threading.Tasks.Task + /// List an issue's dependencies, i.e all issues that block this issue. + [] + [] + abstract IssueListIssueDependencies : + [] owner : string * + [] repo : string * + [] index : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Issue list System.Threading.Tasks.Task + + /// Make the issue in the url depend on the issue in the form. + [] + [] + abstract IssueCreateIssueDependencies : + [] owner : string * + [] repo : string * + [] index : string * + [] body : IssueMeta * + ?ct : System.Threading.CancellationToken -> + Issue System.Threading.Tasks.Task + + /// Remove an issue dependency + [] + [] + abstract IssueRemoveIssueDependencies : + [] owner : string * + [] repo : string * + [] index : string * + [] body : IssueMeta * + ?ct : System.Threading.CancellationToken -> + Issue System.Threading.Tasks.Task + /// Get an issue's labels [] [] @@ -4778,6 +5881,37 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// Pin an Issue + [] + [] + abstract PinIssue : + [] owner : string * + [] repo : string * + [] index : int * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Unpin an Issue + [] + [] + abstract UnpinIssue : + [] owner : string * + [] repo : string * + [] index : int * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Moves the Pin to the given Position + [] + [] + abstract MoveIssuePin : + [] owner : string * + [] repo : string * + [] index : int * + [] position : int * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// Get a list reactions of an issue [] [] @@ -4999,7 +6133,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Update a label - [] + [] [] abstract IssueEditLabel : [] owner : string * @@ -5018,9 +6152,18 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> LanguageStatistics System.Threading.Tasks.Task + /// Get repo licenses + [] + [] + abstract RepoGetLicenses : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + string list System.Threading.Tasks.Task + /// Get a file or it's LFS object from a repository [] - [] + [] abstract RepoGetRawFileOrLFS : [] owner : string * [] repo : string * @@ -5029,6 +6172,16 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// Merge a branch from upstream + [] + [] + abstract RepoMergeUpstream : + [] owner : string * + [] repo : string * + [] body : MergeUpstreamRequest * + ?ct : System.Threading.CancellationToken -> + MergeUpstreamResponse System.Threading.Tasks.Task + /// Get all of a repository's opened milestones [] [] @@ -5073,7 +6226,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Update a milestone - [] + [] [] abstract IssueEditMilestone : [] owner : string * @@ -5092,6 +6245,15 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// Returns if new Issue Pins are allowed + [] + [] + abstract RepoNewPinAllowed : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + NewIssuePinsAllowed System.Threading.Tasks.Task + /// List users's notification threads on a specific repo [] [] @@ -5131,6 +6293,7 @@ type IGiteaClient = [] sort : string * [] milestone : int * [] labels : int list * + [] poster : string * [] page : int * [] limit : int * ?ct : System.Threading.CancellationToken -> @@ -5146,6 +6309,26 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> PullRequest System.Threading.Tasks.Task + /// List a repo's pinned pull requests + [] + [] + abstract RepoListPinnedPullRequests : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + PullRequest list System.Threading.Tasks.Task + + /// Get a pull request by base and head + [] + [] + abstract RepoGetPullRequestByBaseHead : + [] owner : string * + [] repo : string * + [] base' : string * + [] head : string * + ?ct : System.Threading.CancellationToken -> + PullRequest System.Threading.Tasks.Task + /// Get a pull request [] [] @@ -5157,7 +6340,7 @@ type IGiteaClient = PullRequest System.Threading.Tasks.Task /// Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. - [] + [] [] abstract RepoEditPullRequest : [] owner : string * @@ -5188,6 +6371,8 @@ type IGiteaClient = [] index : int * [] page : int * [] limit : int * + [] verification : bool * + [] files : bool * ?ct : System.Threading.CancellationToken -> Commit list System.Threading.Tasks.Task @@ -5412,7 +6597,7 @@ type IGiteaClient = /// Get a file from a repository [] - [] + [] abstract RepoGetRawFile : [] owner : string * [] repo : string * @@ -5429,7 +6614,6 @@ type IGiteaClient = [] repo : string * [] draft : bool * [] pre_release : bool * - [] per_page : int * [] page : int * [] limit : int * ?ct : System.Threading.CancellationToken -> @@ -5495,7 +6679,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Update a release - [] + [] [] abstract RepoEditRelease : [] owner : string * @@ -5538,7 +6722,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit a release attachment - [] + [] [] abstract RepoEditReleaseAttachment : [] owner : string * @@ -5641,6 +6825,56 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> WatchInfo System.Threading.Tasks.Task + /// List tag protections for a repository + [] + [] + abstract RepoListTagProtection : + [] owner : string * + [] repo : string * + ?ct : System.Threading.CancellationToken -> + TagProtection list System.Threading.Tasks.Task + + /// Create a tag protections for a repository + [] + [] + abstract RepoCreateTagProtection : + [] owner : string * + [] repo : string * + [] body : CreateTagProtectionOption * + ?ct : System.Threading.CancellationToken -> + TagProtection System.Threading.Tasks.Task + + /// Get a specific tag protection for the repository + [] + [] + abstract RepoGetTagProtection : + [] owner : string * + [] repo : string * + [] id : int * + ?ct : System.Threading.CancellationToken -> + TagProtection System.Threading.Tasks.Task + + /// Delete a specific tag protection for the repository + [] + [] + abstract RepoDeleteTagProtection : + [] owner : string * + [] repo : string * + [] id : int * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Edit a tag protections for a repository. Only fields that are set will be changed + [] + [] + abstract RepoEditTagProtection : + [] owner : string * + [] repo : string * + [] id : int * + [] body : EditTagProtectionOption * + ?ct : System.Threading.CancellationToken -> + TagProtection System.Threading.Tasks.Task + /// List a repository's tags [] [] @@ -5845,7 +7079,7 @@ type IGiteaClient = unit System.Threading.Tasks.Task /// Edit a wiki page - [] + [] [] abstract RepoEditWikiPage : [] owner : string * @@ -5936,7 +7170,7 @@ type IGiteaClient = [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a team - [] + [] [] abstract OrgEditTeam : [] id : int * @@ -5944,6 +7178,17 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> Team System.Threading.Tasks.Task + /// List a team's activity feeds + [] + [] + abstract OrgListTeamActivityFeeds : + [] id : int * + [] date : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Activity list System.Threading.Tasks.Task + /// List a team's members [] [] @@ -6036,6 +7281,35 @@ type IGiteaClient = [] abstract UserGetCurrent : ?ct : System.Threading.CancellationToken -> User System.Threading.Tasks.Task + /// Get an user's actions runner registration token + [] + [] + abstract UserGetRunnerRegistrationToken : + ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + + /// Delete a secret in a user scope + [] + [] + abstract DeleteUserSecret : + [] secretname : string * ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Get the user-level list of variables which is created by current doer + [] + [] + abstract GetUserVariablesList : + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + ActionVariable list System.Threading.Tasks.Task + + /// Get a user-level variable which is created by current doer + [] + [] + abstract GetUserVariable : + [] variablename : string * ?ct : System.Threading.CancellationToken -> + ActionVariable System.Threading.Tasks.Task + /// List the authenticated user's oauth2 applications [] [] @@ -6066,7 +7340,7 @@ type IGiteaClient = [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// update an OAuth2 Application, this includes regenerating the client secret - [] + [] [] abstract UserUpdateOAuth2Application : [] id : int * @@ -6074,6 +7348,50 @@ type IGiteaClient = ?ct : System.Threading.CancellationToken -> OAuth2Application System.Threading.Tasks.Task + /// Update Avatar + [] + [] + abstract UserUpdateAvatar : + [] body : UpdateUserAvatarOption * ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Delete Avatar + [] + [] + abstract UserDeleteAvatar : ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + + /// List users blocked by the authenticated user + [] + [] + abstract UserListBlocks : + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + User list System.Threading.Tasks.Task + + /// Check if a user is blocked by the authenticated user + [] + [] + abstract UserCheckUserBlock : + [] username : string * ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Unblock a user + [] + [] + abstract UserUnblockUser : + [] username : string * ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + + /// Block a user + [] + [] + abstract UserBlockUser : + [] username : string * + [] note : string * + ?ct : System.Threading.CancellationToken -> + unit System.Threading.Tasks.Task + /// List the authenticated user's email addresses [] [] @@ -6143,6 +7461,43 @@ type IGiteaClient = abstract UserCurrentDeleteGPGKey : [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + /// List the authenticated user's webhooks + [] + [] + abstract UserListHooks : + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Hook list System.Threading.Tasks.Task + + /// Create a hook + [] + [] + abstract UserCreateHook : + [] body : CreateHookOption * ?ct : System.Threading.CancellationToken -> + Hook System.Threading.Tasks.Task + + /// Get a hook + [] + [] + abstract UserGetHook : + [] id : int * ?ct : System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task + + /// Delete a hook + [] + [] + abstract UserDeleteHook : + [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + + /// Update a hook + [] + [] + abstract UserEditHook : + [] id : int * + [] body : EditHookOption * + ?ct : System.Threading.CancellationToken -> + Hook System.Threading.Tasks.Task + /// List the authenticated user's public keys [] [] @@ -6204,7 +7559,7 @@ type IGiteaClient = abstract GetUserSettings : ?ct : System.Threading.CancellationToken -> UserSettings list System.Threading.Tasks.Task /// Update user settings - [] + [] [] abstract UpdateUserSettings : [] body : UserSettingsOptions * ?ct : System.Threading.CancellationToken -> @@ -6302,6 +7657,18 @@ type IGiteaClient = [] username : string * ?ct : System.Threading.CancellationToken -> User System.Threading.Tasks.Task + /// List a user's activity feeds + [] + [] + abstract UserListActivityFeeds : + [] username : string * + [] only_performed_by : bool * + [] date : string * + [] page : int * + [] limit : int * + ?ct : System.Threading.CancellationToken -> + Activity list System.Threading.Tasks.Task + /// List the given user's followers [] [] diff --git a/Gitea.Declarative.Lib/Gitea.Declarative.Lib.fsproj b/Gitea.Declarative.Lib/Gitea.Declarative.Lib.fsproj index 748e75f..f757f39 100644 --- a/Gitea.Declarative.Lib/Gitea.Declarative.Lib.fsproj +++ b/Gitea.Declarative.Lib/Gitea.Declarative.Lib.fsproj @@ -14,7 +14,7 @@ git MIT gitea - 4.0.9 + 7.0.7 @@ -51,7 +51,7 @@ - + diff --git a/Gitea.Declarative.Lib/Gitea.fs b/Gitea.Declarative.Lib/Gitea.fs index 877c27a..35f1b15 100644 --- a/Gitea.Declarative.Lib/Gitea.fs +++ b/Gitea.Declarative.Lib/Gitea.fs @@ -30,7 +30,9 @@ module Gitea = List.getPaginated (fun page limit -> async { let! ct = Async.CancellationToken - return! client.AdminGetAllUsers (page, limit, ct) |> Async.AwaitTask + // This is a very Golang-brained API! I think these semantics are roughly correct, + // although there seems to be no way to enumerate source IDs. + return! client.AdminSearchUsers (0, "", page, limit, ct) |> Async.AwaitTask } ) @@ -269,6 +271,11 @@ module Gitea = hasChanged <- true Some desired.Description + AllowFastForwardOnlyMerge = None + HasActions = None + HasPackages = None + HasReleases = None + ProjectsMode = None } if hasChanged then @@ -382,6 +389,11 @@ module Gitea = Template = None Website = None + AllowFastForwardOnlyMerge = None + HasActions = None + HasPackages = None + HasReleases = None + ProjectsMode = None } @@ -651,6 +663,14 @@ module Gitea = RuleName = Some y.BranchName StatusCheckContexts = None UnprotectedFilePatterns = None + BlockAdminMergeOverride = None + EnableForcePush = None + EnableForcePushAllowlist = None + ForcePushAllowlistDeployKeys = None + ForcePushAllowlistTeams = None + ForcePushAllowlistUsernames = None + IgnoreStaleApprovals = y.IgnoreStaleApprovals + Priority = None } let! ct = Async.CancellationToken @@ -697,6 +717,14 @@ module Gitea = RequiredApprovals = None StatusCheckContexts = contents UnprotectedFilePatterns = None + BlockAdminMergeOverride = None + EnableForcePush = y.EnableForcePush + EnableForcePushAllowlist = None + ForcePushAllowlistDeployKeys = None + ForcePushAllowlistTeams = None + ForcePushAllowlistUsernames = None + IgnoreStaleApprovals = y.IgnoreStaleApprovals + Priority = None } let! ct = Async.CancellationToken @@ -752,6 +780,7 @@ module Gitea = Readme = None Template = None TrustModel = None + ObjectFormatName = None } let! ct = Async.CancellationToken @@ -834,6 +863,8 @@ module Gitea = Uid = None Wiki = Some true Description = Some desired.Description + AwsAccessKeyId = None + AwsSecretAccessKey = None } let! result = client.RepoMigrate options |> Async.AwaitTask |> Async.Catch @@ -947,7 +978,7 @@ module Gitea = FullName = Some user LoginName = Some user MustChangePassword = Some true - Password = pwd + Password = Some pwd Restricted = None SendNotify = None SourceId = None @@ -1036,7 +1067,9 @@ module Gitea = let! ct = Async.CancellationToken let! users = - List.getPaginated (fun page limit -> client.AdminGetAllUsers (page, limit, ct) |> Async.AwaitTask) + List.getPaginated (fun page limit -> + client.AdminSearchUsers (0, "", page, limit, ct) |> Async.AwaitTask + ) let! results = users diff --git a/Gitea.Declarative.Lib/GiteaConfig.schema.json b/Gitea.Declarative.Lib/GiteaConfig.schema.json index 82e7f1d..0faca9e 100644 --- a/Gitea.Declarative.Lib/GiteaConfig.schema.json +++ b/Gitea.Declarative.Lib/GiteaConfig.schema.json @@ -253,6 +253,12 @@ "items": { "type": "string" } + }, + "ignoreStaleApprovals": { + "type": "boolean" + }, + "enableForcePush": { + "type": "boolean" } } } diff --git a/Gitea.Declarative.Lib/SerialisedConfigSchema.fs b/Gitea.Declarative.Lib/SerialisedConfigSchema.fs index ea360b9..da2b942 100644 --- a/Gitea.Declarative.Lib/SerialisedConfigSchema.fs +++ b/Gitea.Declarative.Lib/SerialisedConfigSchema.fs @@ -30,6 +30,10 @@ type SerialisedProtectedBranch = [] [] RequiredStatusChecks : string array + [] + IgnoreStaleApprovals : Nullable + [] + EnableForcePush : Nullable } [] diff --git a/Gitea.Declarative.Lib/swagger.v1.json b/Gitea.Declarative.Lib/swagger.v1.json index e1aefa2..4665eaf 100644 --- a/Gitea.Declarative.Lib/swagger.v1.json +++ b/Gitea.Declarative.Lib/swagger.v1.json @@ -8,22 +8,22 @@ "text/html" ], "schemes": [ - "http", - "https" + "https", + "http" ], "swagger": "2.0", "info": { "description": "This documentation describes the Gitea API.", - "title": "Gitea API.", + "title": "Gitea API", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, - "version": "1.19.0" + "version": "1.23.5" }, "basePath": "/api/v1", "paths": { - "/activitypub/user/{username}": { + "/activitypub/user-id/{user-id}": { "get": { "produces": [ "application/json" @@ -35,9 +35,9 @@ "operationId": "activitypubPerson", "parameters": [ { - "type": "string", - "description": "username of the user", - "name": "username", + "type": "integer", + "description": "user ID of the user", + "name": "user-id", "in": "path", "required": true } @@ -49,7 +49,7 @@ } } }, - "/activitypub/user/{username}/inbox": { + "/activitypub/user-id/{user-id}/inbox": { "post": { "produces": [ "application/json" @@ -61,9 +61,9 @@ "operationId": "activitypubPersonInbox", "parameters": [ { - "type": "string", - "description": "username of the user", - "name": "username", + "type": "integer", + "description": "user ID of the user", + "name": "user-id", "in": "path", "required": true } @@ -138,6 +138,80 @@ } } }, + "/admin/emails": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List all emails", + "operationId": "adminGetAllEmails", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/emails/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Search all emails", + "operationId": "adminSearchEmails", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, "/admin/hooks": { "get": { "produces": [ @@ -223,6 +297,31 @@ } } }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete a hook", + "operationId": "adminDeleteHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, "patch": { "consumes": [ "application/json" @@ -293,6 +392,23 @@ } } }, + "/admin/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Get an global actions runner registration token", + "operationId": "adminGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, "/admin/unadopted": { "get": { "produces": [ @@ -414,9 +530,22 @@ "tags": [ "admin" ], - "summary": "List all users", - "operationId": "adminGetAllUsers", + "summary": "Search users according filter conditions", + "operationId": "adminSearchUsers", "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "ID of the user's login source to search for", + "name": "source_id", + "in": "query" + }, + { + "type": "string", + "description": "user's login name to search for", + "name": "login_name", + "in": "query" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -508,6 +637,9 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -545,6 +677,112 @@ "200": { "$ref": "#/responses/User" }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/badges": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List a user's badges", + "operationId": "adminListUserBadges", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BadgeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Add a badge to a user", + "operationId": "adminAddUserBadges", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UserBadgeOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Remove a badge from a user", + "operationId": "adminDeleteUserBadges", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UserBadgeOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, "403": { "$ref": "#/responses/forbidden" }, @@ -679,6 +917,46 @@ } } }, + "/admin/users/{username}/rename": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Rename a user", + "operationId": "adminRenameUser", + "parameters": [ + { + "type": "string", + "description": "existing username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RenameUserOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/admin/users/{username}/repos": { "post": { "consumes": [ @@ -731,29 +1009,140 @@ } } }, - "/amdin/hooks/{id}": { - "delete": { + "/gitignore/templates": { + "get": { "produces": [ "application/json" ], "tags": [ - "admin" + "miscellaneous" ], - "summary": "Delete a hook", - "operationId": "adminDeleteHook", + "summary": "Returns a list of all gitignore templates", + "operationId": "listGitignoresTemplates", + "responses": { + "200": { + "$ref": "#/responses/GitignoreTemplateList" + } + } + } + }, + "/gitignore/templates/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns information about a gitignore template", + "operationId": "getGitignoreTemplateInfo", "parameters": [ { - "type": "integer", - "format": "int64", - "description": "id of the hook to delete", - "name": "id", + "type": "string", + "description": "name of the template", + "name": "name", "in": "path", "required": true } ], "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/GitignoreTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/label/templates": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns a list of all label templates", + "operationId": "listLabelTemplates", + "responses": { + "200": { + "$ref": "#/responses/LabelTemplateList" + } + } + } + }, + "/label/templates/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns all labels in a template", + "operationId": "getLabelTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the template", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/licenses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns a list of all license templates", + "operationId": "listLicenseTemplates", + "responses": { + "200": { + "$ref": "#/responses/LicenseTemplateList" + } + } + } + }, + "/licenses/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns information about a license template", + "operationId": "getLicenseTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the license", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LicenseTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -824,6 +1213,38 @@ } } }, + "/markup": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "text/html" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Render a markup document as HTML", + "operationId": "renderMarkup", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MarkupOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkupRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/nodeinfo": { "get": { "produces": [ @@ -1096,6 +1517,9 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -1189,6 +1613,9 @@ "responses": { "200": { "$ref": "#/responses/Organization" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1213,6 +1640,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1248,6 +1678,650 @@ "responses": { "200": { "$ref": "#/responses/Organization" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an organization's actions runner registration token", + "operationId": "orgGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/orgs/{org}/actions/secrets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's actions secrets", + "operationId": "orgListActionsSecrets", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/secrets/{secretname}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create or Update a secret value in an organization", + "operationId": "updateOrgSecret", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete a secret in an organization", + "operationId": "deleteOrgSecret", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the organization" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/variables": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an org-level variables list", + "operationId": "getOrgVariablesList", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/variables/{variablename}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an org-level variable", + "operationId": "getOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update an org-level variable", + "operationId": "updateOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating an org-level variable" + }, + "204": { + "description": "response when updating an org-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create an org-level variable", + "operationId": "createOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating an org-level variable" + }, + "204": { + "description": "response when creating an org-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete an org-level variable", + "operationId": "deleteOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's activity feeds", + "operationId": "orgListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/avatar": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update Avatar", + "operationId": "orgUpdateAvatar", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateUserAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete Avatar", + "operationId": "orgDeleteAvatar", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/blocks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List users blocked by the organization", + "operationId": "organizationListBlocks", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/orgs/{org}/blocks/{username}": { + "get": { + "tags": [ + "organization" + ], + "summary": "Check if a user is blocked by the organization", + "operationId": "organizationCheckUserBlock", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "user to check", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": [ + "organization" + ], + "summary": "Block a user", + "operationId": "organizationBlockUser", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "user to block", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "optional note for the block", + "name": "note", + "in": "query" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Unblock a user", + "operationId": "organizationUnblockUser", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "user to unblock", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } } } @@ -1286,6 +2360,9 @@ "responses": { "200": { "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1321,6 +2398,9 @@ "responses": { "201": { "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -1355,6 +2435,9 @@ "responses": { "200": { "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1387,6 +2470,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1429,6 +2515,9 @@ "responses": { "200": { "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -1467,6 +2556,9 @@ "responses": { "200": { "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1502,6 +2594,9 @@ "201": { "$ref": "#/responses/Label" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -1538,6 +2633,9 @@ "responses": { "200": { "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1567,6 +2665,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1610,6 +2711,9 @@ "200": { "$ref": "#/responses/Label" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -1650,6 +2754,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -1717,6 +2824,9 @@ "responses": { "204": { "description": "member removed" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -1755,6 +2865,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -1822,6 +2935,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1856,6 +2972,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -1894,6 +3013,9 @@ "responses": { "200": { "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -1975,6 +3097,9 @@ "responses": { "200": { "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -2010,6 +3135,9 @@ "201": { "$ref": "#/responses/Team" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -2076,6 +3204,9 @@ } } } + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -2112,20 +3243,26 @@ }, { "enum": [ + "alpine", "cargo", "chef", "composer", "conan", "conda", "container", + "cran", + "debian", "generic", + "go", "helm", "maven", "npm", "nuget", "pub", "pypi", + "rpm", "rubygems", + "swift", "vagrant" ], "type": "string", @@ -2143,6 +3280,9 @@ "responses": { "200": { "$ref": "#/responses/PackageList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -2304,101 +3444,125 @@ "operationId": "issueSearchIssues", "parameters": [ { + "enum": [ + "open", + "closed", + "all" + ], "type": "string", - "description": "whether issue is open or closed", + "default": "open", + "description": "State of the issue", "name": "state", "in": "query" }, { "type": "string", - "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", + "description": "Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded.", "name": "labels", "in": "query" }, { "type": "string", - "description": "comma separated list of milestone names. Fetch only issues that have any of this milestones. Non existent are discarded", + "description": "Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded.", "name": "milestones", "in": "query" }, { "type": "string", - "description": "search string", + "description": "Search string", "name": "q", "in": "query" }, { "type": "integer", "format": "int64", - "description": "repository to prioritize in the results", + "description": "Repository ID to prioritize in the results", "name": "priority_repo_id", "in": "query" }, { + "enum": [ + "issues", + "pulls" + ], "type": "string", - "description": "filter by type (issues / pulls) if set", + "description": "Filter by issue type", "name": "type", "in": "query" }, { "type": "string", "format": "date-time", - "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "description": "Only show issues updated after the given time (RFC 3339 format)", "name": "since", "in": "query" }, { "type": "string", "format": "date-time", - "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "description": "Only show issues updated before the given time (RFC 3339 format)", "name": "before", "in": "query" }, { "type": "boolean", - "description": "filter (issues / pulls) assigned to you, default is false", + "default": false, + "description": "Filter issues or pulls assigned to the authenticated user", "name": "assigned", "in": "query" }, { "type": "boolean", - "description": "filter (issues / pulls) created by you, default is false", + "default": false, + "description": "Filter issues or pulls created by the authenticated user", "name": "created", "in": "query" }, { "type": "boolean", - "description": "filter (issues / pulls) mentioning you, default is false", + "default": false, + "description": "Filter issues or pulls mentioning the authenticated user", "name": "mentioned", "in": "query" }, { "type": "boolean", - "description": "filter pulls requesting your review, default is false", + "default": false, + "description": "Filter pull requests where the authenticated user's review was requested", "name": "review_requested", "in": "query" }, + { + "type": "boolean", + "default": false, + "description": "Filter pull requests reviewed by the authenticated user", + "name": "reviewed", + "in": "query" + }, { "type": "string", - "description": "filter by owner", + "description": "Filter by repository owner", "name": "owner", "in": "query" }, { "type": "string", - "description": "filter by team (requires organization owner parameter to be provided)", + "description": "Filter by team (requires organization owner parameter)", "name": "team", "in": "query" }, { + "minimum": 1, "type": "integer", - "description": "page number of results to return (1-based)", + "default": 1, + "description": "Page number of results to return (1-based)", "name": "page", "in": "query" }, { + "minimum": 0, "type": "integer", - "description": "page size of results", + "description": "Number of items per page", "name": "limit", "in": "query" } @@ -2406,6 +3570,12 @@ "responses": { "200": { "$ref": "#/responses/IssueList" + }, + "400": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } } } @@ -2543,7 +3713,7 @@ }, { "type": "string", - "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"", + "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\"", "name": "sort", "in": "query" }, @@ -2605,6 +3775,9 @@ "responses": { "200": { "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -2639,6 +3812,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -2682,12 +3858,572 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } } } }, + "/repos/{owner}/{repo}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/repos/{owner}/{repo}/actions/secrets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/secrets/{secretname}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create or Update a secret value in a repository", + "operationId": "updateRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a secret in a repository", + "operationId": "deleteRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the organization" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/tasks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TasksList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/actions/variables": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/variables/{variablename}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repo-level variable", + "operationId": "getRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a repo-level variable", + "operationId": "updateRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating a repo-level variable" + }, + "204": { + "description": "response when updating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a repo-level variable", + "operationId": "createRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a repo-level variable" + }, + "204": { + "description": "response when creating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repo-level variable", + "operationId": "deleteRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's activity feeds", + "operationId": "repoListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{owner}/{repo}/archive/{archive}": { "get": { "produces": [ @@ -2760,6 +4496,86 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/avatar": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateRepoAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -2843,6 +4659,61 @@ }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/branch_protections/priority": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update the priorities of branch protections for a repository.", + "operationId": "repoUpdateBranchProtectionPriories", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateBranchProtectionPriories" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -2981,6 +4852,9 @@ }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -3068,11 +4942,17 @@ "201": { "$ref": "#/responses/Branch" }, + "403": { + "description": "The branch is archived or a mirror." + }, "404": { "description": "The old branch does not exist." }, "409": { "description": "The branch with the same name already exists." + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -3160,6 +5040,66 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a branch", + "operationId": "repoUpdateBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the branch", + "name": "branch", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateBranchRepoOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } } } @@ -3205,6 +5145,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -3261,7 +5204,7 @@ "tags": [ "repository" ], - "summary": "Add a collaborator to a repository", + "summary": "Add or Update a collaborator to a repository", "operationId": "repoAddCollaborator", "parameters": [ { @@ -3297,6 +5240,12 @@ "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -3338,6 +5287,9 @@ "204": { "$ref": "#/responses/empty" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -3433,6 +5385,18 @@ "name": "stat", "in": "query" }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -3444,6 +5408,12 @@ "description": "page size of results (ignored if used with 'path')", "name": "limit", "in": "query" + }, + { + "type": "string", + "description": "commits that match the given specifier will not be listed.", + "name": "not", + "in": "query" } ], "responses": { @@ -3510,6 +5480,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -3591,6 +5564,95 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{sha}/pull": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the merged pull request of the commit", + "operationId": "repoGetCommitPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/compare/{basehead}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "compare two branches or commits", + "name": "basehead", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Compare" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -3635,6 +5697,60 @@ "$ref": "#/responses/notFound" } } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Modify multiple files in a repository", + "operationId": "repoChangeFiles", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } } }, "/repos/{owner}/{repo}/contents/{filepath}": { @@ -3740,6 +5856,9 @@ }, "422": { "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, @@ -3798,6 +5917,9 @@ }, "422": { "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, @@ -3856,6 +5978,9 @@ }, "404": { "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -3900,6 +6025,12 @@ "responses": { "200": { "$ref": "#/responses/FileResponse" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -3994,6 +6125,9 @@ "responses": { "200": { "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -4036,6 +6170,9 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "409": { "description": "The repository with the same name already exists." }, @@ -4084,6 +6221,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4119,6 +6259,24 @@ "name": "sha", "in": "path", "required": true + }, + { + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", + "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" } ], "responses": { @@ -4219,6 +6377,18 @@ "name": "sha", "in": "path", "required": true + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" } ], "responses": { @@ -4352,6 +6522,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4413,6 +6586,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4458,6 +6634,9 @@ "responses": { "200": { "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -4499,6 +6678,9 @@ "responses": { "201": { "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4532,6 +6714,9 @@ "responses": { "200": { "$ref": "#/responses/GitHookList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4796,6 +6981,9 @@ "responses": { "200": { "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4843,6 +7031,81 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_config": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the issue config for a repo", + "operationId": "repoGetIssueConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfig" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_config/validate": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the validation information for a issue config", + "operationId": "repoValidateIssueConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4876,6 +7139,9 @@ "responses": { "200": { "$ref": "#/responses/IssueTemplates" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -4960,7 +7226,7 @@ }, { "type": "string", - "description": "Only show items which were created by the the given user", + "description": "Only show items which were created by the given user", "name": "created_by", "in": "query" }, @@ -4992,6 +7258,9 @@ "responses": { "200": { "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -5037,11 +7306,17 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "412": { "$ref": "#/responses/error" }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -5101,6 +7376,9 @@ "responses": { "200": { "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -5254,6 +7532,9 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -5357,8 +7638,17 @@ "400": { "$ref": "#/responses/error" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -5461,6 +7751,9 @@ }, "404": { "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, @@ -5521,6 +7814,12 @@ }, "404": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -5568,6 +7867,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -5623,6 +7925,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -5675,6 +7980,45 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/pinned": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -5924,6 +8268,12 @@ }, "404": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -6026,6 +8376,9 @@ }, "404": { "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, @@ -6086,6 +8439,163 @@ }, "404": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/blocks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issues that are blocked by this issue", + "operationId": "issueListBlocks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unblock the issue given in the body by the issue in path", + "operationId": "issueRemoveIssueBlocking", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -6141,6 +8651,9 @@ "responses": { "200": { "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -6193,6 +8706,12 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -6372,6 +8891,163 @@ } } }, + "/repos/{owner}/{repo}/issues/{index}/dependencies": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List an issue's dependencies, i.e all issues that block this issue.", + "operationId": "issueListIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Make the issue in the url depend on the issue in the form.", + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, "/repos/{owner}/{repo}/issues/{index}/labels": { "get": { "produces": [ @@ -6464,6 +9140,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -6516,6 +9195,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -6558,6 +9240,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -6611,12 +9296,153 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } } } }, + "/repos/{owner}/{repo}/issues/{index}/pin": { + "post": { + "tags": [ + "issue" + ], + "summary": "Pin an Issue", + "operationId": "pinIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Unpin an Issue", + "operationId": "unpinIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to unpin", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "tags": [ + "issue" + ], + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{owner}/{repo}/issues/{index}/reactions": { "get": { "consumes": [ @@ -6672,6 +9498,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -6727,6 +9556,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -6779,6 +9611,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -7229,6 +10064,9 @@ "responses": { "200": { "$ref": "#/responses/TimelineList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -7360,6 +10198,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -7408,6 +10249,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -7466,6 +10310,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -7523,6 +10370,9 @@ "responses": { "200": { "$ref": "#/responses/DeployKeyList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -7565,6 +10415,9 @@ "201": { "$ref": "#/responses/DeployKey" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -7608,6 +10461,9 @@ "responses": { "200": { "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -7647,6 +10503,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -7692,6 +10551,9 @@ "responses": { "200": { "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -7734,6 +10596,9 @@ "201": { "$ref": "#/responses/Label" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -7777,6 +10642,9 @@ "responses": { "200": { "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -7813,6 +10681,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -7863,6 +10734,9 @@ "200": { "$ref": "#/responses/Label" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -7905,8 +10779,47 @@ } } }, + "/repos/{owner}/{repo}/licenses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo licenses", + "operationId": "repoGetLicenses", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LicensesList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{owner}/{repo}/media/{filepath}": { "get": { + "produces": [ + "application/octet-stream" + ], "tags": [ "repository" ], @@ -7929,21 +10842,70 @@ }, { "type": "string", - "description": "filepath of the file to get", + "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch", "name": "filepath", "in": "path", "required": true }, { "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "description": "The name of the commit/branch/tag. Default the repository’s default branch", "name": "ref", "in": "query" } ], "responses": { "200": { - "description": "Returns raw file content." + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/merge-upstream": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a branch from upstream", + "operationId": "repoMergeUpstream", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergeUpstreamRequest" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MergeUpstreamResponse" + }, + "400": { + "$ref": "#/responses/error" }, "404": { "$ref": "#/responses/notFound" @@ -8004,6 +10966,9 @@ "responses": { "200": { "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -8045,6 +11010,9 @@ "responses": { "201": { "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -8085,6 +11053,9 @@ "responses": { "200": { "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -8120,6 +11091,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -8168,6 +11142,9 @@ "responses": { "200": { "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -8204,6 +11181,45 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/new_pin_allowed": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -8378,26 +11394,27 @@ "parameters": [ { "type": "string", - "description": "owner of the repo", + "description": "Owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo", + "description": "Name of the repo", "name": "repo", "in": "path", "required": true }, { "enum": [ - "closed", "open", + "closed", "all" ], "type": "string", - "description": "State of pull request: open or closed (optional)", + "default": "open", + "description": "State of pull request", "name": "state", "in": "query" }, @@ -8434,14 +11451,23 @@ "in": "query" }, { + "type": "string", + "description": "Filter by pull request author", + "name": "poster", + "in": "query" + }, + { + "minimum": 1, "type": "integer", - "description": "page number of results to return (1-based)", + "default": 1, + "description": "Page number of results to return (1-based)", "name": "page", "in": "query" }, { + "minimum": 0, "type": "integer", - "description": "page size of results", + "description": "Page size of results", "name": "limit", "in": "query" } @@ -8449,6 +11475,12 @@ "responses": { "200": { "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "500": { + "$ref": "#/responses/error" } } }, @@ -8491,11 +11523,106 @@ "201": { "$ref": "#/responses/PullRequest" }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, "409": { "$ref": "#/responses/error" }, "422": { "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/pinned": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned pull requests", + "operationId": "repoListPinnedPullRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{base}/{head}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request by base and head", + "operationId": "repoGetPullRequestByBaseHead", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "base of the pull request to get", + "name": "base", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "head of the pull request to get", + "name": "head", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -8593,6 +11720,9 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "409": { "$ref": "#/responses/error" }, @@ -8710,6 +11840,18 @@ "description": "page size of results", "name": "limit", "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" } ], "responses": { @@ -8883,11 +12025,17 @@ "200": { "$ref": "#/responses/empty" }, + "404": { + "$ref": "#/responses/notFound" + }, "405": { "$ref": "#/responses/empty" }, "409": { "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, @@ -8933,6 +12081,9 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -9036,6 +12187,9 @@ "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, @@ -9429,6 +12583,9 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -9484,6 +12641,9 @@ "403": { "$ref": "#/responses/forbidden" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/validationError" } @@ -9600,6 +12760,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -9639,7 +12802,7 @@ } ], "responses": { - "201": { + "200": { "$ref": "#/responses/PushMirror" }, "400": { @@ -9647,6 +12810,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -9686,6 +12852,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -9732,6 +12901,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -9783,7 +12955,7 @@ "/repos/{owner}/{repo}/raw/{filepath}": { "get": { "produces": [ - "application/json" + "application/octet-stream" ], "tags": [ "repository" @@ -9807,21 +12979,24 @@ }, { "type": "string", - "description": "filepath of the file to get", + "description": "path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch", "name": "filepath", "in": "path", "required": true }, { "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "description": "The name of the commit/branch/tag. Default the repository’s default branch", "name": "ref", "in": "query" } ], "responses": { "200": { - "description": "Returns raw file content." + "description": "Returns raw file content.", + "schema": { + "type": "file" + } }, "404": { "$ref": "#/responses/notFound" @@ -9866,12 +13041,6 @@ "name": "pre-release", "in": "query" }, - { - "type": "integer", - "description": "page size of results, deprecated - use limit", - "name": "per_page", - "in": "query" - }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -9888,6 +13057,9 @@ "responses": { "200": { "$ref": "#/responses/ReleaseList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -9935,6 +13107,9 @@ }, "409": { "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" } } } @@ -10053,8 +13228,8 @@ "404": { "$ref": "#/responses/notFound" }, - "405": { - "$ref": "#/responses/empty" + "422": { + "$ref": "#/responses/validationError" } } } @@ -10139,8 +13314,8 @@ "404": { "$ref": "#/responses/notFound" }, - "405": { - "$ref": "#/responses/empty" + "422": { + "$ref": "#/responses/validationError" } } }, @@ -10234,12 +13409,16 @@ "responses": { "200": { "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, "post": { "consumes": [ - "multipart/form-data" + "multipart/form-data", + "application/octet-stream" ], "produces": [ "application/json" @@ -10282,8 +13461,7 @@ "type": "file", "description": "attachment to upload", "name": "attachment", - "in": "formData", - "required": true + "in": "formData" } ], "responses": { @@ -10292,6 +13470,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -10341,6 +13522,9 @@ "responses": { "200": { "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -10388,6 +13572,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -10445,6 +13632,12 @@ "responses": { "201": { "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" } } } @@ -10478,6 +13671,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -10559,6 +13755,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -10640,6 +13839,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -10688,6 +13890,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -10733,6 +13938,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -10794,6 +14002,12 @@ "responses": { "200": { "$ref": "#/responses/WatchInfo" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -10822,6 +14036,236 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/tag_protections": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List tag protections for a repository", + "operationId": "repoListTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/TagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/tag_protections/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific tag protection for the repository", + "operationId": "repoGetTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the tag protect to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific tag protection for the repository", + "operationId": "repoDeleteTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTagProtectionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -10867,6 +14311,9 @@ "responses": { "200": { "$ref": "#/responses/TagList" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -10914,6 +14361,12 @@ }, "409": { "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -11004,6 +14457,12 @@ }, "409": { "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -11037,6 +14496,9 @@ "responses": { "200": { "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -11122,6 +14584,9 @@ "204": { "$ref": "#/responses/empty" }, + "404": { + "$ref": "#/responses/notFound" + }, "405": { "$ref": "#/responses/error" }, @@ -11166,6 +14631,9 @@ "204": { "$ref": "#/responses/empty" }, + "404": { + "$ref": "#/responses/notFound" + }, "405": { "$ref": "#/responses/error" }, @@ -11242,6 +14710,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -11289,6 +14760,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -11334,6 +14808,9 @@ "responses": { "200": { "$ref": "#/responses/TopicNames" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -11373,6 +14850,9 @@ "204": { "$ref": "#/responses/empty" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/invalidTopicsError" } @@ -11416,6 +14896,9 @@ "204": { "$ref": "#/responses/empty" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/invalidTopicsError" } @@ -11457,6 +14940,9 @@ "204": { "$ref": "#/responses/empty" }, + "404": { + "$ref": "#/responses/notFound" + }, "422": { "$ref": "#/responses/invalidTopicsError" } @@ -11634,6 +15120,12 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -11718,6 +15210,9 @@ }, "404": { "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } }, @@ -11769,6 +15264,12 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" } } } @@ -11948,6 +15449,9 @@ "responses": { "200": { "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -12063,6 +15567,9 @@ "responses": { "200": { "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -12085,6 +15592,9 @@ "responses": { "204": { "description": "team deleted" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -12119,6 +15629,58 @@ "responses": { "200": { "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's activity feeds", + "operationId": "orgListTeamActivityFeeds", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -12158,6 +15720,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -12228,6 +15793,9 @@ "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" } @@ -12304,6 +15872,9 @@ "responses": { "200": { "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -12390,6 +15961,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -12433,6 +16007,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -12474,6 +16051,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -12495,6 +16075,289 @@ } } }, + "/user/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get an user's actions runner registration token", + "operationId": "userGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/user/actions/secrets/{secretname}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create or Update a secret value in a user scope", + "operationId": "updateUserSecret", + "parameters": [ + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a secret in a user scope", + "operationId": "deleteUserSecret", + "parameters": [ + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the user" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/actions/variables": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get the user-level list of variables which is created by current doer", + "operationId": "getUserVariablesList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/actions/variables/{variablename}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a user-level variable which is created by current doer", + "operationId": "getUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update a user-level variable which is created by current doer", + "operationId": "updateUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating a variable" + }, + "204": { + "description": "response when updating a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a user-level variable", + "operationId": "createUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a variable" + }, + "204": { + "description": "response when creating a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a user-level variable which is created by current doer", + "operationId": "deleteUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/user/applications/oauth2": { "get": { "produces": [ @@ -12648,6 +16511,164 @@ } } }, + "/user/avatar": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update Avatar", + "operationId": "userUpdateAvatar", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateUserAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete Avatar", + "operationId": "userDeleteAvatar", + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/user/blocks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List users blocked by the authenticated user", + "operationId": "userListBlocks", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/user/blocks/{username}": { + "get": { + "tags": [ + "user" + ], + "summary": "Check if a user is blocked by the authenticated user", + "operationId": "userCheckUserBlock", + "parameters": [ + { + "type": "string", + "description": "user to check", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": [ + "user" + ], + "summary": "Block a user", + "operationId": "userBlockUser", + "parameters": [ + { + "type": "string", + "description": "user to block", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "optional note for the block", + "name": "note", + "in": "query" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "tags": [ + "user" + ], + "summary": "Unblock a user", + "operationId": "userUnblockUser", + "parameters": [ + { + "type": "string", + "description": "user to unblock", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/user/emails": { "get": { "produces": [ @@ -12824,6 +16845,12 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -12845,6 +16872,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13020,6 +17050,152 @@ } } }, + "/user/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's webhooks", + "operationId": "userListHooks", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a hook", + "operationId": "userCreateHook", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/user/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a hook", + "operationId": "userGetHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a hook", + "operationId": "userDeleteHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update a hook", + "operationId": "userEditHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + } + }, "/user/keys": { "get": { "produces": [ @@ -13175,6 +17351,9 @@ "responses": { "200": { "$ref": "#/responses/OrganizationList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13376,6 +17555,12 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -13404,6 +17589,9 @@ "responses": { "204": { "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13636,6 +17824,60 @@ } } }, + "/users/{username}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List a user's activity feeds", + "operationId": "userListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "if true, only show actions performed by the requested user", + "name": "only-performed-by", + "in": "query" + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/users/{username}/followers": { "get": { "produces": [ @@ -13670,6 +17912,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13708,6 +17953,9 @@ "responses": { "200": { "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13779,6 +18027,9 @@ "responses": { "200": { "$ref": "#/responses/GPGKeyList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13852,6 +18103,9 @@ "responses": { "200": { "$ref": "#/responses/PublicKeyList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13890,6 +18144,9 @@ "responses": { "200": { "$ref": "#/responses/OrganizationList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -13967,6 +18224,9 @@ "responses": { "200": { "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -14005,6 +18265,9 @@ "responses": { "200": { "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -14043,6 +18306,9 @@ "responses": { "200": { "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -14081,6 +18347,9 @@ "responses": { "200": { "$ref": "#/responses/AccessTokenList" + }, + "403": { + "$ref": "#/responses/forbidden" } } }, @@ -14118,6 +18387,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" } } } @@ -14152,6 +18424,9 @@ "204": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, @@ -14226,6 +18501,209 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "ActionTask": { + "description": "ActionTask represents a ActionTask", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "display_title": { + "type": "string", + "x-go-name": "DisplayTitle" + }, + "event": { + "type": "string", + "x-go-name": "Event" + }, + "head_branch": { + "type": "string", + "x-go-name": "HeadBranch" + }, + "head_sha": { + "type": "string", + "x-go-name": "HeadSHA" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "run_number": { + "type": "integer", + "format": "int64", + "x-go-name": "RunNumber" + }, + "run_started_at": { + "type": "string", + "format": "date-time", + "x-go-name": "RunStartedAt" + }, + "status": { + "type": "string", + "x-go-name": "Status" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "UpdatedAt" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "workflow_id": { + "type": "string", + "x-go-name": "WorkflowID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ActionTaskResponse": { + "description": "ActionTaskResponse returns a ActionTask", + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "workflow_runs": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionTask" + }, + "x-go-name": "Entries" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ActionVariable": { + "description": "ActionVariable return value of the query API", + "type": "object", + "properties": { + "data": { + "description": "the value of the variable", + "type": "string", + "x-go-name": "Data" + }, + "name": { + "description": "the name of the variable", + "type": "string", + "x-go-name": "Name" + }, + "owner_id": { + "description": "the owner to which the variable belongs", + "type": "integer", + "format": "int64", + "x-go-name": "OwnerID" + }, + "repo_id": { + "description": "the repository to which the variable belongs", + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Activity": { + "type": "object", + "properties": { + "act_user": { + "$ref": "#/definitions/User" + }, + "act_user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ActUserID" + }, + "comment": { + "$ref": "#/definitions/Comment" + }, + "comment_id": { + "type": "integer", + "format": "int64", + "x-go-name": "CommentID" + }, + "content": { + "type": "string", + "x-go-name": "Content" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_private": { + "type": "boolean", + "x-go-name": "IsPrivate" + }, + "op_type": { + "description": "the type of action", + "type": "string", + "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" + ], + "x-go-name": "OpType" + }, + "ref_name": { + "type": "string", + "x-go-name": "RefName" + }, + "repo": { + "$ref": "#/definitions/Repository" + }, + "repo_id": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "ActivityPub": { "description": "ActivityPub type", "type": "object", @@ -14243,6 +18721,11 @@ "properties": { "permission": { "type": "string", + "enum": [ + "read", + "write", + "admin" + ], "x-go-name": "Permission" } }, @@ -14364,6 +18847,30 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "Badge": { + "description": "Badge represents a user badge", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "image_url": { + "type": "string", + "x-go-name": "ImageURL" + }, + "slug": { + "type": "string", + "x-go-name": "Slug" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "Branch": { "description": "Branch represents a repository branch", "type": "object", @@ -14428,6 +18935,10 @@ }, "x-go-name": "ApprovalsWhitelistUsernames" }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, "block_on_official_review_requests": { "type": "boolean", "x-go-name": "BlockOnOfficialReviewRequests" @@ -14458,6 +18969,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, "enable_merge_whitelist": { "type": "boolean", "x-go-name": "EnableMergeWhitelist" @@ -14474,6 +18993,28 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistDeployKeys" + }, + "force_push_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistTeams" + }, + "force_push_allowlist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistUsernames" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, "merge_whitelist_teams": { "type": "array", "items": { @@ -14488,6 +19029,11 @@ }, "x-go-name": "MergeWhitelistUsernames" }, + "priority": { + "type": "integer", + "format": "int64", + "x-go-name": "Priority" + }, "protected_file_patterns": { "type": "string", "x-go-name": "ProtectedFilePatterns" @@ -14542,6 +19088,94 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "ChangeFileOperation": { + "description": "ChangeFileOperation for creating, updating or deleting a file", + "type": "object", + "required": [ + "operation", + "path" + ], + "properties": { + "content": { + "description": "new or updated file content, must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "from_path": { + "description": "old path of the file to move", + "type": "string", + "x-go-name": "FromPath" + }, + "operation": { + "description": "indicates what to do with the file", + "type": "string", + "enum": [ + "create", + "update", + "delete" + ], + "x-go-name": "Operation" + }, + "path": { + "description": "path to the existing or new file", + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "description": "sha is the SHA for the file that already exists, required for update or delete", + "type": "string", + "x-go-name": "SHA" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ChangeFilesOptions": { + "description": "ChangeFilesOptions options for creating, updating or deleting multiple files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "files" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "files": { + "description": "list of file operations", + "type": "array", + "items": { + "$ref": "#/definitions/ChangeFileOperation" + }, + "x-go-name": "Files" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "ChangedFile": { "description": "ChangedFile store information about files affected by the pull request", "type": "object", @@ -14739,6 +19373,10 @@ "filename": { "type": "string", "x-go-name": "Filename" + }, + "status": { + "type": "string", + "x-go-name": "Status" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -14847,7 +19485,7 @@ "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CommitStatusState": { - "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", + "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\" and \"failure\"", "type": "string", "x-go-package": "code.gitea.io/gitea/modules/structs" }, @@ -14871,6 +19509,25 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "Compare": { + "type": "object", + "title": "Compare represents a comparison between two commits.", + "properties": { + "commits": { + "type": "array", + "items": { + "$ref": "#/definitions/Commit" + }, + "x-go-name": "Commits" + }, + "total_commits": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCommits" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "ContentsResponse": { "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content", "type": "object", @@ -14982,6 +19639,10 @@ }, "x-go-name": "ApprovalsWhitelistUsernames" }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, "block_on_official_review_requests": { "type": "boolean", "x-go-name": "BlockOnOfficialReviewRequests" @@ -15007,6 +19668,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, "enable_merge_whitelist": { "type": "boolean", "x-go-name": "EnableMergeWhitelist" @@ -15023,6 +19692,28 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistDeployKeys" + }, + "force_push_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistTeams" + }, + "force_push_allowlist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistUsernames" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, "merge_whitelist_teams": { "type": "array", "items": { @@ -15037,6 +19728,11 @@ }, "x-go-name": "MergeWhitelistUsernames" }, + "priority": { + "type": "integer", + "format": "int64", + "x-go-name": "Priority" + }, "protected_file_patterns": { "type": "string", "x-go-name": "ProtectedFilePatterns" @@ -15100,10 +19796,16 @@ "x-go-name": "BranchName" }, "old_branch_name": { - "description": "Name of the old branch to create from", + "description": "Deprecated: true\nName of the old branch to create from", "type": "string", "uniqueItems": true, "x-go-name": "OldBranchName" + }, + "old_ref_name": { + "description": "Name of the old branch/tag/commit to create from", + "type": "string", + "uniqueItems": true, + "x-go-name": "OldRefName" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -15144,7 +19846,7 @@ "content": { "description": "content must be base64 encoded", "type": "string", - "x-go-name": "Content" + "x-go-name": "ContentBase64" }, "dates": { "$ref": "#/definitions/CommitDateOptions" @@ -15384,6 +20086,11 @@ "x-go-name": "Exclusive", "example": false }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, "name": { "type": "string", "x-go-name": "Name" @@ -15437,6 +20144,25 @@ "type": "string" }, "x-go-name": "RedirectURIs" + }, + "skip_secondary_authorization": { + "type": "boolean", + "x-go-name": "SkipSecondaryAuthorization" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateOrUpdateSecretOption": { + "description": "CreateOrUpdateSecretOption options when creating or updating secret", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Data of the secret to update", + "type": "string", + "x-go-name": "Data" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -15452,6 +20178,10 @@ "type": "string", "x-go-name": "Description" }, + "email": { + "type": "string", + "x-go-name": "Email" + }, "full_name": { "type": "string", "x-go-name": "FullName" @@ -15530,6 +20260,20 @@ "format": "int64", "x-go-name": "Milestone" }, + "reviewers": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Reviewers" + }, + "team_reviewers": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "TeamReviewers" + }, "title": { "type": "string", "x-go-name": "Title" @@ -15694,6 +20438,15 @@ "uniqueItems": true, "x-go-name": "Name" }, + "object_format_name": { + "description": "ObjectFormatName of the underlying git repository", + "type": "string", + "enum": [ + "sha1", + "sha256" + ], + "x-go-name": "ObjectFormatName" + }, "private": { "description": "Whether the repository is private", "type": "boolean", @@ -15767,6 +20520,31 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "CreateTagProtectionOption": { + "description": "CreateTagProtectionOption options for creating a tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "CreateTeamOption": { "description": "CreateTeamOption options for creating a team", "type": "object", @@ -15806,10 +20584,12 @@ }, "x-go-name": "Units", "example": [ + "repo.actions", "repo.code", "repo.issues", "repo.ext_issues", "repo.wiki", + "repo.ext_wiki", "repo.pulls", "repo.releases", "repo.projects", @@ -15822,16 +20602,7 @@ "type": "string" }, "x-go-name": "UnitsMap", - "example": { - "repo.code": "read", - "repo.ext_issues": "none", - "repo.ext_wiki": "none", - "repo.issues": "write", - "repo.projects": "none", - "repo.pulls": "owner", - "repo.releases": "none", - "repo.wiki": "admin" - } + "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\"}" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -15841,8 +20612,7 @@ "type": "object", "required": [ "username", - "email", - "password" + "email" ], "properties": { "created_at": { @@ -15896,6 +20666,21 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "CreateVariableOption": { + "description": "CreateVariableOption the option when creating variable", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "description": "Value of the variable to create", + "type": "string", + "x-go-name": "Value" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "CreateWikiPageOptions": { "description": "CreateWikiPageOptions form for creating wiki", "type": "object", @@ -16096,6 +20881,10 @@ }, "x-go-name": "ApprovalsWhitelistUsernames" }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, "block_on_official_review_requests": { "type": "boolean", "x-go-name": "BlockOnOfficialReviewRequests" @@ -16116,6 +20905,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, "enable_merge_whitelist": { "type": "boolean", "x-go-name": "EnableMergeWhitelist" @@ -16132,6 +20929,28 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistDeployKeys" + }, + "force_push_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistTeams" + }, + "force_push_allowlist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistUsernames" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, "merge_whitelist_teams": { "type": "array", "items": { @@ -16146,6 +20965,11 @@ }, "x-go-name": "MergeWhitelistUsernames" }, + "priority": { + "type": "integer", + "format": "int64", + "x-go-name": "Priority" + }, "protected_file_patterns": { "type": "string", "x-go-name": "ProtectedFilePatterns" @@ -16331,6 +21155,11 @@ "x-go-name": "Exclusive", "example": false }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, "name": { "type": "string", "x-go-name": "Name" @@ -16370,6 +21199,10 @@ "type": "string", "x-go-name": "Description" }, + "email": { + "type": "string", + "x-go-name": "Email" + }, "full_name": { "type": "string", "x-go-name": "FullName" @@ -16505,6 +21338,11 @@ "description": "EditRepoOption options when editing a repository's properties", "type": "object", "properties": { + "allow_fast_forward_only_merge": { + "description": "either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.", + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, "allow_manual_merge": { "description": "either `true` to allow mark pr as merged manually, or `false` to prevent it.", "type": "boolean", @@ -16561,7 +21399,7 @@ "x-go-name": "DefaultDeleteBranchAfterMerge" }, "default_merge_style": { - "description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\".", + "description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\".", "type": "string", "x-go-name": "DefaultMergeStyle" }, @@ -16571,7 +21409,7 @@ "x-go-name": "Description" }, "enable_prune": { - "description": "enable prune - remove obsolete remote-tracking references", + "description": "enable prune - remove obsolete remote-tracking references when mirroring", "type": "boolean", "x-go-name": "EnablePrune" }, @@ -16581,11 +21419,21 @@ "external_wiki": { "$ref": "#/definitions/ExternalWiki" }, + "has_actions": { + "description": "either `true` to enable actions unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasActions" + }, "has_issues": { "description": "either `true` to enable issues for this repository or `false` to disable them.", "type": "boolean", "x-go-name": "HasIssues" }, + "has_packages": { + "description": "either `true` to enable packages unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasPackages" + }, "has_projects": { "description": "either `true` to enable project unit, or `false` to disable them.", "type": "boolean", @@ -16596,6 +21444,11 @@ "type": "boolean", "x-go-name": "HasPullRequests" }, + "has_releases": { + "description": "either `true` to enable releases unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasReleases" + }, "has_wiki": { "description": "either `true` to enable the wiki for this repository or `false` to disable it.", "type": "boolean", @@ -16625,6 +21478,11 @@ "type": "boolean", "x-go-name": "Private" }, + "projects_mode": { + "description": "`repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both.", + "type": "string", + "x-go-name": "ProjectsMode" + }, "template": { "description": "either `true` to make this repository a template or `false` to make it a normal repository", "type": "boolean", @@ -16638,6 +21496,31 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "EditTagProtectionOption": { + "description": "EditTagProtectionOption options for editing a tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "EditTeamOption": { "description": "EditTeamOption options for editing a team", "type": "object", @@ -16806,6 +21689,15 @@ "type": "boolean", "x-go-name": "Primary" }, + "user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, "verified": { "type": "boolean", "x-go-name": "Verified" @@ -16947,6 +21839,26 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "FilesResponse": { + "description": "FilesResponse contains information about multiple files from a repo", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentsResponse" + }, + "x-go-name": "Files" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "GPGKey": { "description": "GPGKey a user GPG key to sign commit and tag in repository", "type": "object", @@ -17192,6 +22104,11 @@ "type": "boolean", "x-go-name": "Private" }, + "protected_branch": { + "description": "include protected branches in template repo", + "type": "boolean", + "x-go-name": "ProtectedBranch" + }, "topics": { "description": "include topics in template repo", "type": "boolean", @@ -17339,6 +22256,21 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "GitignoreTemplateInfo": { + "description": "GitignoreTemplateInfo name and text of a gitignore template", + "type": "object", + "properties": { + "name": { + "type": "string", + "x-go-name": "Name" + }, + "source": { + "type": "string", + "x-go-name": "Source" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "Hook": { "description": "Hook a hook is a web hook when one repository changed", "type": "object", @@ -17351,6 +22283,10 @@ "type": "string", "x-go-name": "AuthorizationHeader" }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, "config": { "type": "object", "additionalProperties": { @@ -17507,6 +22443,11 @@ "format": "int64", "x-go-name": "OriginalAuthorID" }, + "pin_order": { + "type": "integer", + "format": "int64", + "x-go-name": "PinOrder" + }, "pull_request": { "$ref": "#/definitions/PullRequestMeta" }, @@ -17539,6 +22480,55 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "IssueConfig": { + "type": "object", + "properties": { + "blank_issues_enabled": { + "type": "boolean", + "x-go-name": "BlankIssuesEnabled" + }, + "contact_links": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueConfigContactLink" + }, + "x-go-name": "ContactLinks" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueConfigContactLink": { + "type": "object", + "properties": { + "about": { + "type": "string", + "x-go-name": "About" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueConfigValidation": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "valid": { + "type": "boolean", + "x-go-name": "Valid" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "IssueDeadline": { "description": "IssueDeadline represents an issue deadline", "type": "object", @@ -17571,6 +22561,13 @@ "type": "object", "additionalProperties": {}, "x-go-name": "Validations" + }, + "visible": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueFormFieldVisible" + }, + "x-go-name": "Visible" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -17580,22 +22577,44 @@ "title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"", "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "IssueFormFieldVisible": { + "description": "IssueFormFieldVisible defines issue form field visible", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "IssueLabelsOption": { "description": "IssueLabelsOption a collection of labels", "type": "object", "properties": { "labels": { - "description": "list of label IDs", + "description": "Labels can be a list of integers representing label IDs\nor a list of strings representing label names", "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, + "items": {}, "x-go-name": "Labels" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "IssueMeta": { + "description": "IssueMeta basic issue information", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "owner": { + "type": "string", + "x-go-name": "Owner" + }, + "repo": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "IssueTemplate": { "description": "IssueTemplate represents an issue template for a repository", "type": "object", @@ -17604,6 +22623,9 @@ "type": "string", "x-go-name": "About" }, + "assignees": { + "$ref": "#/definitions/IssueTemplateStringSlice" + }, "body": { "type": "array", "items": { @@ -17620,7 +22642,7 @@ "x-go-name": "FileName" }, "labels": { - "$ref": "#/definitions/IssueTemplateLabels" + "$ref": "#/definitions/IssueTemplateStringSlice" }, "name": { "type": "string", @@ -17637,7 +22659,7 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, - "IssueTemplateLabels": { + "IssueTemplateStringSlice": { "type": "array", "items": { "type": "string" @@ -17667,6 +22689,82 @@ "format": "int64", "x-go-name": "ID" }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "LabelTemplate": { + "description": "LabelTemplate info of a Label template", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "LicenseTemplateInfo": { + "description": "LicensesInfo contains information about a License", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "implementation": { + "type": "string", + "x-go-name": "Implementation" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "LicensesTemplateListEntry": { + "description": "LicensesListEntry is used for the API", + "type": "object", + "properties": { + "key": { + "type": "string", + "x-go-name": "Key" + }, "name": { "type": "string", "x-go-name": "Name" @@ -17683,11 +22781,11 @@ "type": "object", "properties": { "Context": { - "description": "Context to render\n\nin: body", + "description": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}\n\nin: body", "type": "string" }, "Mode": { - "description": "Mode to render\n\nin: body", + "description": "Mode to render (markdown, comment, wiki, file)\n\nin: body", "type": "string" }, "Text": { @@ -17695,7 +22793,34 @@ "type": "string" }, "Wiki": { - "description": "Is it a wiki page ?\n\nin: body", + "description": "Is it a wiki page? (use mode=wiki instead)\n\nDeprecated: true\nin: body", + "type": "boolean" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MarkupOption": { + "description": "MarkupOption markup options", + "type": "object", + "properties": { + "Context": { + "description": "URL path for rendering issue, media and file links\nExpected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}\n\nin: body", + "type": "string" + }, + "FilePath": { + "description": "File path for detecting extension in file mode\n\nin: body", + "type": "string" + }, + "Mode": { + "description": "Mode to render (markdown, comment, wiki, file)\n\nin: body", + "type": "string" + }, + "Text": { + "description": "Text markup to render\n\nin: body", + "type": "string" + }, + "Wiki": { + "description": "Is it a wiki page? (use mode=wiki instead)\n\nDeprecated: true\nin: body", "type": "boolean" } }, @@ -17715,6 +22840,7 @@ "rebase", "rebase-merge", "squash", + "fast-forward-only", "manually-merged" ] }, @@ -17747,6 +22873,26 @@ "x-go-name": "MergePullRequestForm", "x-go-package": "code.gitea.io/gitea/services/forms" }, + "MergeUpstreamRequest": { + "type": "object", + "properties": { + "branch": { + "type": "string", + "x-go-name": "Branch" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MergeUpstreamResponse": { + "type": "object", + "properties": { + "merge_type": { + "type": "string", + "x-go-name": "MergeStyle" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "MigrateRepoOptions": { "description": "MigrateRepoOptions options for migrating repository's\nthis is used to interact with api v1", "type": "object", @@ -17767,6 +22913,14 @@ "type": "string", "x-go-name": "AuthUsername" }, + "aws_access_key_id": { + "type": "string", + "x-go-name": "AWSAccessKeyID" + }, + "aws_secret_access_key": { + "type": "string", + "x-go-name": "AWSSecretAccessKey" + }, "clone_addr": { "type": "string", "x-go-name": "CloneAddr" @@ -17830,7 +22984,11 @@ "git", "github", "gitea", - "gitlab" + "gitlab", + "gogs", + "onedev", + "gitbucket", + "codebase" ], "x-go-name": "Service" }, @@ -17900,6 +23058,21 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "NewIssuePinsAllowed": { + "description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed", + "type": "object", + "properties": { + "issues": { + "type": "boolean", + "x-go-name": "Issues" + }, + "pull_requests": { + "type": "boolean", + "x-go-name": "PullRequests" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "NodeInfo": { "description": "NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks", "type": "object", @@ -18156,6 +23329,10 @@ "type": "string" }, "x-go-name": "RedirectURIs" + }, + "skip_secondary_authorization": { + "type": "boolean", + "x-go-name": "SkipSecondaryAuthorization" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -18172,6 +23349,10 @@ "type": "string", "x-go-name": "Description" }, + "email": { + "type": "string", + "x-go-name": "Email" + }, "full_name": { "type": "string", "x-go-name": "FullName" @@ -18275,6 +23456,10 @@ "creator": { "$ref": "#/definitions/User" }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, "id": { "type": "integer", "format": "int64", @@ -18506,6 +23691,11 @@ "description": "PullRequest represents a pull request", "type": "object", "properties": { + "additions": { + "type": "integer", + "format": "int64", + "x-go-name": "Additions" + }, "allow_maintainer_edit": { "type": "boolean", "x-go-name": "AllowMaintainerEdit" @@ -18527,6 +23717,11 @@ "type": "string", "x-go-name": "Body" }, + "changed_files": { + "type": "integer", + "format": "int64", + "x-go-name": "ChangedFiles" + }, "closed_at": { "type": "string", "format": "date-time", @@ -18542,10 +23737,19 @@ "format": "date-time", "x-go-name": "Created" }, + "deletions": { + "type": "integer", + "format": "int64", + "x-go-name": "Deletions" + }, "diff_url": { "type": "string", "x-go-name": "DiffURL" }, + "draft": { + "type": "boolean", + "x-go-name": "Draft" + }, "due_date": { "type": "string", "format": "date-time", @@ -18610,6 +23814,31 @@ "type": "string", "x-go-name": "PatchURL" }, + "pin_order": { + "type": "integer", + "format": "int64", + "x-go-name": "PinOrder" + }, + "requested_reviewers": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "RequestedReviewers" + }, + "requested_reviewers_teams": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + }, + "x-go-name": "RequestedReviewersTeams" + }, + "review_comments": { + "description": "number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)", + "type": "integer", + "format": "int64", + "x-go-name": "ReviewComments" + }, "state": { "$ref": "#/definitions/StateType" }, @@ -18636,6 +23865,14 @@ "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { + "draft": { + "type": "boolean", + "x-go-name": "IsWorkInProgress" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, "merged": { "type": "boolean", "x-go-name": "HasMerged" @@ -18810,6 +24047,7 @@ "properties": { "created": { "type": "string", + "format": "date-time", "x-go-name": "CreatedUnix" }, "interval": { @@ -18822,6 +24060,7 @@ }, "last_update": { "type": "string", + "format": "date-time", "x-go-name": "LastUpdateUnix" }, "remote_address": { @@ -18941,6 +24180,10 @@ "type": "string", "x-go-name": "Target" }, + "upload_url": { + "type": "string", + "x-go-name": "UploadURL" + }, "url": { "type": "string", "x-go-name": "URL" @@ -18952,6 +24195,22 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "RenameUserOption": { + "description": "RenameUserOption options when renaming a user", + "type": "object", + "required": [ + "new_username" + ], + "properties": { + "new_username": { + "description": "New username for this user. This name cannot be in use yet by any other user.", + "type": "string", + "uniqueItems": true, + "x-go-name": "NewName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "RepoCollaboratorPermission": { "description": "RepoCollaboratorPermission to get repository permission for a collaborator", "type": "object", @@ -19036,6 +24295,10 @@ "description": "Repository represents a repository", "type": "object", "properties": { + "allow_fast_forward_only_merge": { + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, "allow_merge_commits": { "type": "boolean", "x-go-name": "AllowMerge" @@ -19060,6 +24323,11 @@ "type": "boolean", "x-go-name": "Archived" }, + "archived_at": { + "type": "string", + "format": "date-time", + "x-go-name": "ArchivedAt" + }, "avatar_url": { "type": "string", "x-go-name": "AvatarURL" @@ -19116,10 +24384,18 @@ "type": "string", "x-go-name": "FullName" }, + "has_actions": { + "type": "boolean", + "x-go-name": "HasActions" + }, "has_issues": { "type": "boolean", "x-go-name": "HasIssues" }, + "has_packages": { + "type": "boolean", + "x-go-name": "HasPackages" + }, "has_projects": { "type": "boolean", "x-go-name": "HasProjects" @@ -19128,6 +24404,10 @@ "type": "boolean", "x-go-name": "HasPullRequests" }, + "has_releases": { + "type": "boolean", + "x-go-name": "HasReleases" + }, "has_wiki": { "type": "boolean", "x-go-name": "HasWiki" @@ -19160,6 +24440,13 @@ "type": "string", "x-go-name": "LanguagesURL" }, + "licenses": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Licenses" + }, "link": { "type": "string", "x-go-name": "Link" @@ -19181,6 +24468,15 @@ "type": "string", "x-go-name": "Name" }, + "object_format_name": { + "description": "ObjectFormatName of the underlying git repository", + "type": "string", + "enum": [ + "sha1", + "sha256" + ], + "x-go-name": "ObjectFormatName" + }, "open_issues_count": { "type": "integer", "format": "int64", @@ -19208,6 +24504,10 @@ "type": "boolean", "x-go-name": "Private" }, + "projects_mode": { + "type": "string", + "x-go-name": "ProjectsMode" + }, "release_counter": { "type": "integer", "format": "int64", @@ -19234,11 +24534,22 @@ "type": "boolean", "x-go-name": "Template" }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Topics" + }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, + "url": { + "type": "string", + "x-go-name": "URL" + }, "watchers_count": { "type": "integer", "format": "int64", @@ -19298,6 +24609,23 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "Secret": { + "description": "Secret represents a secret", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "name": { + "description": "the secret's name", + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "ServerVersion": { "description": "ServerVersion wraps the version of the server", "type": "object", @@ -19396,6 +24724,46 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "TagProtection": { + "description": "TagProtection represents a tag protection", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "Team": { "description": "Team represents a team in an organization", "type": "object", @@ -19708,6 +25076,37 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "UpdateBranchProtectionPriories": { + "description": "UpdateBranchProtectionPriories a list to update the branch protection rule priorities", + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "IDs" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateBranchRepoOption": { + "description": "UpdateBranchRepoOption options when updating a branch in a repository", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "New branch name", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "UpdateFileOptions": { "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", "type": "object", @@ -19730,7 +25129,7 @@ "content": { "description": "content must be base64 encoded", "type": "string", - "x-go-name": "Content" + "x-go-name": "ContentBase64" }, "dates": { "$ref": "#/definitions/CommitDateOptions" @@ -19763,6 +25162,50 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "UpdateRepoAvatarOption": { + "description": "UpdateRepoAvatarUserOption options when updating the repo avatar", + "type": "object", + "properties": { + "image": { + "description": "image must be base64 encoded", + "type": "string", + "x-go-name": "Image" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateUserAvatarOption": { + "description": "UpdateUserAvatarUserOption options when updating the user avatar", + "type": "object", + "properties": { + "image": { + "description": "image must be base64 encoded", + "type": "string", + "x-go-name": "Image" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateVariableOption": { + "description": "UpdateVariableOption the option when updating variable", + "type": "object", + "required": [ + "value" + ], + "properties": { + "name": { + "description": "New name for the variable. If the field is empty, the variable name won't be updated.", + "type": "string", + "x-go-name": "Name" + }, + "value": { + "description": "Value of the variable to update", + "type": "string", + "x-go-name": "Value" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "User": { "description": "User represents a user", "type": "object", @@ -19808,6 +25251,11 @@ "type": "string", "x-go-name": "FullName" }, + "html_url": { + "description": "URL to the user's gitea page", + "type": "string", + "x-go-name": "HTMLURL" + }, "id": { "description": "the user's id", "type": "integer", @@ -19855,6 +25303,12 @@ "type": "boolean", "x-go-name": "Restricted" }, + "source_id": { + "description": "The ID of the user's Authentication Source", + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, "starred_repos_count": { "type": "integer", "format": "int64", @@ -19873,6 +25327,24 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "UserBadgeOption": { + "description": "UserBadgeOption options for link between users and badges", + "type": "object", + "properties": { + "badge_slugs": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "BadgeSlugs", + "example": [ + "badge1", + "badge2" + ] + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "UserHeatmapData": { "description": "UserHeatmapData represents the data needed to create a heatmap", "type": "object", @@ -20126,6 +25598,21 @@ } } }, + "ActionVariable": { + "description": "ActionVariable", + "schema": { + "$ref": "#/definitions/ActionVariable" + } + }, + "ActivityFeedsList": { + "description": "ActivityFeedsList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Activity" + } + } + }, "ActivityPub": { "description": "ActivityPub", "schema": { @@ -20153,6 +25640,15 @@ } } }, + "BadgeList": { + "description": "BadgeList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Badge" + } + } + }, "Branch": { "description": "Branch", "schema": { @@ -20295,6 +25791,12 @@ } } }, + "Compare": { + "description": "", + "schema": { + "$ref": "#/definitions/Compare" + } + }, "ContentsListResponse": { "description": "ContentsListResponse", "schema": { @@ -20361,6 +25863,12 @@ "$ref": "#/definitions/FileResponse" } }, + "FilesResponse": { + "description": "FilesResponse", + "schema": { + "$ref": "#/definitions/FilesResponse" + } + }, "GPGKey": { "description": "GPGKey", "schema": { @@ -20427,6 +25935,21 @@ "$ref": "#/definitions/GitTreeResponse" } }, + "GitignoreTemplateInfo": { + "description": "GitignoreTemplateInfo", + "schema": { + "$ref": "#/definitions/GitignoreTemplateInfo" + } + }, + "GitignoreTemplateList": { + "description": "GitignoreTemplateList", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, "Hook": { "description": "Hook", "schema": { @@ -20487,6 +26010,24 @@ } } }, + "LabelTemplateInfo": { + "description": "LabelTemplateInfo", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LabelTemplate" + } + } + }, + "LabelTemplateList": { + "description": "LabelTemplateList", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, "LanguageStatistics": { "description": "LanguageStatistics", "schema": { @@ -20497,12 +26038,54 @@ } } }, + "LicenseTemplateInfo": { + "description": "LicenseTemplateInfo", + "schema": { + "$ref": "#/definitions/LicenseTemplateInfo" + } + }, + "LicenseTemplateList": { + "description": "LicenseTemplateList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LicensesTemplateListEntry" + } + } + }, + "LicensesList": { + "description": "LicensesList", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, "MarkdownRender": { "description": "MarkdownRender is a rendered markdown document", "schema": { "type": "string" } }, + "MarkupRender": { + "description": "MarkupRender is a rendered markup document", + "schema": { + "type": "string" + } + }, + "MergeUpstreamRequest": { + "description": "", + "schema": { + "$ref": "#/definitions/MergeUpstreamRequest" + } + }, + "MergeUpstreamResponse": { + "description": "", + "schema": { + "$ref": "#/definitions/MergeUpstreamResponse" + } + }, "Milestone": { "description": "Milestone", "schema": { @@ -20716,6 +26299,14 @@ } } }, + "RegistrationToken": { + "description": "RegistrationToken is response related to registration token", + "headers": { + "token": { + "type": "string" + } + } + }, "Release": { "description": "Release", "schema": { @@ -20737,6 +26328,24 @@ "$ref": "#/definitions/RepoCollaboratorPermission" } }, + "RepoIssueConfig": { + "description": "RepoIssueConfig", + "schema": { + "$ref": "#/definitions/IssueConfig" + } + }, + "RepoIssueConfigValidation": { + "description": "RepoIssueConfigValidation", + "schema": { + "$ref": "#/definitions/IssueConfigValidation" + } + }, + "RepoNewIssuePinsAllowed": { + "description": "RepoNewIssuePinsAllowed", + "schema": { + "$ref": "#/definitions/NewIssuePinsAllowed" + } + }, "Repository": { "description": "Repository", "schema": { @@ -20758,6 +26367,21 @@ "$ref": "#/definitions/SearchResults" } }, + "Secret": { + "description": "Secret", + "schema": { + "$ref": "#/definitions/Secret" + } + }, + "SecretList": { + "description": "SecretList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Secret" + } + } + }, "ServerVersion": { "description": "ServerVersion", "schema": { @@ -20803,6 +26427,27 @@ } } }, + "TagProtection": { + "description": "TagProtection", + "schema": { + "$ref": "#/definitions/TagProtection" + } + }, + "TagProtectionList": { + "description": "TagProtectionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TagProtection" + } + } + }, + "TasksList": { + "description": "TasksList", + "schema": { + "$ref": "#/definitions/ActionTaskResponse" + } + }, "Team": { "description": "Team", "schema": { @@ -20890,6 +26535,15 @@ } } }, + "VariableList": { + "description": "VariableList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionVariable" + } + } + }, "WatchInfo": { "description": "WatchInfo", "schema": { @@ -20965,12 +26619,23 @@ "parameterBodies": { "description": "parameterBodies", "schema": { - "$ref": "#/definitions/CreatePushMirrorOption" + "$ref": "#/definitions/UpdateVariableOption" } }, "redirect": { "description": "APIRedirect is a redirect response" }, + "repoArchivedError": { + "description": "APIRepoArchivedError is an error that is raised when an archived repo should be modified", + "headers": { + "message": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, "string": { "description": "APIString is a string response", "schema": { @@ -20991,6 +26656,7 @@ }, "securityDefinitions": { "AccessToken": { + "description": "This authentication option is deprecated for removal in Gitea 1.23. Please use AuthorizationHeaderToken instead.", "type": "apiKey", "name": "access_token", "in": "query" @@ -21023,6 +26689,7 @@ "in": "header" }, "Token": { + "description": "This authentication option is deprecated for removal in Gitea 1.23. Please use AuthorizationHeaderToken instead.", "type": "apiKey", "name": "token", "in": "query" diff --git a/Gitea.Declarative.Test/Utils.fs b/Gitea.Declarative.Test/Utils.fs index ee3e536..468eef0 100644 --- a/Gitea.Declarative.Test/Utils.fs +++ b/Gitea.Declarative.Test/Utils.fs @@ -32,6 +32,8 @@ module Types = FollowingCount = None StarredReposCount = None LastLogin = None + HtmlUrl = None + SourceId = None } let emptyRepo (fullName : string) (defaultBranch : string) : GiteaClient.Repository = @@ -89,6 +91,16 @@ module Types = Template = None UpdatedAt = None WatchersCount = None + AllowFastForwardOnlyMerge = None + ArchivedAt = None + HasActions = None + HasPackages = None + HasReleases = None + Licenses = None + ObjectFormatName = None + ProjectsMode = None + Topics = None + Url = None } type CustomArb () = diff --git a/Gitea.InMemory/Server.fs b/Gitea.InMemory/Server.fs index 4b366c7..067e896 100644 --- a/Gitea.InMemory/Server.fs +++ b/Gitea.InMemory/Server.fs @@ -23,11 +23,13 @@ module Operations = Location = None Login = None LoginName = createUserOption.LoginName - ProhibitLogin = failwith "todo" + ProhibitLogin = None Restricted = createUserOption.Restricted StarredReposCount = None Visibility = createUserOption.Visibility Website = None + HtmlUrl = None + SourceId = None } result diff --git a/nix/deps.json b/nix/deps.json index f30a097..8609159 100644 --- a/nix/deps.json +++ b/nix/deps.json @@ -71,8 +71,8 @@ }, { "pname": "Microsoft.Build.Tasks.Git", - "version": "1.1.1", - "hash": "sha256-PHxHmsCty8Si5dCUQSizeHkJrHa9+j2nRsg6Sz+5Za0=" + "version": "8.0.0", + "hash": "sha256-vX6/kPij8vNAu8f7rrvHHhPrNph20IcufmrBgZNxpQA=" }, { "pname": "Microsoft.CodeCoverage", @@ -221,13 +221,13 @@ }, { "pname": "Microsoft.SourceLink.Common", - "version": "1.1.1", - "hash": "sha256-b4FaNFneDVDbvJVX1iNyhhLTrnxUfnmyypeJr47GbXY=" + "version": "8.0.0", + "hash": "sha256-AfUqleVEqWuHE7z2hNiwOLnquBJ3tuYtbkdGMppHOXc=" }, { "pname": "Microsoft.SourceLink.GitHub", - "version": "1.1.1", - "hash": "sha256-3hc9ym5ReONp00ruCKio/Ka1gYXo/jDlUHtfK1wZPiU=" + "version": "8.0.0", + "hash": "sha256-hNTkpKdCLY5kIuOmznD1mY+pRdJ0PKu2HypyXog9vb0=" }, { "pname": "Microsoft.TestPlatform.ObjectModel", @@ -876,17 +876,17 @@ }, { "pname": "WoofWare.Myriad.Plugins", - "version": "4.0.9", - "hash": "sha256-VWpStkuvdFZWsEs/tC0mjChneFgxWw+1YETH+3aCoz4=" + "version": "7.0.7", + "hash": "sha256-89jJuslFlqng6VNMpM73VAB23mZ3+ST1Z9tMDxWViWM=" }, { "pname": "WoofWare.Myriad.Plugins.Attributes", - "version": "3.6.6", - "hash": "sha256-68T5JQNp4V0DDad0I3snVh8BCe7rz11mLyvm60hxwaA=" + "version": "3.6.10", + "hash": "sha256-oupju6kC6EhuZgWaX5C9nKJr3t5+QDqMEtHzUmKIA3c=" }, { "pname": "WoofWare.Whippet.Fantomas", - "version": "0.3.1", - "hash": "sha256-i5oiqcrxzM90Ocuq5MIu2Ha5lV0aYu5nCvuwmFqp6NA=" + "version": "0.6.3", + "hash": "sha256-FkW/HtVp8/HE2k6d7yFpnJcnP3FNNe9kGlkoIWmNgDw=" } ]