diff --git a/pkg/github/gists/gists_request_builder.go b/pkg/github/gists/gists_request_builder.go index ebdb7ad0..56fbc0d7 100644 --- a/pkg/github/gists/gists_request_builder.go +++ b/pkg/github/gists/gists_request_builder.go @@ -119,7 +119,7 @@ func (m *GistsRequestBuilder) ToGetRequestInformation(ctx context.Context, reque // ToPostRequestInformation allows you to add a new gist with one or more files.**Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. // returns a *RequestInformation when successful func (m *GistsRequestBuilder) ToPostRequestInformation(ctx context.Context, body GistsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/gists", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/gists/item_comments_request_builder.go b/pkg/github/gists/item_comments_request_builder.go index 742ca5f4..946c1bb4 100644 --- a/pkg/github/gists/item_comments_request_builder.go +++ b/pkg/github/gists/item_comments_request_builder.go @@ -105,7 +105,7 @@ func (m *ItemCommentsRequestBuilder) ToGetRequestInformation(ctx context.Context // ToPostRequestInformation creates a comment on a gist.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)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. // returns a *RequestInformation when successful func (m *ItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/gists/{gist_id}/comments", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/gists/item_forks_request_builder.go b/pkg/github/gists/item_forks_request_builder.go index 542d9e35..315269cf 100644 --- a/pkg/github/gists/item_forks_request_builder.go +++ b/pkg/github/gists/item_forks_request_builder.go @@ -94,7 +94,7 @@ func (m *ItemForksRequestBuilder) ToGetRequestInformation(ctx context.Context, r } // returns a *RequestInformation when successful func (m *ItemForksRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/gists/{gist_id}/forks", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 184569c3..cb1a8bd4 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,8 +1,8 @@ { - "descriptionHash": "BCBB3EBFF291241E01FAD8E0C6FB250C6A33437D878C8B72E69A75E886CAD1B05A1633435433950DF918B0E06B173044E905A79A8137E2086C4A88A34F8865BA", + "descriptionHash": "7F0740EB8A3E332A77B750DA0E30F52D23DA5545436E104CA82F726B5F496D768A3B9648963ECA5F1707CC55238A59AD4B3ED861C5D15C1593BAC554E330DFCC", "descriptionLocation": "../../../source-generator/schemas/downloaded.json", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.13.0", + "kiotaVersion": "1.14.0-preview.202404110001", "clientClassName": "ApiClient", "clientNamespaceName": "github.com/octokit/go-sdk/pkg/github/", "language": "Go", diff --git a/pkg/github/models/pull_request_webhook.go b/pkg/github/models/pull_request_webhook.go new file mode 100644 index 00000000..15965dd4 --- /dev/null +++ b/pkg/github/models/pull_request_webhook.go @@ -0,0 +1,275 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PullRequestWebhook struct { + PullRequest + // Whether to allow auto-merge for pull requests. + allow_auto_merge *bool + // Whether to allow updating the pull request's branch. + allow_update_branch *bool + // Whether to delete head branches when pull requests are merged. + delete_branch_on_merge *bool + // The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. + merge_commit_message *PullRequestWebhook_merge_commit_message + // The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). + merge_commit_title *PullRequestWebhook_merge_commit_title + // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. + squash_merge_commit_message *PullRequestWebhook_squash_merge_commit_message + // The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_title *PullRequestWebhook_squash_merge_commit_title + // Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead.** + use_squash_pr_title_as_default *bool +} +// NewPullRequestWebhook instantiates a new PullRequestWebhook and sets the default values. +func NewPullRequestWebhook()(*PullRequestWebhook) { + m := &PullRequestWebhook{ + PullRequest: *NewPullRequest(), + } + return m +} +// CreatePullRequestWebhookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePullRequestWebhookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPullRequestWebhook(), nil +} +// GetAllowAutoMerge gets the allow_auto_merge property value. Whether to allow auto-merge for pull requests. +// returns a *bool when successful +func (m *PullRequestWebhook) GetAllowAutoMerge()(*bool) { + return m.allow_auto_merge +} +// GetAllowUpdateBranch gets the allow_update_branch property value. Whether to allow updating the pull request's branch. +// returns a *bool when successful +func (m *PullRequestWebhook) GetAllowUpdateBranch()(*bool) { + return m.allow_update_branch +} +// GetDeleteBranchOnMerge gets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged. +// returns a *bool when successful +func (m *PullRequestWebhook) GetDeleteBranchOnMerge()(*bool) { + return m.delete_branch_on_merge +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PullRequestWebhook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PullRequest.GetFieldDeserializers() + res["allow_auto_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAutoMerge(val) + } + return nil + } + res["allow_update_branch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUpdateBranch(val) + } + return nil + } + res["delete_branch_on_merge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeleteBranchOnMerge(val) + } + return nil + } + res["merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitMessage(val.(*PullRequestWebhook_merge_commit_message)) + } + return nil + } + res["merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetMergeCommitTitle(val.(*PullRequestWebhook_merge_commit_title)) + } + return nil + } + res["squash_merge_commit_message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_squash_merge_commit_message) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitMessage(val.(*PullRequestWebhook_squash_merge_commit_message)) + } + return nil + } + res["squash_merge_commit_title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePullRequestWebhook_squash_merge_commit_title) + if err != nil { + return err + } + if val != nil { + m.SetSquashMergeCommitTitle(val.(*PullRequestWebhook_squash_merge_commit_title)) + } + return nil + } + res["use_squash_pr_title_as_default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseSquashPrTitleAsDefault(val) + } + return nil + } + return res +} +// GetMergeCommitMessage gets the merge_commit_message property value. The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +// returns a *PullRequestWebhook_merge_commit_message when successful +func (m *PullRequestWebhook) GetMergeCommitMessage()(*PullRequestWebhook_merge_commit_message) { + return m.merge_commit_message +} +// GetMergeCommitTitle gets the merge_commit_title property value. The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). +// returns a *PullRequestWebhook_merge_commit_title when successful +func (m *PullRequestWebhook) GetMergeCommitTitle()(*PullRequestWebhook_merge_commit_title) { + return m.merge_commit_title +} +// GetSquashMergeCommitMessage gets the squash_merge_commit_message property value. The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +// returns a *PullRequestWebhook_squash_merge_commit_message when successful +func (m *PullRequestWebhook) GetSquashMergeCommitMessage()(*PullRequestWebhook_squash_merge_commit_message) { + return m.squash_merge_commit_message +} +// GetSquashMergeCommitTitle gets the squash_merge_commit_title property value. The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +// returns a *PullRequestWebhook_squash_merge_commit_title when successful +func (m *PullRequestWebhook) GetSquashMergeCommitTitle()(*PullRequestWebhook_squash_merge_commit_title) { + return m.squash_merge_commit_title +} +// GetUseSquashPrTitleAsDefault gets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead.** +// returns a *bool when successful +func (m *PullRequestWebhook) GetUseSquashPrTitleAsDefault()(*bool) { + return m.use_squash_pr_title_as_default +} +// Serialize serializes information the current object +func (m *PullRequestWebhook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PullRequest.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allow_auto_merge", m.GetAllowAutoMerge()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allow_update_branch", m.GetAllowUpdateBranch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("delete_branch_on_merge", m.GetDeleteBranchOnMerge()) + if err != nil { + return err + } + } + if m.GetMergeCommitMessage() != nil { + cast := (*m.GetMergeCommitMessage()).String() + err = writer.WriteStringValue("merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetMergeCommitTitle() != nil { + cast := (*m.GetMergeCommitTitle()).String() + err = writer.WriteStringValue("merge_commit_title", &cast) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitMessage() != nil { + cast := (*m.GetSquashMergeCommitMessage()).String() + err = writer.WriteStringValue("squash_merge_commit_message", &cast) + if err != nil { + return err + } + } + if m.GetSquashMergeCommitTitle() != nil { + cast := (*m.GetSquashMergeCommitTitle()).String() + err = writer.WriteStringValue("squash_merge_commit_title", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("use_squash_pr_title_as_default", m.GetUseSquashPrTitleAsDefault()) + if err != nil { + return err + } + } + return nil +} +// SetAllowAutoMerge sets the allow_auto_merge property value. Whether to allow auto-merge for pull requests. +func (m *PullRequestWebhook) SetAllowAutoMerge(value *bool)() { + m.allow_auto_merge = value +} +// SetAllowUpdateBranch sets the allow_update_branch property value. Whether to allow updating the pull request's branch. +func (m *PullRequestWebhook) SetAllowUpdateBranch(value *bool)() { + m.allow_update_branch = value +} +// SetDeleteBranchOnMerge sets the delete_branch_on_merge property value. Whether to delete head branches when pull requests are merged. +func (m *PullRequestWebhook) SetDeleteBranchOnMerge(value *bool)() { + m.delete_branch_on_merge = value +} +// SetMergeCommitMessage sets the merge_commit_message property value. The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +func (m *PullRequestWebhook) SetMergeCommitMessage(value *PullRequestWebhook_merge_commit_message)() { + m.merge_commit_message = value +} +// SetMergeCommitTitle sets the merge_commit_title property value. The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). +func (m *PullRequestWebhook) SetMergeCommitTitle(value *PullRequestWebhook_merge_commit_title)() { + m.merge_commit_title = value +} +// SetSquashMergeCommitMessage sets the squash_merge_commit_message property value. The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +func (m *PullRequestWebhook) SetSquashMergeCommitMessage(value *PullRequestWebhook_squash_merge_commit_message)() { + m.squash_merge_commit_message = value +} +// SetSquashMergeCommitTitle sets the squash_merge_commit_title property value. The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +func (m *PullRequestWebhook) SetSquashMergeCommitTitle(value *PullRequestWebhook_squash_merge_commit_title)() { + m.squash_merge_commit_title = value +} +// SetUseSquashPrTitleAsDefault sets the use_squash_pr_title_as_default property value. Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead.** +func (m *PullRequestWebhook) SetUseSquashPrTitleAsDefault(value *bool)() { + m.use_squash_pr_title_as_default = value +} +type PullRequestWebhookable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PullRequestable + GetAllowAutoMerge()(*bool) + GetAllowUpdateBranch()(*bool) + GetDeleteBranchOnMerge()(*bool) + GetMergeCommitMessage()(*PullRequestWebhook_merge_commit_message) + GetMergeCommitTitle()(*PullRequestWebhook_merge_commit_title) + GetSquashMergeCommitMessage()(*PullRequestWebhook_squash_merge_commit_message) + GetSquashMergeCommitTitle()(*PullRequestWebhook_squash_merge_commit_title) + GetUseSquashPrTitleAsDefault()(*bool) + SetAllowAutoMerge(value *bool)() + SetAllowUpdateBranch(value *bool)() + SetDeleteBranchOnMerge(value *bool)() + SetMergeCommitMessage(value *PullRequestWebhook_merge_commit_message)() + SetMergeCommitTitle(value *PullRequestWebhook_merge_commit_title)() + SetSquashMergeCommitMessage(value *PullRequestWebhook_squash_merge_commit_message)() + SetSquashMergeCommitTitle(value *PullRequestWebhook_squash_merge_commit_title)() + SetUseSquashPrTitleAsDefault(value *bool)() +} diff --git a/pkg/github/models/pull_request_webhook_merge_commit_message.go b/pkg/github/models/pull_request_webhook_merge_commit_message.go new file mode 100644 index 00000000..a34f5053 --- /dev/null +++ b/pkg/github/models/pull_request_webhook_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a merge commit message.- `PR_TITLE` - default to the pull request's title.- `PR_BODY` - default to the pull request's body.- `BLANK` - default to a blank commit message. +type PullRequestWebhook_merge_commit_message int + +const ( + PR_BODY_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE PullRequestWebhook_merge_commit_message = iota + PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + BLANK_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE +) + +func (i PullRequestWebhook_merge_commit_message) String() string { + return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] +} +func ParsePullRequestWebhook_merge_commit_message(v string) (any, error) { + result := PR_BODY_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + case "PR_TITLE": + result = PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_PULLREQUESTWEBHOOK_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown PullRequestWebhook_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_merge_commit_message(values []PullRequestWebhook_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_webhook_merge_commit_title.go b/pkg/github/models/pull_request_webhook_merge_commit_title.go new file mode 100644 index 00000000..7a660123 --- /dev/null +++ b/pkg/github/models/pull_request_webhook_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a merge commit title.- `PR_TITLE` - default to the pull request's title.- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). +type PullRequestWebhook_merge_commit_title int + +const ( + PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE PullRequestWebhook_merge_commit_title = iota + MERGE_MESSAGE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE +) + +func (i PullRequestWebhook_merge_commit_title) String() string { + return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] +} +func ParsePullRequestWebhook_merge_commit_title(v string) (any, error) { + result := PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE + case "MERGE_MESSAGE": + result = MERGE_MESSAGE_PULLREQUESTWEBHOOK_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown PullRequestWebhook_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_merge_commit_title(values []PullRequestWebhook_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go b/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go new file mode 100644 index 00000000..45003c9f --- /dev/null +++ b/pkg/github/models/pull_request_webhook_squash_merge_commit_message.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. +type PullRequestWebhook_squash_merge_commit_message int + +const ( + PR_BODY_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE PullRequestWebhook_squash_merge_commit_message = iota + COMMIT_MESSAGES_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + BLANK_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE +) + +func (i PullRequestWebhook_squash_merge_commit_message) String() string { + return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] +} +func ParsePullRequestWebhook_squash_merge_commit_message(v string) (any, error) { + result := PR_BODY_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + switch v { + case "PR_BODY": + result = PR_BODY_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + case "COMMIT_MESSAGES": + result = COMMIT_MESSAGES_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + case "BLANK": + result = BLANK_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_MESSAGE + default: + return 0, errors.New("Unknown PullRequestWebhook_squash_merge_commit_message value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_squash_merge_commit_message(values []PullRequestWebhook_squash_merge_commit_message) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_squash_merge_commit_message) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go b/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go new file mode 100644 index 00000000..6247b099 --- /dev/null +++ b/pkg/github/models/pull_request_webhook_squash_merge_commit_title.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The default value for a squash merge commit title:- `PR_TITLE` - default to the pull request's title.- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). +type PullRequestWebhook_squash_merge_commit_title int + +const ( + PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE PullRequestWebhook_squash_merge_commit_title = iota + COMMIT_OR_PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE +) + +func (i PullRequestWebhook_squash_merge_commit_title) String() string { + return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] +} +func ParsePullRequestWebhook_squash_merge_commit_title(v string) (any, error) { + result := PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE + switch v { + case "PR_TITLE": + result = PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE + case "COMMIT_OR_PR_TITLE": + result = COMMIT_OR_PR_TITLE_PULLREQUESTWEBHOOK_SQUASH_MERGE_COMMIT_TITLE + default: + return 0, errors.New("Unknown PullRequestWebhook_squash_merge_commit_title value: " + v) + } + return &result, nil +} +func SerializePullRequestWebhook_squash_merge_commit_title(values []PullRequestWebhook_squash_merge_commit_title) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PullRequestWebhook_squash_merge_commit_title) isMultiValue() bool { + return false +} diff --git a/pkg/github/notifications/notifications_request_builder.go b/pkg/github/notifications/notifications_request_builder.go index e90cb2b5..f1c998f4 100644 --- a/pkg/github/notifications/notifications_request_builder.go +++ b/pkg/github/notifications/notifications_request_builder.go @@ -110,7 +110,7 @@ func (m *NotificationsRequestBuilder) ToGetRequestInformation(ctx context.Contex // ToPutRequestInformation marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. // returns a *RequestInformation when successful func (m *NotificationsRequestBuilder) ToPutRequestInformation(ctx context.Context, body NotificationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/notifications", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_actions_permissions_repositories_request_builder.go b/pkg/github/orgs/item_actions_permissions_repositories_request_builder.go index 781a261b..1b045c93 100644 --- a/pkg/github/orgs/item_actions_permissions_repositories_request_builder.go +++ b/pkg/github/orgs/item_actions_permissions_repositories_request_builder.go @@ -85,7 +85,7 @@ func (m *ItemActionsPermissionsRepositoriesRequestBuilder) ToGetRequestInformati // ToPutRequestInformation replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemActionsPermissionsRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsPermissionsRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/orgs/{org}/actions/permissions/repositories", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) if err != nil { diff --git a/pkg/github/orgs/item_actions_secrets_item_repositories_request_builder.go b/pkg/github/orgs/item_actions_secrets_item_repositories_request_builder.go index e4be2433..5a677f92 100644 --- a/pkg/github/orgs/item_actions_secrets_item_repositories_request_builder.go +++ b/pkg/github/orgs/item_actions_secrets_item_repositories_request_builder.go @@ -85,7 +85,7 @@ func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) ToGetRequestInformati // ToPutRequestInformation replaces all repositories for an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret).Authenticated users must have collaborator access to a repository to create, update, or read secrets.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. // returns a *RequestInformation when successful func (m *ItemActionsSecretsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}/repositories", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) if err != nil { diff --git a/pkg/github/orgs/item_actions_variables_item_repositories_request_builder.go b/pkg/github/orgs/item_actions_variables_item_repositories_request_builder.go index 25b72e25..5c15982f 100644 --- a/pkg/github/orgs/item_actions_variables_item_repositories_request_builder.go +++ b/pkg/github/orgs/item_actions_variables_item_repositories_request_builder.go @@ -85,7 +85,7 @@ func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) ToGetRequestInforma // ToPutRequestInformation replaces all repositories for an organization variable that is availableto selected repositories. Organization variables that are available to selectedrepositories have their `visibility` field set to `selected`.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. // returns a *RequestInformation when successful func (m *ItemActionsVariablesItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemActionsVariablesItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/orgs/{org}/actions/variables/{name}/repositories", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) if err != nil { diff --git a/pkg/github/orgs/item_actions_variables_request_builder.go b/pkg/github/orgs/item_actions_variables_request_builder.go index f23222a0..b8e2628d 100644 --- a/pkg/github/orgs/item_actions_variables_request_builder.go +++ b/pkg/github/orgs/item_actions_variables_request_builder.go @@ -91,7 +91,7 @@ func (m *ItemActionsVariablesRequestBuilder) ToGetRequestInformation(ctx context // ToPostRequestInformation creates an organization variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemActionsVariablesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/actions/variables", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_codespaces_secrets_item_repositories_request_builder.go b/pkg/github/orgs/item_codespaces_secrets_item_repositories_request_builder.go index d204d6f8..2ba0a048 100644 --- a/pkg/github/orgs/item_codespaces_secrets_item_repositories_request_builder.go +++ b/pkg/github/orgs/item_codespaces_secrets_item_repositories_request_builder.go @@ -94,7 +94,7 @@ func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) ToGetRequestInform // ToPutRequestInformation replaces all repositories for an organization development environment secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCodespacesSecretsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemCodespacesSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}/repositories", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_dependabot_secrets_item_repositories_request_builder.go b/pkg/github/orgs/item_dependabot_secrets_item_repositories_request_builder.go index 4133c63f..9c1a43dd 100644 --- a/pkg/github/orgs/item_dependabot_secrets_item_repositories_request_builder.go +++ b/pkg/github/orgs/item_dependabot_secrets_item_repositories_request_builder.go @@ -85,7 +85,7 @@ func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) ToGetRequestInform // ToPutRequestInformation replaces all repositories for an organization secret when the `visibility`for repository access is set to `selected`. The visibility is set when you [Createor update an organization secret](https://docs.github.com/rest/dependabot/secrets#create-or-update-an-organization-secret).OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemDependabotSecretsItemRepositoriesRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemDependabotSecretsItemRepositoriesPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}/repositories", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) if err != nil { diff --git a/pkg/github/orgs/item_hooks_request_builder.go b/pkg/github/orgs/item_hooks_request_builder.go index df0b48e5..2fd9b660 100644 --- a/pkg/github/orgs/item_hooks_request_builder.go +++ b/pkg/github/orgs/item_hooks_request_builder.go @@ -103,7 +103,7 @@ func (m *ItemHooksRequestBuilder) ToGetRequestInformation(ctx context.Context, r // ToPostRequestInformation create a hook that posts payloads in JSON format.You must be an organization owner to use this endpoint. OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a *RequestInformation when successful func (m *ItemHooksRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemHooksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/hooks", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_invitations_request_builder.go b/pkg/github/orgs/item_invitations_request_builder.go index a33bd8fd..fe97275d 100644 --- a/pkg/github/orgs/item_invitations_request_builder.go +++ b/pkg/github/orgs/item_invitations_request_builder.go @@ -108,7 +108,7 @@ func (m *ItemInvitationsRequestBuilder) ToGetRequestInformation(ctx context.Cont // ToPostRequestInformation invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a *RequestInformation when successful func (m *ItemInvitationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemInvitationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/invitations", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_migrations_request_builder.go b/pkg/github/orgs/item_migrations_request_builder.go index 5316c228..119f36b0 100644 --- a/pkg/github/orgs/item_migrations_request_builder.go +++ b/pkg/github/orgs/item_migrations_request_builder.go @@ -102,7 +102,7 @@ func (m *ItemMigrationsRequestBuilder) ToGetRequestInformation(ctx context.Conte // ToPostRequestInformation initiates the generation of a migration archive. // returns a *RequestInformation when successful func (m *ItemMigrationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemMigrationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/migrations", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_personal_access_token_requests_request_builder.go b/pkg/github/orgs/item_personal_access_token_requests_request_builder.go index bb2be3b8..88fdb9a7 100644 --- a/pkg/github/orgs/item_personal_access_token_requests_request_builder.go +++ b/pkg/github/orgs/item_personal_access_token_requests_request_builder.go @@ -129,7 +129,7 @@ func (m *ItemPersonalAccessTokenRequestsRequestBuilder) ToGetRequestInformation( // ToPostRequestInformation approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. // returns a *RequestInformation when successful func (m *ItemPersonalAccessTokenRequestsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPersonalAccessTokenRequestsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/personal-access-token-requests", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_personal_access_tokens_request_builder.go b/pkg/github/orgs/item_personal_access_tokens_request_builder.go index 5d5ffcba..b9b75052 100644 --- a/pkg/github/orgs/item_personal_access_tokens_request_builder.go +++ b/pkg/github/orgs/item_personal_access_tokens_request_builder.go @@ -129,7 +129,7 @@ func (m *ItemPersonalAccessTokensRequestBuilder) ToGetRequestInformation(ctx con // ToPostRequestInformation updates the access organization members have to organization resources via fine-grained personal access tokens. Limited to revoking a token's existing access.Only GitHub Apps can use this endpoint. // returns a *RequestInformation when successful func (m *ItemPersonalAccessTokensRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPersonalAccessTokensPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/personal-access-tokens", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_projects_request_builder.go b/pkg/github/orgs/item_projects_request_builder.go index a0b87cf6..009de45e 100644 --- a/pkg/github/orgs/item_projects_request_builder.go +++ b/pkg/github/orgs/item_projects_request_builder.go @@ -101,7 +101,7 @@ func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context // ToPostRequestInformation creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. // returns a *RequestInformation when successful func (m *ItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/projects", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_properties_values_request_builder.go b/pkg/github/orgs/item_properties_values_request_builder.go index 2d3569cb..30aeb0d7 100644 --- a/pkg/github/orgs/item_properties_values_request_builder.go +++ b/pkg/github/orgs/item_properties_values_request_builder.go @@ -94,7 +94,7 @@ func (m *ItemPropertiesValuesRequestBuilder) ToGetRequestInformation(ctx context // ToPatchRequestInformation create new or update existing custom property values for repositories in a batch that belong to an organization.Each target repository will have its custom property values updated to match the values provided in the request.A maximum of 30 repositories can be updated in a single request.Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_values_editor` in the organization. // returns a *RequestInformation when successful func (m *ItemPropertiesValuesRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemPropertiesValuesPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, "{+baseurl}/orgs/{org}/properties/values", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_repos_request_builder.go b/pkg/github/orgs/item_repos_request_builder.go index 7222c42d..b12f55fe 100644 --- a/pkg/github/orgs/item_repos_request_builder.go +++ b/pkg/github/orgs/item_repos_request_builder.go @@ -95,7 +95,7 @@ func (m *ItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, r // ToPostRequestInformation creates a new repository in the specified organization. The authenticated user must be a member of the organization.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. // returns a *RequestInformation when successful func (m *ItemReposRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemReposPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/repos", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_rulesets_request_builder.go b/pkg/github/orgs/item_rulesets_request_builder.go index cc9d0e96..1046cfb8 100644 --- a/pkg/github/orgs/item_rulesets_request_builder.go +++ b/pkg/github/orgs/item_rulesets_request_builder.go @@ -110,7 +110,7 @@ func (m *ItemRulesetsRequestBuilder) ToGetRequestInformation(ctx context.Context // ToPostRequestInformation create a repository ruleset for an organization. // returns a *RequestInformation when successful func (m *ItemRulesetsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemRulesetsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/rulesets", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_request_builder.go index 71e70c6f..e7a565b1 100644 --- a/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_request_builder.go +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_item_reactions_request_builder.go @@ -96,7 +96,7 @@ func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToGetR // ToPostRequestInformation create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment).A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamsItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go index cb6d8b4d..1fce1e55 100644 --- a/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go +++ b/pkg/github/orgs/item_teams_item_discussions_item_comments_request_builder.go @@ -96,7 +96,7 @@ func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) ToGetRequestInforma // ToPostRequestInformation creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamsItemDiscussionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_teams_item_discussions_item_reactions_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_item_reactions_request_builder.go index b9aee61b..46dbe2a2 100644 --- a/pkg/github/orgs/item_teams_item_discussions_item_reactions_request_builder.go +++ b/pkg/github/orgs/item_teams_item_discussions_item_reactions_request_builder.go @@ -96,7 +96,7 @@ func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) ToGetRequestInform // ToPostRequestInformation create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion).A response with an HTTP `200` status means that you already added the reaction type to this team discussion.**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamsItemDiscussionsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_teams_item_discussions_request_builder.go b/pkg/github/orgs/item_teams_item_discussions_request_builder.go index 43e81820..07fd7960 100644 --- a/pkg/github/orgs/item_teams_item_discussions_request_builder.go +++ b/pkg/github/orgs/item_teams_item_discussions_request_builder.go @@ -98,7 +98,7 @@ func (m *ItemTeamsItemDiscussionsRequestBuilder) ToGetRequestInformation(ctx con // ToPostRequestInformation creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamsItemDiscussionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/orgs/item_teams_request_builder.go b/pkg/github/orgs/item_teams_request_builder.go index cadd7eda..968bb6ea 100644 --- a/pkg/github/orgs/item_teams_request_builder.go +++ b/pkg/github/orgs/item_teams_request_builder.go @@ -104,7 +104,7 @@ func (m *ItemTeamsRequestBuilder) ToGetRequestInformation(ctx context.Context, r // ToPostRequestInformation to create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)."When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". // returns a *RequestInformation when successful func (m *ItemTeamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/orgs/{org}/teams", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/projects/columns_item_cards_request_builder.go b/pkg/github/projects/columns_item_cards_request_builder.go index 363d3b53..97fa2daa 100644 --- a/pkg/github/projects/columns_item_cards_request_builder.go +++ b/pkg/github/projects/columns_item_cards_request_builder.go @@ -218,7 +218,7 @@ func (m *ColumnsItemCardsRequestBuilder) ToGetRequestInformation(ctx context.Con } // returns a *RequestInformation when successful func (m *ColumnsItemCardsRequestBuilder) ToPostRequestInformation(ctx context.Context, body CardsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/projects/columns/{column_id}/cards", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/projects/item_columns_request_builder.go b/pkg/github/projects/item_columns_request_builder.go index c5a1f0dc..bcb6df3c 100644 --- a/pkg/github/projects/item_columns_request_builder.go +++ b/pkg/github/projects/item_columns_request_builder.go @@ -96,7 +96,7 @@ func (m *ItemColumnsRequestBuilder) ToGetRequestInformation(ctx context.Context, // ToPostRequestInformation creates a new project column. // returns a *RequestInformation when successful func (m *ItemColumnsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemColumnsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/projects/{project_id}/columns", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_actions_runs_with_run_item_request_builder.go b/pkg/github/repos/item_item_actions_runs_with_run_item_request_builder.go index 9e042c7b..5159216f 100644 --- a/pkg/github/repos/item_item_actions_runs_with_run_item_request_builder.go +++ b/pkg/github/repos/item_item_actions_runs_with_run_item_request_builder.go @@ -130,7 +130,7 @@ func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) Timing()(*ItemItemAction // ToDeleteRequestInformation deletes a specific workflow run.Anyone with write access to the repository can use this endpoint.If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemActionsRunsWithRun_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } diff --git a/pkg/github/repos/item_item_actions_variables_request_builder.go b/pkg/github/repos/item_item_actions_variables_request_builder.go index 8e64e791..520730a4 100644 --- a/pkg/github/repos/item_item_actions_variables_request_builder.go +++ b/pkg/github/repos/item_item_actions_variables_request_builder.go @@ -91,7 +91,7 @@ func (m *ItemItemActionsVariablesRequestBuilder) ToGetRequestInformation(ctx con // ToPostRequestInformation creates a repository variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemActionsVariablesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemActionsVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/variables", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_code_scanning_analyses_with_analysis_item_request_builder.go b/pkg/github/repos/item_item_code_scanning_analyses_with_analysis_item_request_builder.go index 8bc924ee..1c9c8148 100644 --- a/pkg/github/repos/item_item_code_scanning_analyses_with_analysis_item_request_builder.go +++ b/pkg/github/repos/item_item_code_scanning_analyses_with_analysis_item_request_builder.go @@ -18,7 +18,7 @@ type ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderDeleteQueryParam // NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderInternal instantiates a new ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder and sets the default values. func NewItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) { m := &ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses/{analysis_id}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses/{analysis_id}{?confirm_delete*}", pathParameters), } return m } @@ -87,7 +87,7 @@ func (m *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) Get(ctx co // ToDeleteRequestInformation deletes a specified code scanning analysis from a repository.You can delete one analysis at a time.To delete a series of analyses, start with the most recent analysis and work backwards.Conceptually, the process is similar to the undo function in a text editor.When you list the analyses for a repository,one or more will be identified as deletable in the response:```"deletable": true```An analysis is deletable when it's the most recent in a set of analyses.Typically, a repository will have multiple sets of analysesfor each enabled code scanning tool,where a set is determined by a unique combination of analysis values:* `ref`* `tool`* `category`If you attempt to delete an analysis that is not the most recent in a set,you'll get a 400 response with the message:```Analysis specified is not deletable.```The response from a successful `DELETE` operation provides you withtwo alternative URLs for deleting the next analysis in the set:`next_analysis_url` and `confirm_delete_url`.Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysisin a set. This is a useful option if you want to preserve at least one analysisfor the specified tool in your repository.Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`in the 200 response is `null`.As an example of the deletion process,let's imagine that you added a workflow that configured a particular code scanning toolto analyze the code in a repository. This tool has added 15 analyses:10 on the default branch, and another 5 on a topic branch.You therefore have two separate sets of analyses for this tool.You've now decided that you want to remove all of the analyses for the tool.To do this you must make 15 separate deletion requests.To start, you must find an analysis that's identified as deletable.Each set of analyses always has one that's identified as deletable.Having found the deletable analysis for one of the two sets,delete this analysis and then continue deleting the next analysis in the set until they're all deleted.Then repeat the process for the second set.The procedure therefore consists of a nested loop:**Outer loop**:* List the analyses for the repository, filtered by tool.* Parse this list to find a deletable analysis. If found: **Inner loop**: * Delete the identified analysis. * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.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. // returns a *RequestInformation when successful func (m *ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCodeScanningAnalysesWithAnalysis_ItemRequestBuilderDeleteQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses/{analysis_id}{?confirm_delete*}", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil diff --git a/pkg/github/repos/item_item_codespaces_request_builder.go b/pkg/github/repos/item_item_codespaces_request_builder.go index 981cbcad..6acc3b2e 100644 --- a/pkg/github/repos/item_item_codespaces_request_builder.go +++ b/pkg/github/repos/item_item_codespaces_request_builder.go @@ -126,7 +126,7 @@ func (m *ItemItemCodespacesRequestBuilder) ToGetRequestInformation(ctx context.C // ToPostRequestInformation creates a codespace owned by the authenticated user in the specified repository.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemCodespacesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_comments_item_reactions_request_builder.go b/pkg/github/repos/item_item_comments_item_reactions_request_builder.go index 5de021f1..da18cf0b 100644 --- a/pkg/github/repos/item_item_comments_item_reactions_request_builder.go +++ b/pkg/github/repos/item_item_comments_item_reactions_request_builder.go @@ -104,7 +104,7 @@ func (m *ItemItemCommentsItemReactionsRequestBuilder) ToGetRequestInformation(ct // ToPostRequestInformation create a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. // returns a *RequestInformation when successful func (m *ItemItemCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_commits_item_comments_request_builder.go b/pkg/github/repos/item_item_commits_item_comments_request_builder.go index 62f8a842..f90cecba 100644 --- a/pkg/github/repos/item_item_commits_item_comments_request_builder.go +++ b/pkg/github/repos/item_item_commits_item_comments_request_builder.go @@ -88,7 +88,7 @@ func (m *ItemItemCommitsItemCommentsRequestBuilder) ToGetRequestInformation(ctx // ToPostRequestInformation create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."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)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemCommitsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemCommitsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/comments", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_contents_with_path_item_request_builder.go b/pkg/github/repos/item_item_contents_with_path_item_request_builder.go index f3d7d8c7..47ce5693 100644 --- a/pkg/github/repos/item_item_contents_with_path_item_request_builder.go +++ b/pkg/github/repos/item_item_contents_with_path_item_request_builder.go @@ -250,7 +250,7 @@ func (m *ItemItemContentsWithPathItemRequestBuilder) Put(ctx context.Context, bo // ToDeleteRequestInformation deletes a file in a repository.You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.**Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. // returns a *RequestInformation when successful func (m *ItemItemContentsWithPathItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemItemContentsItemWithPathDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents/{path}", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) @@ -270,7 +270,7 @@ func (m *ItemItemContentsWithPathItemRequestBuilder) ToGetRequestInformation(ctx // ToPutRequestInformation creates a new file or replaces an existing file in a repository.**Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. // returns a *RequestInformation when successful func (m *ItemItemContentsWithPathItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemContentsItemWithPathPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents/{path}", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_deployments_item_statuses_request_builder.go b/pkg/github/repos/item_item_deployments_item_statuses_request_builder.go index 5ddae180..5cd528d7 100644 --- a/pkg/github/repos/item_item_deployments_item_statuses_request_builder.go +++ b/pkg/github/repos/item_item_deployments_item_statuses_request_builder.go @@ -101,7 +101,7 @@ func (m *ItemItemDeploymentsItemStatusesRequestBuilder) ToGetRequestInformation( // ToPostRequestInformation users with `push` access can create deployment statuses for a given deployment.OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemDeploymentsItemStatusesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemDeploymentsItemStatusesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}/statuses", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_deployments_request_builder.go b/pkg/github/repos/item_item_deployments_request_builder.go index db38d563..8c29cd2c 100644 --- a/pkg/github/repos/item_item_deployments_request_builder.go +++ b/pkg/github/repos/item_item_deployments_request_builder.go @@ -105,7 +105,7 @@ func (m *ItemItemDeploymentsRequestBuilder) ToGetRequestInformation(ctx context. // ToPostRequestInformation deployments offer a few configurable parameters with certain defaults.The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify thembefore we merge a pull request.The `environment` parameter allows deployments to be issued to different runtime environments. Teams often havemultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parametermakes it easier to track which environments have requested deployments. The default environment is `production`.The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. Ifthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API willreturn a failure response.By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success`state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or tospecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you donot require any contexts or create any commit statuses, the deployment will always succeed.The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON textfield that will be passed on when a deployment event is dispatched.The `task` parameter is used by the deployment system to allow different execution paths. In the web world this mightbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile anapplication with debugging enabled.Merged branch response:You will see this response when GitHub automatically merges the base branch into the topic branch instead of creatinga deployment. This auto-merge happens when:* Auto-merge option is enabled in the repository* Topic branch does not include the latest changes on the base branch, which is `master` in the response example* There are no merge conflictsIf there are no new commits in the base branch, a new request to create a deployment should give a successfulresponse.Merge conflict response:This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can'tbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.Failed commit status checks:This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemDeploymentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemDeploymentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_environments_item_deployment_branch_policies_request_builder.go b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_request_builder.go index 54c91bc5..c7ebb070 100644 --- a/pkg/github/repos/item_item_environments_item_deployment_branch_policies_request_builder.go +++ b/pkg/github/repos/item_item_environments_item_deployment_branch_policies_request_builder.go @@ -90,7 +90,7 @@ func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) ToGetRe // ToPostRequestInformation creates a deployment branch or tag policy for an environment.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemEnvironmentsItemDeploymentBranchPoliciesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.DeploymentBranchPolicyNamePatternWithTypeable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment-branch-policies", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_environments_item_variables_request_builder.go b/pkg/github/repos/item_item_environments_item_variables_request_builder.go index b2148ec9..c0feae0e 100644 --- a/pkg/github/repos/item_item_environments_item_variables_request_builder.go +++ b/pkg/github/repos/item_item_environments_item_variables_request_builder.go @@ -91,7 +91,7 @@ func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) ToGetRequestInformatio // ToPostRequestInformation create an environment variable that you can reference in a GitHub Actions workflow.Authenticated users must have collaborator access to a repository to create, update, or read variables.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemEnvironmentsItemVariablesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemEnvironmentsItemVariablesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/variables", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_forks_request_builder.go b/pkg/github/repos/item_item_forks_request_builder.go index 48b0f096..408290a2 100644 --- a/pkg/github/repos/item_item_forks_request_builder.go +++ b/pkg/github/repos/item_item_forks_request_builder.go @@ -98,7 +98,7 @@ func (m *ItemItemForksRequestBuilder) ToGetRequestInformation(ctx context.Contex // ToPostRequestInformation create a fork for the authenticated user.**Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api).**Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. // returns a *RequestInformation when successful func (m *ItemItemForksRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemForksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/forks", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_hooks_request_builder.go b/pkg/github/repos/item_item_hooks_request_builder.go index dafc66af..dbe071a0 100644 --- a/pkg/github/repos/item_item_hooks_request_builder.go +++ b/pkg/github/repos/item_item_hooks_request_builder.go @@ -105,7 +105,7 @@ func (m *ItemItemHooksRequestBuilder) ToGetRequestInformation(ctx context.Contex // ToPostRequestInformation repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks canshare the same `config` as long as those webhooks do not have any `events` that overlap. // returns a *RequestInformation when successful func (m *ItemItemHooksRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemHooksPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_issues_comments_item_reactions_request_builder.go b/pkg/github/repos/item_item_issues_comments_item_reactions_request_builder.go index 52bf0511..0a393349 100644 --- a/pkg/github/repos/item_item_issues_comments_item_reactions_request_builder.go +++ b/pkg/github/repos/item_item_issues_comments_item_reactions_request_builder.go @@ -104,7 +104,7 @@ func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) ToGetRequestInformat // ToPostRequestInformation create a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. // returns a *RequestInformation when successful func (m *ItemItemIssuesCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_issues_item_comments_request_builder.go b/pkg/github/repos/item_item_issues_item_comments_request_builder.go index ea61e6f6..f6ef87d9 100644 --- a/pkg/github/repos/item_item_issues_item_comments_request_builder.go +++ b/pkg/github/repos/item_item_issues_item_comments_request_builder.go @@ -101,7 +101,7 @@ func (m *ItemItemIssuesItemCommentsRequestBuilder) ToGetRequestInformation(ctx c // ToPostRequestInformation you can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."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)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemIssuesItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/comments", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_issues_item_labels_request_builder.go b/pkg/github/repos/item_item_issues_item_labels_request_builder.go index 0deecb62..1c4cbc17 100644 --- a/pkg/github/repos/item_item_issues_item_labels_request_builder.go +++ b/pkg/github/repos/item_item_issues_item_labels_request_builder.go @@ -627,7 +627,7 @@ func (m *ItemItemIssuesItemLabelsRequestBuilder) Put(ctx context.Context, body L // ToDeleteRequestInformation removes all labels from an issue. // returns a *RequestInformation when successful func (m *ItemItemIssuesItemLabelsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil @@ -643,7 +643,7 @@ func (m *ItemItemIssuesItemLabelsRequestBuilder) ToGetRequestInformation(ctx con // ToPostRequestInformation adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. // returns a *RequestInformation when successful func (m *ItemItemIssuesItemLabelsRequestBuilder) ToPostRequestInformation(ctx context.Context, body LabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) @@ -655,7 +655,7 @@ func (m *ItemItemIssuesItemLabelsRequestBuilder) ToPostRequestInformation(ctx co // ToPutRequestInformation removes any previous labels and sets the new labels for an issue. // returns a *RequestInformation when successful func (m *ItemItemIssuesItemLabelsRequestBuilder) ToPutRequestInformation(ctx context.Context, body LabelsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_issues_item_reactions_request_builder.go b/pkg/github/repos/item_item_issues_item_reactions_request_builder.go index d73e05aa..d2cd45e0 100644 --- a/pkg/github/repos/item_item_issues_item_reactions_request_builder.go +++ b/pkg/github/repos/item_item_issues_item_reactions_request_builder.go @@ -106,7 +106,7 @@ func (m *ItemItemIssuesItemReactionsRequestBuilder) ToGetRequestInformation(ctx // ToPostRequestInformation create a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. // returns a *RequestInformation when successful func (m *ItemItemIssuesItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_issues_request_builder.go b/pkg/github/repos/item_item_issues_request_builder.go index f1043728..d3a05228 100644 --- a/pkg/github/repos/item_item_issues_request_builder.go +++ b/pkg/github/repos/item_item_issues_request_builder.go @@ -143,7 +143,7 @@ func (m *ItemItemIssuesRequestBuilder) ToGetRequestInformation(ctx context.Conte // ToPostRequestInformation any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."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)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemIssuesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_keys_request_builder.go b/pkg/github/repos/item_item_keys_request_builder.go index 4e3f3511..ebc09aa8 100644 --- a/pkg/github/repos/item_item_keys_request_builder.go +++ b/pkg/github/repos/item_item_keys_request_builder.go @@ -96,7 +96,7 @@ func (m *ItemItemKeysRequestBuilder) ToGetRequestInformation(ctx context.Context // ToPostRequestInformation you can create a read-only deploy key. // returns a *RequestInformation when successful func (m *ItemItemKeysRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemKeysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/keys", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_labels_request_builder.go b/pkg/github/repos/item_item_labels_request_builder.go index d9480d14..61d72485 100644 --- a/pkg/github/repos/item_item_labels_request_builder.go +++ b/pkg/github/repos/item_item_labels_request_builder.go @@ -104,7 +104,7 @@ func (m *ItemItemLabelsRequestBuilder) ToGetRequestInformation(ctx context.Conte // ToPostRequestInformation creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/). // returns a *RequestInformation when successful func (m *ItemItemLabelsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemLabelsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/labels", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_milestones_request_builder.go b/pkg/github/repos/item_item_milestones_request_builder.go index 41be1848..1b986a5f 100644 --- a/pkg/github/repos/item_item_milestones_request_builder.go +++ b/pkg/github/repos/item_item_milestones_request_builder.go @@ -110,7 +110,7 @@ func (m *ItemItemMilestonesRequestBuilder) ToGetRequestInformation(ctx context.C // ToPostRequestInformation creates a milestone. // returns a *RequestInformation when successful func (m *ItemItemMilestonesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemMilestonesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_notifications_request_builder.go b/pkg/github/repos/item_item_notifications_request_builder.go index cfdb1233..f2c4cd86 100644 --- a/pkg/github/repos/item_item_notifications_request_builder.go +++ b/pkg/github/repos/item_item_notifications_request_builder.go @@ -91,7 +91,7 @@ func (m *ItemItemNotificationsRequestBuilder) ToGetRequestInformation(ctx contex // ToPutRequestInformation marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. // returns a *RequestInformation when successful func (m *ItemItemNotificationsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemNotificationsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/notifications", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_pages_builds_request_builder.go b/pkg/github/repos/item_item_pages_builds_request_builder.go index 3171607b..ea6cea35 100644 --- a/pkg/github/repos/item_item_pages_builds_request_builder.go +++ b/pkg/github/repos/item_item_pages_builds_request_builder.go @@ -98,7 +98,7 @@ func (m *ItemItemPagesBuildsRequestBuilder) ToGetRequestInformation(ctx context. // ToPostRequestInformation you can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. // returns a *RequestInformation when successful func (m *ItemItemPagesBuildsRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil diff --git a/pkg/github/repos/item_item_projects_request_builder.go b/pkg/github/repos/item_item_projects_request_builder.go index 94a9fb72..0bea6ded 100644 --- a/pkg/github/repos/item_item_projects_request_builder.go +++ b/pkg/github/repos/item_item_projects_request_builder.go @@ -109,7 +109,7 @@ func (m *ItemItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Con // ToPostRequestInformation creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. // returns a *RequestInformation when successful func (m *ItemItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/projects", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_pulls_comments_item_reactions_request_builder.go b/pkg/github/repos/item_item_pulls_comments_item_reactions_request_builder.go index 45d2afaf..a15fa799 100644 --- a/pkg/github/repos/item_item_pulls_comments_item_reactions_request_builder.go +++ b/pkg/github/repos/item_item_pulls_comments_item_reactions_request_builder.go @@ -104,7 +104,7 @@ func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) ToGetRequestInformati // ToPostRequestInformation create a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. // returns a *RequestInformation when successful func (m *ItemItemPullsCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_pulls_item_comments_request_builder.go b/pkg/github/repos/item_item_pulls_item_comments_request_builder.go index 241debb1..521f634b 100644 --- a/pkg/github/repos/item_item_pulls_item_comments_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_comments_request_builder.go @@ -107,7 +107,7 @@ func (m *ItemItemPullsItemCommentsRequestBuilder) ToGetRequestInformation(ctx co // ToPostRequestInformation creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."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)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go b/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go index e579339e..0c3eecd8 100644 --- a/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_reviews_request_builder.go @@ -99,7 +99,7 @@ func (m *ItemItemPullsItemReviewsRequestBuilder) ToGetRequestInformation(ctx con // ToPostRequestInformation creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."**Note:** To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.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)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsItemReviewsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsItemReviewsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_pulls_request_builder.go b/pkg/github/repos/item_item_pulls_request_builder.go index 5d190a44..5bee95dd 100644 --- a/pkg/github/repos/item_item_pulls_request_builder.go +++ b/pkg/github/repos/item_item_pulls_request_builder.go @@ -119,7 +119,7 @@ func (m *ItemItemPullsRequestBuilder) ToGetRequestInformation(ctx context.Contex // ToPostRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."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)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. // returns a *RequestInformation when successful func (m *ItemItemPullsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_releases_item_assets_request_builder.go b/pkg/github/repos/item_item_releases_item_assets_request_builder.go index a403c322..7adbf9bc 100644 --- a/pkg/github/repos/item_item_releases_item_assets_request_builder.go +++ b/pkg/github/repos/item_item_releases_item_assets_request_builder.go @@ -25,7 +25,7 @@ type ItemItemReleasesItemAssetsRequestBuilderPostQueryParameters struct { // NewItemItemReleasesItemAssetsRequestBuilderInternal instantiates a new ItemItemReleasesItemAssetsRequestBuilder and sets the default values. func NewItemItemReleasesItemAssetsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemReleasesItemAssetsRequestBuilder) { m := &ItemItemReleasesItemAssetsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets{?page*,per_page*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets?name={name}{&label*,page*,per_page*}", pathParameters), } return m } @@ -78,7 +78,7 @@ func (m *ItemItemReleasesItemAssetsRequestBuilder) Post(ctx context.Context, bod } // returns a *RequestInformation when successful func (m *ItemItemReleasesItemAssetsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemReleasesItemAssetsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets{?page*,per_page*}", m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil diff --git a/pkg/github/repos/item_item_releases_item_reactions_request_builder.go b/pkg/github/repos/item_item_releases_item_reactions_request_builder.go index a2105f41..1787a71e 100644 --- a/pkg/github/repos/item_item_releases_item_reactions_request_builder.go +++ b/pkg/github/repos/item_item_releases_item_reactions_request_builder.go @@ -104,7 +104,7 @@ func (m *ItemItemReleasesItemReactionsRequestBuilder) ToGetRequestInformation(ct // ToPostRequestInformation create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. // returns a *RequestInformation when successful func (m *ItemItemReleasesItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemReleasesItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_releases_request_builder.go b/pkg/github/repos/item_item_releases_request_builder.go index e8e42dd9..8c1b5526 100644 --- a/pkg/github/repos/item_item_releases_request_builder.go +++ b/pkg/github/repos/item_item_releases_request_builder.go @@ -123,7 +123,7 @@ func (m *ItemItemReleasesRequestBuilder) ToGetRequestInformation(ctx context.Con // ToPostRequestInformation users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." // returns a *RequestInformation when successful func (m *ItemItemReleasesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemReleasesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_rulesets_request_builder.go b/pkg/github/repos/item_item_rulesets_request_builder.go index 3229726e..ec0cf913 100644 --- a/pkg/github/repos/item_item_rulesets_request_builder.go +++ b/pkg/github/repos/item_item_rulesets_request_builder.go @@ -112,7 +112,7 @@ func (m *ItemItemRulesetsRequestBuilder) ToGetRequestInformation(ctx context.Con // ToPostRequestInformation create a ruleset for a repository. // returns a *RequestInformation when successful func (m *ItemItemRulesetsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemRulesetsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go b/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go index c1592832..3acd392c 100644 --- a/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go +++ b/pkg/github/repos/item_item_rulesets_with_ruleset_item_request_builder.go @@ -102,7 +102,7 @@ func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) Put(ctx context.Context // ToDeleteRequestInformation delete a ruleset for a repository. // returns a *RequestInformation when successful func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil @@ -118,7 +118,7 @@ func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToGetRequestInformation // ToPutRequestInformation update a ruleset for a repository. // returns a *RequestInformation when successful func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemRulesetsItemWithRuleset_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_security_advisories_request_builder.go b/pkg/github/repos/item_item_security_advisories_request_builder.go index fbc59370..4aca7ed4 100644 --- a/pkg/github/repos/item_item_security_advisories_request_builder.go +++ b/pkg/github/repos/item_item_security_advisories_request_builder.go @@ -122,7 +122,7 @@ func (m *ItemItemSecurityAdvisoriesRequestBuilder) ToGetRequestInformation(ctx c // ToPostRequestInformation creates a new repository security advisory.In order to create a draft repository security advisory, the authenticated user must be a security manager or administrator of that repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. // returns a *RequestInformation when successful func (m *ItemItemSecurityAdvisoriesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RepositoryAdvisoryCreateable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/repos/item_item_topics_request_builder.go b/pkg/github/repos/item_item_topics_request_builder.go index 09dcc325..ac9adb20 100644 --- a/pkg/github/repos/item_item_topics_request_builder.go +++ b/pkg/github/repos/item_item_topics_request_builder.go @@ -87,7 +87,7 @@ func (m *ItemItemTopicsRequestBuilder) ToGetRequestInformation(ctx context.Conte } // returns a *RequestInformation when successful func (m *ItemItemTopicsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemTopicsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/topics", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/teams/item_discussions_item_comments_item_reactions_request_builder.go b/pkg/github/teams/item_discussions_item_comments_item_reactions_request_builder.go index 0d9529f7..7a2fdae6 100644 --- a/pkg/github/teams/item_discussions_item_comments_item_reactions_request_builder.go +++ b/pkg/github/teams/item_discussions_item_comments_item_reactions_request_builder.go @@ -89,7 +89,7 @@ func (m *ItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToGetRequestInf // Deprecated: // returns a *RequestInformation when successful func (m *ItemDiscussionsItemCommentsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsItemCommentsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/teams/item_discussions_item_comments_request_builder.go b/pkg/github/teams/item_discussions_item_comments_request_builder.go index 04ea4b6e..5e32fdad 100644 --- a/pkg/github/teams/item_discussions_item_comments_request_builder.go +++ b/pkg/github/teams/item_discussions_item_comments_request_builder.go @@ -101,7 +101,7 @@ func (m *ItemDiscussionsItemCommentsRequestBuilder) ToGetRequestInformation(ctx // Deprecated: // returns a *RequestInformation when successful func (m *ItemDiscussionsItemCommentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsItemCommentsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/teams/item_discussions_item_reactions_request_builder.go b/pkg/github/teams/item_discussions_item_reactions_request_builder.go index fc9e2dd7..be0e95cf 100644 --- a/pkg/github/teams/item_discussions_item_reactions_request_builder.go +++ b/pkg/github/teams/item_discussions_item_reactions_request_builder.go @@ -89,7 +89,7 @@ func (m *ItemDiscussionsItemReactionsRequestBuilder) ToGetRequestInformation(ctx // Deprecated: // returns a *RequestInformation when successful func (m *ItemDiscussionsItemReactionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsItemReactionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/reactions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/teams/item_discussions_request_builder.go b/pkg/github/teams/item_discussions_request_builder.go index cf773fcb..00c16d06 100644 --- a/pkg/github/teams/item_discussions_request_builder.go +++ b/pkg/github/teams/item_discussions_request_builder.go @@ -101,7 +101,7 @@ func (m *ItemDiscussionsRequestBuilder) ToGetRequestInformation(ctx context.Cont // Deprecated: // returns a *RequestInformation when successful func (m *ItemDiscussionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemDiscussionsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/teams/{team_id}/discussions", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/codespaces_request_builder.go b/pkg/github/user/codespaces_request_builder.go index 0eacb378..a0d96496 100644 --- a/pkg/github/user/codespaces_request_builder.go +++ b/pkg/github/user/codespaces_request_builder.go @@ -238,7 +238,7 @@ func (m *CodespacesRequestBuilder) ToGetRequestInformation(ctx context.Context, // ToPostRequestInformation creates a new codespace, owned by the authenticated user.This endpoint requires either a `repository_id` OR a `pull_request` but not both.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. // returns a *RequestInformation when successful func (m *CodespacesRequestBuilder) ToPostRequestInformation(ctx context.Context, body CodespacesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/codespaces", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/emails_request_builder.go b/pkg/github/user/emails_request_builder.go index d1cca1b2..63d70dd1 100644 --- a/pkg/github/user/emails_request_builder.go +++ b/pkg/github/user/emails_request_builder.go @@ -381,7 +381,7 @@ func (m *EmailsRequestBuilder) Post(ctx context.Context, body EmailsPostRequestB // ToDeleteRequestInformation oAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. // returns a *RequestInformation when successful func (m *EmailsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body EmailsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/user/emails", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) @@ -401,7 +401,7 @@ func (m *EmailsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ // ToPostRequestInformation oAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. // returns a *RequestInformation when successful func (m *EmailsRequestBuilder) ToPostRequestInformation(ctx context.Context, body EmailsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/emails", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/gpg_keys_request_builder.go b/pkg/github/user/gpg_keys_request_builder.go index cfe4c6f5..2bf40318 100644 --- a/pkg/github/user/gpg_keys_request_builder.go +++ b/pkg/github/user/gpg_keys_request_builder.go @@ -111,7 +111,7 @@ func (m *Gpg_keysRequestBuilder) ToGetRequestInformation(ctx context.Context, re // ToPostRequestInformation adds a GPG key to the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. // returns a *RequestInformation when successful func (m *Gpg_keysRequestBuilder) ToPostRequestInformation(ctx context.Context, body Gpg_keysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/gpg_keys", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/keys_request_builder.go b/pkg/github/user/keys_request_builder.go index d4568945..7bbadffd 100644 --- a/pkg/github/user/keys_request_builder.go +++ b/pkg/github/user/keys_request_builder.go @@ -111,7 +111,7 @@ func (m *KeysRequestBuilder) ToGetRequestInformation(ctx context.Context, reques // ToPostRequestInformation adds a public SSH key to the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. // returns a *RequestInformation when successful func (m *KeysRequestBuilder) ToPostRequestInformation(ctx context.Context, body KeysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/keys", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/migrations_request_builder.go b/pkg/github/user/migrations_request_builder.go index 5f4f527d..f368694c 100644 --- a/pkg/github/user/migrations_request_builder.go +++ b/pkg/github/user/migrations_request_builder.go @@ -107,7 +107,7 @@ func (m *MigrationsRequestBuilder) ToGetRequestInformation(ctx context.Context, // ToPostRequestInformation initiates the generation of a user migration archive. // returns a *RequestInformation when successful func (m *MigrationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body MigrationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/migrations", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/repos_request_builder.go b/pkg/github/user/repos_request_builder.go index e38226cc..f8d85025 100644 --- a/pkg/github/user/repos_request_builder.go +++ b/pkg/github/user/repos_request_builder.go @@ -118,7 +118,7 @@ func (m *ReposRequestBuilder) ToGetRequestInformation(ctx context.Context, reque // ToPostRequestInformation creates a new repository for the authenticated user.OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. // returns a *RequestInformation when successful func (m *ReposRequestBuilder) ToPostRequestInformation(ctx context.Context, body ReposPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/repos", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/social_accounts_request_builder.go b/pkg/github/user/social_accounts_request_builder.go index 96a0e73c..b92d90e2 100644 --- a/pkg/github/user/social_accounts_request_builder.go +++ b/pkg/github/user/social_accounts_request_builder.go @@ -120,7 +120,7 @@ func (m *Social_accountsRequestBuilder) Post(ctx context.Context, body Social_ac // ToDeleteRequestInformation deletes one or more social accounts from the authenticated user's profile.OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. // returns a *RequestInformation when successful func (m *Social_accountsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body Social_accountsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, "{+baseurl}/user/social_accounts", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) @@ -140,7 +140,7 @@ func (m *Social_accountsRequestBuilder) ToGetRequestInformation(ctx context.Cont // ToPostRequestInformation add one or more social accounts to the authenticated user's profile.OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. // returns a *RequestInformation when successful func (m *Social_accountsRequestBuilder) ToPostRequestInformation(ctx context.Context, body Social_accountsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/social_accounts", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) diff --git a/pkg/github/user/ssh_signing_keys_request_builder.go b/pkg/github/user/ssh_signing_keys_request_builder.go index d923a1d6..bb6266cf 100644 --- a/pkg/github/user/ssh_signing_keys_request_builder.go +++ b/pkg/github/user/ssh_signing_keys_request_builder.go @@ -111,7 +111,7 @@ func (m *Ssh_signing_keysRequestBuilder) ToGetRequestInformation(ctx context.Con // ToPostRequestInformation creates an SSH signing key for the authenticated user's GitHub account.OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint. // returns a *RequestInformation when successful func (m *Ssh_signing_keysRequestBuilder) ToPostRequestInformation(ctx context.Context, body Ssh_signing_keysPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/user/ssh_signing_keys", m.BaseRequestBuilder.PathParameters) + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body)