-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New updates to generated code (#22)
Co-authored-by: Octokit Bot <[email protected]>
- Loading branch information
1 parent
4cde836
commit 5fa7003
Showing
17 changed files
with
1,848 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
pkg/github/repos/item/item/owner_patch_request_body_merge_commit_message.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package item | ||
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 OwnerPatchRequestBody_merge_commit_message int | ||
|
||
const ( | ||
PR_BODY_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE OwnerPatchRequestBody_merge_commit_message = iota | ||
PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
BLANK_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
) | ||
|
||
func (i OwnerPatchRequestBody_merge_commit_message) String() string { | ||
return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] | ||
} | ||
func ParseOwnerPatchRequestBody_merge_commit_message(v string) (any, error) { | ||
result := PR_BODY_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
switch v { | ||
case "PR_BODY": | ||
result = PR_BODY_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
case "PR_TITLE": | ||
result = PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
case "BLANK": | ||
result = BLANK_OWNERPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
default: | ||
return 0, errors.New("Unknown OwnerPatchRequestBody_merge_commit_message value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeOwnerPatchRequestBody_merge_commit_message(values []OwnerPatchRequestBody_merge_commit_message) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i OwnerPatchRequestBody_merge_commit_message) isMultiValue() bool { | ||
return false | ||
} |
37 changes: 37 additions & 0 deletions
37
pkg/github/repos/item/item/owner_patch_request_body_merge_commit_title.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package item | ||
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 OwnerPatchRequestBody_merge_commit_title int | ||
|
||
const ( | ||
PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE OwnerPatchRequestBody_merge_commit_title = iota | ||
MERGE_MESSAGE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
) | ||
|
||
func (i OwnerPatchRequestBody_merge_commit_title) String() string { | ||
return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] | ||
} | ||
func ParseOwnerPatchRequestBody_merge_commit_title(v string) (any, error) { | ||
result := PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
switch v { | ||
case "PR_TITLE": | ||
result = PR_TITLE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
case "MERGE_MESSAGE": | ||
result = MERGE_MESSAGE_OWNERPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
default: | ||
return 0, errors.New("Unknown OwnerPatchRequestBody_merge_commit_title value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeOwnerPatchRequestBody_merge_commit_title(values []OwnerPatchRequestBody_merge_commit_title) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i OwnerPatchRequestBody_merge_commit_title) isMultiValue() bool { | ||
return false | ||
} |
40 changes: 40 additions & 0 deletions
40
pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_message.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package item | ||
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 OwnerPatchRequestBody_squash_merge_commit_message int | ||
|
||
const ( | ||
PR_BODY_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE OwnerPatchRequestBody_squash_merge_commit_message = iota | ||
COMMIT_MESSAGES_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
BLANK_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
) | ||
|
||
func (i OwnerPatchRequestBody_squash_merge_commit_message) String() string { | ||
return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] | ||
} | ||
func ParseOwnerPatchRequestBody_squash_merge_commit_message(v string) (any, error) { | ||
result := PR_BODY_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
switch v { | ||
case "PR_BODY": | ||
result = PR_BODY_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
case "COMMIT_MESSAGES": | ||
result = COMMIT_MESSAGES_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
case "BLANK": | ||
result = BLANK_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
default: | ||
return 0, errors.New("Unknown OwnerPatchRequestBody_squash_merge_commit_message value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeOwnerPatchRequestBody_squash_merge_commit_message(values []OwnerPatchRequestBody_squash_merge_commit_message) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i OwnerPatchRequestBody_squash_merge_commit_message) isMultiValue() bool { | ||
return false | ||
} |
37 changes: 37 additions & 0 deletions
37
pkg/github/repos/item/item/owner_patch_request_body_squash_merge_commit_title.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package item | ||
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 OwnerPatchRequestBody_squash_merge_commit_title int | ||
|
||
const ( | ||
PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE OwnerPatchRequestBody_squash_merge_commit_title = iota | ||
COMMIT_OR_PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
) | ||
|
||
func (i OwnerPatchRequestBody_squash_merge_commit_title) String() string { | ||
return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] | ||
} | ||
func ParseOwnerPatchRequestBody_squash_merge_commit_title(v string) (any, error) { | ||
result := PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
switch v { | ||
case "PR_TITLE": | ||
result = PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
case "COMMIT_OR_PR_TITLE": | ||
result = COMMIT_OR_PR_TITLE_OWNERPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
default: | ||
return 0, errors.New("Unknown OwnerPatchRequestBody_squash_merge_commit_title value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeOwnerPatchRequestBody_squash_merge_commit_title(values []OwnerPatchRequestBody_squash_merge_commit_title) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i OwnerPatchRequestBody_squash_merge_commit_title) isMultiValue() bool { | ||
return false | ||
} |
37 changes: 37 additions & 0 deletions
37
pkg/github/repos/item/item/owner_patch_request_body_visibility.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package item | ||
import ( | ||
"errors" | ||
) | ||
// The visibility of the repository. | ||
type OwnerPatchRequestBody_visibility int | ||
|
||
const ( | ||
PUBLIC_OWNERPATCHREQUESTBODY_VISIBILITY OwnerPatchRequestBody_visibility = iota | ||
PRIVATE_OWNERPATCHREQUESTBODY_VISIBILITY | ||
) | ||
|
||
func (i OwnerPatchRequestBody_visibility) String() string { | ||
return []string{"public", "private"}[i] | ||
} | ||
func ParseOwnerPatchRequestBody_visibility(v string) (any, error) { | ||
result := PUBLIC_OWNERPATCHREQUESTBODY_VISIBILITY | ||
switch v { | ||
case "public": | ||
result = PUBLIC_OWNERPATCHREQUESTBODY_VISIBILITY | ||
case "private": | ||
result = PRIVATE_OWNERPATCHREQUESTBODY_VISIBILITY | ||
default: | ||
return 0, errors.New("Unknown OwnerPatchRequestBody_visibility value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeOwnerPatchRequestBody_visibility(values []OwnerPatchRequestBody_visibility) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i OwnerPatchRequestBody_visibility) isMultiValue() bool { | ||
return false | ||
} |
Oops, something went wrong.