-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Octokit Bot <octokitbot@martynus.net> Co-authored-by: Keegan Campbell <me@kfcampbell.com>
- Loading branch information
1 parent
610dce6
commit a3d0893
Showing
328 changed files
with
2,665 additions
and
671 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
34 changes: 34 additions & 0 deletions
34
pkg/github/orgs/item/migrations/get_exclude_query_parameter_type.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,34 @@ | ||
package migrations | ||
import ( | ||
"errors" | ||
) | ||
// Allowed values that can be passed to the exclude param. | ||
type GetExcludeQueryParameterType int | ||
|
||
const ( | ||
REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE GetExcludeQueryParameterType = iota | ||
) | ||
|
||
func (i GetExcludeQueryParameterType) String() string { | ||
return []string{"repositories"}[i] | ||
} | ||
func ParseGetExcludeQueryParameterType(v string) (any, error) { | ||
result := REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE | ||
switch v { | ||
case "repositories": | ||
result = REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE | ||
default: | ||
return 0, errors.New("Unknown GetExcludeQueryParameterType value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeGetExcludeQueryParameterType(values []GetExcludeQueryParameterType) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i GetExcludeQueryParameterType) isMultiValue() bool { | ||
return false | ||
} |
34 changes: 34 additions & 0 deletions
34
pkg/github/orgs/item/migrations/item/get_exclude_query_parameter_type.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,34 @@ | ||
package item | ||
import ( | ||
"errors" | ||
) | ||
// Allowed values that can be passed to the exclude param. | ||
type GetExcludeQueryParameterType int | ||
|
||
const ( | ||
REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE GetExcludeQueryParameterType = iota | ||
) | ||
|
||
func (i GetExcludeQueryParameterType) String() string { | ||
return []string{"repositories"}[i] | ||
} | ||
func ParseGetExcludeQueryParameterType(v string) (any, error) { | ||
result := REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE | ||
switch v { | ||
case "repositories": | ||
result = REPOSITORIES_GETEXCLUDEQUERYPARAMETERTYPE | ||
default: | ||
return 0, errors.New("Unknown GetExcludeQueryParameterType value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeGetExcludeQueryParameterType(values []GetExcludeQueryParameterType) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i GetExcludeQueryParameterType) isMultiValue() bool { | ||
return false | ||
} |
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
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/repo_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 RepoPatchRequestBody_merge_commit_message int | ||
|
||
const ( | ||
PR_BODY_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE RepoPatchRequestBody_merge_commit_message = iota | ||
PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
BLANK_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
) | ||
|
||
func (i RepoPatchRequestBody_merge_commit_message) String() string { | ||
return []string{"PR_BODY", "PR_TITLE", "BLANK"}[i] | ||
} | ||
func ParseRepoPatchRequestBody_merge_commit_message(v string) (any, error) { | ||
result := PR_BODY_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
switch v { | ||
case "PR_BODY": | ||
result = PR_BODY_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
case "PR_TITLE": | ||
result = PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
case "BLANK": | ||
result = BLANK_REPOPATCHREQUESTBODY_MERGE_COMMIT_MESSAGE | ||
default: | ||
return 0, errors.New("Unknown RepoPatchRequestBody_merge_commit_message value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeRepoPatchRequestBody_merge_commit_message(values []RepoPatchRequestBody_merge_commit_message) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i RepoPatchRequestBody_merge_commit_message) isMultiValue() bool { | ||
return false | ||
} |
37 changes: 37 additions & 0 deletions
37
pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_merge_commit_title int | ||
|
||
const ( | ||
PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE RepoPatchRequestBody_merge_commit_title = iota | ||
MERGE_MESSAGE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
) | ||
|
||
func (i RepoPatchRequestBody_merge_commit_title) String() string { | ||
return []string{"PR_TITLE", "MERGE_MESSAGE"}[i] | ||
} | ||
func ParseRepoPatchRequestBody_merge_commit_title(v string) (any, error) { | ||
result := PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
switch v { | ||
case "PR_TITLE": | ||
result = PR_TITLE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
case "MERGE_MESSAGE": | ||
result = MERGE_MESSAGE_REPOPATCHREQUESTBODY_MERGE_COMMIT_TITLE | ||
default: | ||
return 0, errors.New("Unknown RepoPatchRequestBody_merge_commit_title value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeRepoPatchRequestBody_merge_commit_title(values []RepoPatchRequestBody_merge_commit_title) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i RepoPatchRequestBody_merge_commit_title) isMultiValue() bool { | ||
return false | ||
} |
40 changes: 40 additions & 0 deletions
40
pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_squash_merge_commit_message int | ||
|
||
const ( | ||
PR_BODY_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE RepoPatchRequestBody_squash_merge_commit_message = iota | ||
COMMIT_MESSAGES_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
BLANK_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
) | ||
|
||
func (i RepoPatchRequestBody_squash_merge_commit_message) String() string { | ||
return []string{"PR_BODY", "COMMIT_MESSAGES", "BLANK"}[i] | ||
} | ||
func ParseRepoPatchRequestBody_squash_merge_commit_message(v string) (any, error) { | ||
result := PR_BODY_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
switch v { | ||
case "PR_BODY": | ||
result = PR_BODY_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
case "COMMIT_MESSAGES": | ||
result = COMMIT_MESSAGES_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
case "BLANK": | ||
result = BLANK_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_MESSAGE | ||
default: | ||
return 0, errors.New("Unknown RepoPatchRequestBody_squash_merge_commit_message value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeRepoPatchRequestBody_squash_merge_commit_message(values []RepoPatchRequestBody_squash_merge_commit_message) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i RepoPatchRequestBody_squash_merge_commit_message) isMultiValue() bool { | ||
return false | ||
} |
37 changes: 37 additions & 0 deletions
37
pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_squash_merge_commit_title int | ||
|
||
const ( | ||
PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE RepoPatchRequestBody_squash_merge_commit_title = iota | ||
COMMIT_OR_PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
) | ||
|
||
func (i RepoPatchRequestBody_squash_merge_commit_title) String() string { | ||
return []string{"PR_TITLE", "COMMIT_OR_PR_TITLE"}[i] | ||
} | ||
func ParseRepoPatchRequestBody_squash_merge_commit_title(v string) (any, error) { | ||
result := PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
switch v { | ||
case "PR_TITLE": | ||
result = PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
case "COMMIT_OR_PR_TITLE": | ||
result = COMMIT_OR_PR_TITLE_REPOPATCHREQUESTBODY_SQUASH_MERGE_COMMIT_TITLE | ||
default: | ||
return 0, errors.New("Unknown RepoPatchRequestBody_squash_merge_commit_title value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeRepoPatchRequestBody_squash_merge_commit_title(values []RepoPatchRequestBody_squash_merge_commit_title) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i RepoPatchRequestBody_squash_merge_commit_title) isMultiValue() bool { | ||
return false | ||
} |
37 changes: 37 additions & 0 deletions
37
pkg/github/repos/item/item/repo_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 RepoPatchRequestBody_visibility int | ||
|
||
const ( | ||
PUBLIC_REPOPATCHREQUESTBODY_VISIBILITY RepoPatchRequestBody_visibility = iota | ||
PRIVATE_REPOPATCHREQUESTBODY_VISIBILITY | ||
) | ||
|
||
func (i RepoPatchRequestBody_visibility) String() string { | ||
return []string{"public", "private"}[i] | ||
} | ||
func ParseRepoPatchRequestBody_visibility(v string) (any, error) { | ||
result := PUBLIC_REPOPATCHREQUESTBODY_VISIBILITY | ||
switch v { | ||
case "public": | ||
result = PUBLIC_REPOPATCHREQUESTBODY_VISIBILITY | ||
case "private": | ||
result = PRIVATE_REPOPATCHREQUESTBODY_VISIBILITY | ||
default: | ||
return 0, errors.New("Unknown RepoPatchRequestBody_visibility value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeRepoPatchRequestBody_visibility(values []RepoPatchRequestBody_visibility) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i RepoPatchRequestBody_visibility) isMultiValue() bool { | ||
return false | ||
} |
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
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
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
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
Oops, something went wrong.