mirror of
https://github.com/Smaug123/gitea-repo-config
synced 2025-10-06 07:58:39 +00:00
Compare commits
2 Commits
7ba64d437a
...
7e4107f7f0
Author | SHA1 | Date | |
---|---|---|---|
|
7e4107f7f0 | ||
|
346e19eec2 |
@@ -61,6 +61,8 @@ type ProtectedBranch =
|
|||||||
BranchName : string
|
BranchName : string
|
||||||
BlockOnOutdatedBranch : bool option
|
BlockOnOutdatedBranch : bool option
|
||||||
RequiredStatusChecks : string list option
|
RequiredStatusChecks : string list option
|
||||||
|
IgnoreStaleApprovals : bool option
|
||||||
|
EnableForcePush : bool option
|
||||||
}
|
}
|
||||||
|
|
||||||
static member OfSerialised (s : SerialisedProtectedBranch) : ProtectedBranch =
|
static member OfSerialised (s : SerialisedProtectedBranch) : ProtectedBranch =
|
||||||
@@ -68,6 +70,8 @@ type ProtectedBranch =
|
|||||||
BranchName = s.BranchName
|
BranchName = s.BranchName
|
||||||
BlockOnOutdatedBranch = Option.ofNullable s.BlockOnOutdatedBranch
|
BlockOnOutdatedBranch = Option.ofNullable s.BlockOnOutdatedBranch
|
||||||
RequiredStatusChecks = Option.ofObj s.RequiredStatusChecks |> Option.map List.ofArray
|
RequiredStatusChecks = Option.ofObj s.RequiredStatusChecks |> Option.map List.ofArray
|
||||||
|
IgnoreStaleApprovals = Option.ofNullable s.IgnoreStaleApprovals
|
||||||
|
EnableForcePush = Option.ofNullable s.EnableForcePush
|
||||||
}
|
}
|
||||||
|
|
||||||
member this.ToSerialised () : SerialisedProtectedBranch =
|
member this.ToSerialised () : SerialisedProtectedBranch =
|
||||||
@@ -78,6 +82,8 @@ type ProtectedBranch =
|
|||||||
match this.RequiredStatusChecks with
|
match this.RequiredStatusChecks with
|
||||||
| None -> null
|
| None -> null
|
||||||
| Some l -> List.toArray l
|
| Some l -> List.toArray l
|
||||||
|
IgnoreStaleApprovals = Option.toNullable this.IgnoreStaleApprovals
|
||||||
|
EnableForcePush = Option.toNullable this.EnableForcePush
|
||||||
}
|
}
|
||||||
|
|
||||||
type NativeRepo =
|
type NativeRepo =
|
||||||
@@ -375,6 +381,8 @@ type Repo =
|
|||||||
bp.StatusCheckContexts
|
bp.StatusCheckContexts
|
||||||
else
|
else
|
||||||
None
|
None
|
||||||
|
IgnoreStaleApprovals = bp.IgnoreStaleApprovals
|
||||||
|
EnableForcePush = bp.EnableForcePush
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|> Set.ofSeq
|
|> Set.ofSeq
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
|||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<PackageTags>gitea</PackageTags>
|
<PackageTags>gitea</PackageTags>
|
||||||
<WoofWareMyriadPluginVersion>7.0.1</WoofWareMyriadPluginVersion>
|
<WoofWareMyriadPluginVersion>7.0.5</WoofWareMyriadPluginVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -30,7 +30,9 @@ module Gitea =
|
|||||||
List.getPaginated (fun page limit ->
|
List.getPaginated (fun page limit ->
|
||||||
async {
|
async {
|
||||||
let! ct = Async.CancellationToken
|
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
|
hasChanged <- true
|
||||||
|
|
||||||
Some desired.Description
|
Some desired.Description
|
||||||
|
AllowFastForwardOnlyMerge = None
|
||||||
|
HasActions = None
|
||||||
|
HasPackages = None
|
||||||
|
HasReleases = None
|
||||||
|
ProjectsMode = None
|
||||||
}
|
}
|
||||||
|
|
||||||
if hasChanged then
|
if hasChanged then
|
||||||
@@ -382,6 +389,11 @@ module Gitea =
|
|||||||
|
|
||||||
Template = None
|
Template = None
|
||||||
Website = None
|
Website = None
|
||||||
|
AllowFastForwardOnlyMerge = None
|
||||||
|
HasActions = None
|
||||||
|
HasPackages = None
|
||||||
|
HasReleases = None
|
||||||
|
ProjectsMode = None
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -651,6 +663,14 @@ module Gitea =
|
|||||||
RuleName = Some y.BranchName
|
RuleName = Some y.BranchName
|
||||||
StatusCheckContexts = None
|
StatusCheckContexts = None
|
||||||
UnprotectedFilePatterns = None
|
UnprotectedFilePatterns = None
|
||||||
|
BlockAdminMergeOverride = None
|
||||||
|
EnableForcePush = None
|
||||||
|
EnableForcePushAllowlist = None
|
||||||
|
ForcePushAllowlistDeployKeys = None
|
||||||
|
ForcePushAllowlistTeams = None
|
||||||
|
ForcePushAllowlistUsernames = None
|
||||||
|
IgnoreStaleApprovals = y.IgnoreStaleApprovals
|
||||||
|
Priority = None
|
||||||
}
|
}
|
||||||
|
|
||||||
let! ct = Async.CancellationToken
|
let! ct = Async.CancellationToken
|
||||||
@@ -697,6 +717,14 @@ module Gitea =
|
|||||||
RequiredApprovals = None
|
RequiredApprovals = None
|
||||||
StatusCheckContexts = contents
|
StatusCheckContexts = contents
|
||||||
UnprotectedFilePatterns = None
|
UnprotectedFilePatterns = None
|
||||||
|
BlockAdminMergeOverride = None
|
||||||
|
EnableForcePush = y.EnableForcePush
|
||||||
|
EnableForcePushAllowlist = None
|
||||||
|
ForcePushAllowlistDeployKeys = None
|
||||||
|
ForcePushAllowlistTeams = None
|
||||||
|
ForcePushAllowlistUsernames = None
|
||||||
|
IgnoreStaleApprovals = y.IgnoreStaleApprovals
|
||||||
|
Priority = None
|
||||||
}
|
}
|
||||||
|
|
||||||
let! ct = Async.CancellationToken
|
let! ct = Async.CancellationToken
|
||||||
@@ -752,6 +780,7 @@ module Gitea =
|
|||||||
Readme = None
|
Readme = None
|
||||||
Template = None
|
Template = None
|
||||||
TrustModel = None
|
TrustModel = None
|
||||||
|
ObjectFormatName = None
|
||||||
}
|
}
|
||||||
|
|
||||||
let! ct = Async.CancellationToken
|
let! ct = Async.CancellationToken
|
||||||
@@ -834,6 +863,8 @@ module Gitea =
|
|||||||
Uid = None
|
Uid = None
|
||||||
Wiki = Some true
|
Wiki = Some true
|
||||||
Description = Some desired.Description
|
Description = Some desired.Description
|
||||||
|
AwsAccessKeyId = None
|
||||||
|
AwsSecretAccessKey = None
|
||||||
}
|
}
|
||||||
|
|
||||||
let! result = client.RepoMigrate options |> Async.AwaitTask |> Async.Catch
|
let! result = client.RepoMigrate options |> Async.AwaitTask |> Async.Catch
|
||||||
@@ -947,7 +978,7 @@ module Gitea =
|
|||||||
FullName = Some user
|
FullName = Some user
|
||||||
LoginName = Some user
|
LoginName = Some user
|
||||||
MustChangePassword = Some true
|
MustChangePassword = Some true
|
||||||
Password = pwd
|
Password = Some pwd
|
||||||
Restricted = None
|
Restricted = None
|
||||||
SendNotify = None
|
SendNotify = None
|
||||||
SourceId = None
|
SourceId = None
|
||||||
@@ -1036,7 +1067,9 @@ module Gitea =
|
|||||||
let! ct = Async.CancellationToken
|
let! ct = Async.CancellationToken
|
||||||
|
|
||||||
let! users =
|
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 =
|
let! results =
|
||||||
users
|
users
|
||||||
|
@@ -253,6 +253,12 @@
|
|||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"ignoreStaleApprovals": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"enableForcePush": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,10 @@ type SerialisedProtectedBranch =
|
|||||||
[<JsonProperty(Required = Required.Default)>]
|
[<JsonProperty(Required = Required.Default)>]
|
||||||
[<Description "A list of status check patterns; merge into this branch will be blocked unless all these checks have run and passed. (Probably go with alphanumeric strings, I can't find any docs.)">]
|
[<Description "A list of status check patterns; merge into this branch will be blocked unless all these checks have run and passed. (Probably go with alphanumeric strings, I can't find any docs.)">]
|
||||||
RequiredStatusChecks : string array
|
RequiredStatusChecks : string array
|
||||||
|
[<JsonProperty(Required = Required.DisallowNull)>]
|
||||||
|
IgnoreStaleApprovals : Nullable<bool>
|
||||||
|
[<JsonProperty(Required = Required.DisallowNull)>]
|
||||||
|
EnableForcePush : Nullable<bool>
|
||||||
}
|
}
|
||||||
|
|
||||||
[<RequireQualifiedAccess>]
|
[<RequireQualifiedAccess>]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,8 @@ module Types =
|
|||||||
FollowingCount = None
|
FollowingCount = None
|
||||||
StarredReposCount = None
|
StarredReposCount = None
|
||||||
LastLogin = None
|
LastLogin = None
|
||||||
|
HtmlUrl = None
|
||||||
|
SourceId = None
|
||||||
}
|
}
|
||||||
|
|
||||||
let emptyRepo (fullName : string) (defaultBranch : string) : GiteaClient.Repository =
|
let emptyRepo (fullName : string) (defaultBranch : string) : GiteaClient.Repository =
|
||||||
@@ -89,6 +91,16 @@ module Types =
|
|||||||
Template = None
|
Template = None
|
||||||
UpdatedAt = None
|
UpdatedAt = None
|
||||||
WatchersCount = 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 () =
|
type CustomArb () =
|
||||||
|
@@ -23,11 +23,13 @@ module Operations =
|
|||||||
Location = None
|
Location = None
|
||||||
Login = None
|
Login = None
|
||||||
LoginName = createUserOption.LoginName
|
LoginName = createUserOption.LoginName
|
||||||
ProhibitLogin = failwith "todo"
|
ProhibitLogin = None
|
||||||
Restricted = createUserOption.Restricted
|
Restricted = createUserOption.Restricted
|
||||||
StarredReposCount = None
|
StarredReposCount = None
|
||||||
Visibility = createUserOption.Visibility
|
Visibility = createUserOption.Visibility
|
||||||
Website = None
|
Website = None
|
||||||
|
HtmlUrl = None
|
||||||
|
SourceId = None
|
||||||
}
|
}
|
||||||
|
|
||||||
result
|
result
|
||||||
|
@@ -876,8 +876,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "WoofWare.Myriad.Plugins",
|
"pname": "WoofWare.Myriad.Plugins",
|
||||||
"version": "7.0.1",
|
"version": "7.0.5",
|
||||||
"hash": "sha256-pqYc2jqlR9PzxIp1YAxIGgmRmUzHzdkgtTOHFdYtDto="
|
"hash": "sha256-UTbLDVJhQg1UASOSlQaz5NgG5maBOOtenZrny689v1o="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "WoofWare.Myriad.Plugins.Attributes",
|
"pname": "WoofWare.Myriad.Plugins.Attributes",
|
||||||
@@ -886,7 +886,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "WoofWare.Whippet.Fantomas",
|
"pname": "WoofWare.Whippet.Fantomas",
|
||||||
"version": "0.6.2",
|
"version": "0.6.3",
|
||||||
"hash": "sha256-nDT/W5eBwM/E+Z2oQ80maAGYrEyRJQXL1unxR9q6ztU="
|
"hash": "sha256-FkW/HtVp8/HE2k6d7yFpnJcnP3FNNe9kGlkoIWmNgDw="
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user