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
|
||||
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
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageTags>gitea</PackageTags>
|
||||
<WoofWareMyriadPluginVersion>7.0.1</WoofWareMyriadPluginVersion>
|
||||
<WoofWareMyriadPluginVersion>7.0.5</WoofWareMyriadPluginVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -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
|
||||
|
@@ -253,6 +253,12 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ignoreStaleApprovals": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"enableForcePush": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,10 @@ type SerialisedProtectedBranch =
|
||||
[<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.)">]
|
||||
RequiredStatusChecks : string array
|
||||
[<JsonProperty(Required = Required.DisallowNull)>]
|
||||
IgnoreStaleApprovals : Nullable<bool>
|
||||
[<JsonProperty(Required = Required.DisallowNull)>]
|
||||
EnableForcePush : Nullable<bool>
|
||||
}
|
||||
|
||||
[<RequireQualifiedAccess>]
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -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 () =
|
||||
|
@@ -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
|
||||
|
@@ -876,8 +876,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.Myriad.Plugins",
|
||||
"version": "7.0.1",
|
||||
"hash": "sha256-pqYc2jqlR9PzxIp1YAxIGgmRmUzHzdkgtTOHFdYtDto="
|
||||
"version": "7.0.5",
|
||||
"hash": "sha256-UTbLDVJhQg1UASOSlQaz5NgG5maBOOtenZrny689v1o="
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.Myriad.Plugins.Attributes",
|
||||
@@ -886,7 +886,7 @@
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.Whippet.Fantomas",
|
||||
"version": "0.6.2",
|
||||
"hash": "sha256-nDT/W5eBwM/E+Z2oQ80maAGYrEyRJQXL1unxR9q6ztU="
|
||||
"version": "0.6.3",
|
||||
"hash": "sha256-FkW/HtVp8/HE2k6d7yFpnJcnP3FNNe9kGlkoIWmNgDw="
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user