From add6486ba7190e0c09b8597f4766be6656b7ca25 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 12 Mar 2024 00:07:02 +0000 Subject: [PATCH] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/organizations/organizations_request_builder.go | 6 +++--- .../item_item_commits_commit_sha_item_request_builder.go | 2 ++ ...item_commits_item_branches_where_head_request_builder.go | 2 ++ .../repos/item_item_commits_item_pulls_request_builder.go | 6 +++++- ...tem_item_git_blobs_with_file_sha_item_request_builder.go | 2 ++ pkg/github/repos/item_item_git_commits_request_builder.go | 2 ++ ...item_git_commits_with_commit_sha_item_request_builder.go | 2 ++ ..._item_git_matching_refs_with_ref_item_request_builder.go | 6 +++++- .../item_item_git_ref_with_ref_item_request_builder.go | 2 ++ pkg/github/repos/item_item_git_refs_request_builder.go | 2 ++ .../item_item_git_refs_with_ref_item_request_builder.go | 4 ++++ pkg/github/repos/item_item_git_tags_request_builder.go | 2 ++ .../item_item_git_tags_with_tag_sha_item_request_builder.go | 2 ++ pkg/github/repos/item_item_git_trees_request_builder.go | 2 ++ ...tem_item_git_trees_with_tree_sha_item_request_builder.go | 2 ++ 16 files changed, 40 insertions(+), 6 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index ea7643d0..c66e8b24 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "DE060A6CF9EFEE14358028B28C66A421969687F96C8EBF96933E452D3043303AB97B244EA2E3B9800382F90BBFF2A8EBB158D61A852738284C655FD2A387E3C8", + "descriptionHash": "58EC2F160FFD5574242F7A6CA2B7490F71BCCB733BDE83D3C4F45E78BBE173C1F5709707046D57237BB1BB5CAA0BA8DDC233C230D609A2EA76202F3D94F5F1A9", "descriptionLocation": "../../../source-generator/schemas/downloaded.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.12.0", diff --git a/pkg/github/organizations/organizations_request_builder.go b/pkg/github/organizations/organizations_request_builder.go index 087ba8ce..24b3a8a5 100644 --- a/pkg/github/organizations/organizations_request_builder.go +++ b/pkg/github/organizations/organizations_request_builder.go @@ -10,7 +10,7 @@ import ( type OrganizationsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// OrganizationsRequestBuilderGetQueryParameters lists all organizations, in the order that they were created on GitHub.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. +// OrganizationsRequestBuilderGetQueryParameters lists all organizations, in the order that they were created.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. type OrganizationsRequestBuilderGetQueryParameters struct { // 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)." Per_page *int32 `uriparametername:"per_page"` @@ -30,7 +30,7 @@ func NewOrganizationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee urlParams["request-raw-url"] = rawUrl return NewOrganizationsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists all organizations, in the order that they were created on GitHub.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. +// Get lists all organizations, in the order that they were created.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. // returns a []OrganizationSimpleable when successful // [API method documentation] // @@ -52,7 +52,7 @@ func (m *OrganizationsRequestBuilder) Get(ctx context.Context, requestConfigurat } return val, nil } -// ToGetRequestInformation lists all organizations, in the order that they were created on GitHub.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. +// ToGetRequestInformation lists all organizations, in the order that they were created.**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. // returns a *RequestInformation when successful func (m *OrganizationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[OrganizationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_commits_commit_sha_item_request_builder.go b/pkg/github/repos/item_item_commits_commit_sha_item_request_builder.go index 81b98a13..0f3a597a 100644 --- a/pkg/github/repos/item_item_commits_commit_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_commits_commit_sha_item_request_builder.go @@ -53,6 +53,7 @@ func NewItemItemCommitsCommit_shaItemRequestBuilder(rawUrl string, requestAdapte // Get returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.**Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a Commitable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // returns a BasicError error when the service returns a 500 status code // returns a Commit503Error error when the service returns a 503 status code @@ -66,6 +67,7 @@ func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Get(ctx context.Context, r } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCommit503ErrorFromDiscriminatorValue, diff --git a/pkg/github/repos/item_item_commits_item_branches_where_head_request_builder.go b/pkg/github/repos/item_item_commits_item_branches_where_head_request_builder.go index 7266927f..f3789f72 100644 --- a/pkg/github/repos/item_item_commits_item_branches_where_head_request_builder.go +++ b/pkg/github/repos/item_item_commits_item_branches_where_head_request_builder.go @@ -25,6 +25,7 @@ func NewItemItemCommitsItemBranchesWhereHeadRequestBuilder(rawUrl string, reques } // Get protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. // returns a []BranchShortable when successful +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -35,6 +36,7 @@ func (m *ItemItemCommitsItemBranchesWhereHeadRequestBuilder) Get(ctx context.Con return nil, err } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBranchShortFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_commits_item_pulls_request_builder.go b/pkg/github/repos/item_item_commits_item_pulls_request_builder.go index 180af75b..47080658 100644 --- a/pkg/github/repos/item_item_commits_item_pulls_request_builder.go +++ b/pkg/github/repos/item_item_commits_item_pulls_request_builder.go @@ -32,6 +32,7 @@ func NewItemItemCommitsItemPullsRequestBuilder(rawUrl string, requestAdapter i2a } // Get lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit.To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name. // returns a []PullRequestSimpleable when successful +// returns a BasicError error when the service returns a 409 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit @@ -40,7 +41,10 @@ func (m *ItemItemCommitsItemPullsRequestBuilder) Get(ctx context.Context, reques if err != nil { return nil, err } - res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreatePullRequestSimpleFromDiscriminatorValue, nil) + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreatePullRequestSimpleFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } diff --git a/pkg/github/repos/item_item_git_blobs_with_file_sha_item_request_builder.go b/pkg/github/repos/item_item_git_blobs_with_file_sha_item_request_builder.go index 132a16d0..8cd44f97 100644 --- a/pkg/github/repos/item_item_git_blobs_with_file_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_blobs_with_file_sha_item_request_builder.go @@ -27,6 +27,7 @@ func NewItemItemGitBlobsWithFile_shaItemRequestBuilder(rawUrl string, requestAda // returns a Blobable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -39,6 +40,7 @@ func (m *ItemItemGitBlobsWithFile_shaItemRequestBuilder) Get(ctx context.Context errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBlobFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_git_commits_request_builder.go b/pkg/github/repos/item_item_git_commits_request_builder.go index 8a743bb4..2ee5a6bd 100644 --- a/pkg/github/repos/item_item_git_commits_request_builder.go +++ b/pkg/github/repos/item_item_git_commits_request_builder.go @@ -38,6 +38,7 @@ func NewItemItemGitCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f // Post creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitCommitable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -49,6 +50,7 @@ func (m *ItemItemGitCommitsRequestBuilder) Post(ctx context.Context, body ItemIt } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitCommitFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_git_commits_with_commit_sha_item_request_builder.go b/pkg/github/repos/item_item_git_commits_with_commit_sha_item_request_builder.go index 32deeaa6..936cfcbc 100644 --- a/pkg/github/repos/item_item_git_commits_with_commit_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_commits_with_commit_sha_item_request_builder.go @@ -26,6 +26,7 @@ func NewItemItemGitCommitsWithCommit_shaItemRequestBuilder(rawUrl string, reques // Get gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitCommitable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/git/commits#get-a-commit-object @@ -36,6 +37,7 @@ func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) Get(ctx context.Con } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitCommitFromDiscriminatorValue, errorMapping) if err != nil { diff --git a/pkg/github/repos/item_item_git_matching_refs_with_ref_item_request_builder.go b/pkg/github/repos/item_item_git_matching_refs_with_ref_item_request_builder.go index 6af82d97..895b7a5b 100644 --- a/pkg/github/repos/item_item_git_matching_refs_with_ref_item_request_builder.go +++ b/pkg/github/repos/item_item_git_matching_refs_with_ref_item_request_builder.go @@ -25,6 +25,7 @@ func NewItemItemGitMatchingRefsWithRefItemRequestBuilder(rawUrl string, requestA } // Get returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.**Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. // returns a []GitRefable when successful +// returns a BasicError error when the service returns a 409 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/git/refs#list-matching-references @@ -33,7 +34,10 @@ func (m *ItemItemGitMatchingRefsWithRefItemRequestBuilder) Get(ctx context.Conte if err != nil { return nil, err } - res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitRefFromDiscriminatorValue, nil) + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitRefFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } diff --git a/pkg/github/repos/item_item_git_ref_with_ref_item_request_builder.go b/pkg/github/repos/item_item_git_ref_with_ref_item_request_builder.go index 731f0cc9..a5669212 100644 --- a/pkg/github/repos/item_item_git_ref_with_ref_item_request_builder.go +++ b/pkg/github/repos/item_item_git_ref_with_ref_item_request_builder.go @@ -26,6 +26,7 @@ func NewItemItemGitRefWithRefItemRequestBuilder(rawUrl string, requestAdapter i2 // Get returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.**Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". // returns a GitRefable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/git/refs#get-a-reference @@ -36,6 +37,7 @@ func (m *ItemItemGitRefWithRefItemRequestBuilder) Get(ctx context.Context, reque } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitRefFromDiscriminatorValue, errorMapping) if err != nil { diff --git a/pkg/github/repos/item_item_git_refs_request_builder.go b/pkg/github/repos/item_item_git_refs_request_builder.go index 224eb484..fa84e50d 100644 --- a/pkg/github/repos/item_item_git_refs_request_builder.go +++ b/pkg/github/repos/item_item_git_refs_request_builder.go @@ -37,6 +37,7 @@ func NewItemItemGitRefsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da } // Post creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. // returns a GitRefable when successful +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -47,6 +48,7 @@ func (m *ItemItemGitRefsRequestBuilder) Post(ctx context.Context, body ItemItemG return nil, err } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitRefFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_git_refs_with_ref_item_request_builder.go b/pkg/github/repos/item_item_git_refs_with_ref_item_request_builder.go index 7c87a82b..3dccba2e 100644 --- a/pkg/github/repos/item_item_git_refs_with_ref_item_request_builder.go +++ b/pkg/github/repos/item_item_git_refs_with_ref_item_request_builder.go @@ -24,6 +24,7 @@ func NewItemItemGitRefsWithRefItemRequestBuilder(rawUrl string, requestAdapter i return NewItemItemGitRefsWithRefItemRequestBuilderInternal(urlParams, requestAdapter) } // Delete deletes the provided reference. +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -34,6 +35,7 @@ func (m *ItemItemGitRefsWithRefItemRequestBuilder) Delete(ctx context.Context, r return err } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) @@ -44,6 +46,7 @@ func (m *ItemItemGitRefsWithRefItemRequestBuilder) Delete(ctx context.Context, r } // Patch updates the provided reference to point to a new SHA. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. // returns a GitRefable when successful +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -54,6 +57,7 @@ func (m *ItemItemGitRefsWithRefItemRequestBuilder) Patch(ctx context.Context, bo return nil, err } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitRefFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_git_tags_request_builder.go b/pkg/github/repos/item_item_git_tags_request_builder.go index b4ff7325..0ac59b9c 100644 --- a/pkg/github/repos/item_item_git_tags_request_builder.go +++ b/pkg/github/repos/item_item_git_tags_request_builder.go @@ -37,6 +37,7 @@ func NewItemItemGitTagsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da } // Post note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitTagable when successful +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -47,6 +48,7 @@ func (m *ItemItemGitTagsRequestBuilder) Post(ctx context.Context, body ItemItemG return nil, err } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitTagFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_git_tags_with_tag_sha_item_request_builder.go b/pkg/github/repos/item_item_git_tags_with_tag_sha_item_request_builder.go index 2943c95f..f66097e2 100644 --- a/pkg/github/repos/item_item_git_tags_with_tag_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_tags_with_tag_sha_item_request_builder.go @@ -26,6 +26,7 @@ func NewItemItemGitTagsWithTag_shaItemRequestBuilder(rawUrl string, requestAdapt // Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitTagable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/git/tags#get-a-tag @@ -36,6 +37,7 @@ func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) Get(ctx context.Context, } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitTagFromDiscriminatorValue, errorMapping) if err != nil { diff --git a/pkg/github/repos/item_item_git_trees_request_builder.go b/pkg/github/repos/item_item_git_trees_request_builder.go index 5479657f..fb12415b 100644 --- a/pkg/github/repos/item_item_git_trees_request_builder.go +++ b/pkg/github/repos/item_item_git_trees_request_builder.go @@ -39,6 +39,7 @@ func NewItemItemGitTreesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d // returns a GitTreeable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -51,6 +52,7 @@ func (m *ItemItemGitTreesRequestBuilder) Post(ctx context.Context, body ItemItem errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitTreeFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_git_trees_with_tree_sha_item_request_builder.go b/pkg/github/repos/item_item_git_trees_with_tree_sha_item_request_builder.go index b1fadc06..1766f404 100644 --- a/pkg/github/repos/item_item_git_trees_with_tree_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_trees_with_tree_sha_item_request_builder.go @@ -31,6 +31,7 @@ func NewItemItemGitTreesWithTree_shaItemRequestBuilder(rawUrl string, requestAda // Get returns a single tree using the SHA1 value or ref name for that tree.If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.**Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. // returns a GitTreeable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code // [API method documentation] // @@ -42,6 +43,7 @@ func (m *ItemItemGitTreesWithTree_shaItemRequestBuilder) Get(ctx context.Context } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateGitTreeFromDiscriminatorValue, errorMapping)