mirror of
https://codeberg.org/secana/ForgejoKit.git
synced 2026-06-16 05:13:53 -07:00
feat: add "hasActions" flag to repo
This commit is contained in:
parent
3030629b36
commit
21149d4b45
1 changed files with 10 additions and 1 deletions
|
|
@ -58,6 +58,14 @@ public final class RepositoryService: Sendable {
|
|||
let archived: Bool?
|
||||
let description: String?
|
||||
let name: String?
|
||||
let hasActions: Bool?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case archived
|
||||
case description
|
||||
case name
|
||||
case hasActions = "has_actions"
|
||||
}
|
||||
}
|
||||
|
||||
private struct CreateLabelPayload: Codable {
|
||||
|
|
@ -387,13 +395,14 @@ public final class RepositoryService: Sendable {
|
|||
public func editRepository(
|
||||
owner: String, repo: String,
|
||||
archived: Bool? = nil, description: String? = nil,
|
||||
name: String? = nil,
|
||||
name: String? = nil, hasActions: Bool? = nil,
|
||||
) async throws -> Repository {
|
||||
let url = try client.makeRepoURL(owner: owner, repo: repo, path: "")
|
||||
let payload = EditRepositoryPayload(
|
||||
archived: archived,
|
||||
description: description,
|
||||
name: name,
|
||||
hasActions: hasActions,
|
||||
)
|
||||
let jsonData = try client.encodeRequestBody(payload)
|
||||
return try await client.performRequest(
|
||||
|
|
|
|||
Loading…
Reference in a new issue