Bump WoofWare.Myriad and upgrade Gitea (#138)

This commit is contained in:
Patrick Stevens
2025-04-22 23:12:38 +01:00
committed by GitHub
parent b6848d08a2
commit 154b3c74e3
11 changed files with 7257 additions and 158 deletions

View File

@@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.8.38-alpha" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<SourceLinkGitHubHost Include="github.com" ContentUrl="https://raw.githubusercontent.com" />
</ItemGroup>
</Project>

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>4.0.9</WoofWareMyriadPluginVersion>
<WoofWareMyriadPluginVersion>7.0.7</WoofWareMyriadPluginVersion>
</PropertyGroup>
<ItemGroup>
@@ -51,7 +51,7 @@
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Update="FSharp.Core" Version="6.0.1" />
<PackageReference Include="Myriad.Sdk" Version="0.8.3" PrivateAssets="all" />
<PackageReference Include="WoofWare.Myriad.Plugins.Attributes" Version="3.6.6" />
<PackageReference Include="WoofWare.Myriad.Plugins.Attributes" Version="3.6.10" />
<PackageReference Include="WoofWare.Myriad.Plugins" Version="$(WoofWareMyriadPluginVersion)" PrivateAssets="all" />
<!-- Absolutely astonishing stuff here, world class software everyone, nice work https://github.com/dotnet/sdk/issues/42651#issuecomment-2372410311 -->

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

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