Skip to content

Commit b7e0b5b

Browse files
Merge pull request #84 from Wei18/dependabot/submodules/Submodule/github/rest-api-description-10e2f15
Bump Submodule/github/rest-api-description from `531ec66` to `10e2f15`
2 parents fc4c441 + 24e3abc commit b7e0b5b

File tree

16 files changed

+7468
-1098
lines changed

16 files changed

+7468
-1098
lines changed

Sources/apps/Client.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,6 @@ public struct Client: APIProtocol {
383383
name: "cursor",
384384
value: input.query.cursor
385385
)
386-
try converter.setQueryItemAsURI(
387-
in: &request,
388-
style: .form,
389-
explode: true,
390-
name: "redelivery",
391-
value: input.query.redelivery
392-
)
393386
converter.setAcceptHeader(
394387
in: &request.headerFields,
395388
contentTypes: input.headers.accept

Sources/apps/Types.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5728,22 +5728,17 @@ public enum Operations {
57285728
///
57295729
/// - Remark: Generated from `#/paths/app/hook/deliveries/GET/query/cursor`.
57305730
public var cursor: Components.Parameters.cursor?
5731-
/// - Remark: Generated from `#/paths/app/hook/deliveries/GET/query/redelivery`.
5732-
public var redelivery: Swift.Bool?
57335731
/// Creates a new `Query`.
57345732
///
57355733
/// - Parameters:
57365734
/// - per_page: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
57375735
/// - cursor: Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors.
5738-
/// - redelivery:
57395736
public init(
57405737
per_page: Components.Parameters.per_hyphen_page? = nil,
5741-
cursor: Components.Parameters.cursor? = nil,
5742-
redelivery: Swift.Bool? = nil
5738+
cursor: Components.Parameters.cursor? = nil
57435739
) {
57445740
self.per_page = per_page
57455741
self.cursor = cursor
5746-
self.redelivery = redelivery
57475742
}
57485743
}
57495744
public var query: Operations.apps_sol_list_hyphen_webhook_hyphen_deliveries.Input.Query

Sources/checks/Types.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,7 +2483,7 @@ public enum Components {
24832483
/// - Remark: Generated from `#/components/schemas/check-suite`.
24842484
public struct check_hyphen_suite: Codable, Hashable, Sendable {
24852485
/// - Remark: Generated from `#/components/schemas/check-suite/id`.
2486-
public var id: Swift.Int
2486+
public var id: Swift.Int64
24872487
/// - Remark: Generated from `#/components/schemas/check-suite/node_id`.
24882488
public var node_id: Swift.String
24892489
/// - Remark: Generated from `#/components/schemas/check-suite/head_branch`.
@@ -2571,7 +2571,7 @@ public enum Components {
25712571
/// - rerequestable:
25722572
/// - runs_rerequestable:
25732573
public init(
2574-
id: Swift.Int,
2574+
id: Swift.Int64,
25752575
node_id: Swift.String,
25762576
head_branch: Swift.String? = nil,
25772577
head_sha: Swift.String,

Sources/code-scanning/Client.swift

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ public struct Client: APIProtocol {
14931493
///
14941494
/// Lists the CodeQL databases that are available in a repository.
14951495
///
1496-
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
1496+
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
14971497
///
14981498
/// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases`.
14991499
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/get(code-scanning/list-codeql-databases)`.
@@ -1632,7 +1632,7 @@ public struct Client: APIProtocol {
16321632
/// your HTTP client is configured to follow redirects or use the `Location` header
16331633
/// to make a second request to get the redirect URL.
16341634
///
1635-
/// OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
1635+
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
16361636
///
16371637
/// - Remark: HTTP `GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`.
16381638
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/get(code-scanning/get-codeql-database)`.
@@ -1764,6 +1764,120 @@ public struct Client: APIProtocol {
17641764
}
17651765
)
17661766
}
1767+
/// Delete a CodeQL database
1768+
///
1769+
/// Deletes a CodeQL database for a language in a repository.
1770+
///
1771+
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
1772+
///
1773+
/// - Remark: HTTP `DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`.
1774+
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/code-scanning/codeql/databases/{language}/delete(code-scanning/delete-codeql-database)`.
1775+
public func code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database(_ input: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Input) async throws -> Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.Output {
1776+
try await client.send(
1777+
input: input,
1778+
forOperation: Operations.code_hyphen_scanning_sol_delete_hyphen_codeql_hyphen_database.id,
1779+
serializer: { input in
1780+
let path = try converter.renderedPath(
1781+
template: "/repos/{}/{}/code-scanning/codeql/databases/{}",
1782+
parameters: [
1783+
input.path.owner,
1784+
input.path.repo,
1785+
input.path.language
1786+
]
1787+
)
1788+
var request: HTTPTypes.HTTPRequest = .init(
1789+
soar_path: path,
1790+
method: .delete
1791+
)
1792+
suppressMutabilityWarning(&request)
1793+
converter.setAcceptHeader(
1794+
in: &request.headerFields,
1795+
contentTypes: input.headers.accept
1796+
)
1797+
return (request, nil)
1798+
},
1799+
deserializer: { response, responseBody in
1800+
switch response.status.code {
1801+
case 204:
1802+
return .noContent(.init())
1803+
case 403:
1804+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
1805+
let body: Components.Responses.code_scanning_forbidden_write.Body
1806+
let chosenContentType = try converter.bestContentType(
1807+
received: contentType,
1808+
options: [
1809+
"application/json"
1810+
]
1811+
)
1812+
switch chosenContentType {
1813+
case "application/json":
1814+
body = try await converter.getResponseBodyAsJSON(
1815+
Components.Schemas.basic_hyphen_error.self,
1816+
from: responseBody,
1817+
transforming: { value in
1818+
.json(value)
1819+
}
1820+
)
1821+
default:
1822+
preconditionFailure("bestContentType chose an invalid content type.")
1823+
}
1824+
return .forbidden(.init(body: body))
1825+
case 404:
1826+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
1827+
let body: Components.Responses.not_found.Body
1828+
let chosenContentType = try converter.bestContentType(
1829+
received: contentType,
1830+
options: [
1831+
"application/json"
1832+
]
1833+
)
1834+
switch chosenContentType {
1835+
case "application/json":
1836+
body = try await converter.getResponseBodyAsJSON(
1837+
Components.Schemas.basic_hyphen_error.self,
1838+
from: responseBody,
1839+
transforming: { value in
1840+
.json(value)
1841+
}
1842+
)
1843+
default:
1844+
preconditionFailure("bestContentType chose an invalid content type.")
1845+
}
1846+
return .notFound(.init(body: body))
1847+
case 503:
1848+
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
1849+
let body: Components.Responses.service_unavailable.Body
1850+
let chosenContentType = try converter.bestContentType(
1851+
received: contentType,
1852+
options: [
1853+
"application/json"
1854+
]
1855+
)
1856+
switch chosenContentType {
1857+
case "application/json":
1858+
body = try await converter.getResponseBodyAsJSON(
1859+
Components.Responses.service_unavailable.Body.jsonPayload.self,
1860+
from: responseBody,
1861+
transforming: { value in
1862+
.json(value)
1863+
}
1864+
)
1865+
default:
1866+
preconditionFailure("bestContentType chose an invalid content type.")
1867+
}
1868+
return .serviceUnavailable(.init(body: body))
1869+
default:
1870+
return .undocumented(
1871+
statusCode: response.status.code,
1872+
.init(
1873+
headerFields: response.headerFields,
1874+
body: responseBody
1875+
)
1876+
)
1877+
}
1878+
}
1879+
)
1880+
}
17671881
/// Create a CodeQL variant analysis
17681882
///
17691883
/// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.

0 commit comments

Comments
 (0)