diff --git a/github/github-accessors.go b/github/github-accessors.go index 35d86729d03..01f36e3418d 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -10198,6 +10198,14 @@ func (g *GenerateJITConfigRequest) GetWorkFolder() string { return *g.WorkFolder } +// GetConfigurationFilePath returns the ConfigurationFilePath field if it's non-nil, zero value otherwise. +func (g *GenerateNotesOptions) GetConfigurationFilePath() string { + if g == nil || g.ConfigurationFilePath == nil { + return "" + } + return *g.ConfigurationFilePath +} + // GetPreviousTagName returns the PreviousTagName field if it's non-nil, zero value otherwise. func (g *GenerateNotesOptions) GetPreviousTagName() string { if g == nil || g.PreviousTagName == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 3dcbd7129c4..0b10ee00c8a 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -13220,6 +13220,17 @@ func TestGenerateJITConfigRequest_GetWorkFolder(tt *testing.T) { g.GetWorkFolder() } +func TestGenerateNotesOptions_GetConfigurationFilePath(tt *testing.T) { + tt.Parallel() + var zeroValue string + g := &GenerateNotesOptions{ConfigurationFilePath: &zeroValue} + g.GetConfigurationFilePath() + g = &GenerateNotesOptions{} + g.GetConfigurationFilePath() + g = nil + g.GetConfigurationFilePath() +} + func TestGenerateNotesOptions_GetPreviousTagName(tt *testing.T) { tt.Parallel() var zeroValue string diff --git a/github/repos_releases.go b/github/repos_releases.go index b4668842b9a..ba35d804128 100644 --- a/github/repos_releases.go +++ b/github/repos_releases.go @@ -60,9 +60,10 @@ type RepositoryReleaseNotes struct { // GenerateNotesOptions represents the options to generate release notes. type GenerateNotesOptions struct { - TagName string `json:"tag_name"` - PreviousTagName *string `json:"previous_tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` + TagName string `json:"tag_name"` + PreviousTagName *string `json:"previous_tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + ConfigurationFilePath *string `json:"configuration_file_path,omitempty"` } // ReleaseAsset represents a GitHub release asset in a repository. diff --git a/github/repos_releases_test.go b/github/repos_releases_test.go index b161c0d7a5c..9eb0f6f03c2 100644 --- a/github/repos_releases_test.go +++ b/github/repos_releases_test.go @@ -917,15 +917,17 @@ func TestGenerateNotesOptions_Marshal(t *testing.T) { testJSONMarshal(t, &GenerateNotesOptions{}, "{}") u := &GenerateNotesOptions{ - TagName: "tag_name", - PreviousTagName: Ptr("previous_tag_name"), - TargetCommitish: Ptr("target_commitish"), + TagName: "tag_name", + PreviousTagName: Ptr("previous_tag_name"), + TargetCommitish: Ptr("target_commitish"), + ConfigurationFilePath: Ptr("configuration_file_path"), } want := `{ - "tag_name": "tag_name", - "previous_tag_name": "previous_tag_name", - "target_commitish": "target_commitish" + "tag_name": "tag_name", + "previous_tag_name": "previous_tag_name", + "target_commitish": "target_commitish", + "configuration_file_path": "configuration_file_path" }` testJSONMarshal(t, u, want)