Compare commits

...

2 Commits

Author SHA1 Message Date
Smaug123
7e4107f7f0 Fix schema 2025-04-21 23:17:12 +01:00
Smaug123
346e19eec2 Bump Gitea and WoofWare 2025-04-21 23:11:09 +01:00
10 changed files with 7225 additions and 126 deletions

View File

@@ -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

View File

@@ -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>

View File

@@ -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

View File

@@ -253,6 +253,12 @@
"items": {
"type": "string"
}
},
"ignoreStaleApprovals": {
"type": "boolean"
},
"enableForcePush": {
"type": "boolean"
}
}
}

View File

@@ -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

View File

@@ -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 () =

View File

@@ -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

View File

@@ -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="
}
]