-
Notifications
You must be signed in to change notification settings - Fork 189
New/Set-GitHubRepository: Add Support for Merge Commit Title and Message Options #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
e9ce758
1f3663e
e06ce9d
eb9839d
c39e00b
294e1bc
79be8c3
608a565
476900a
6dc271e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,6 +86,34 @@ filter New-GitHubRepository | |
| By default, rebase-merge pull requests will be allowed. | ||
| Specify this to disallow. | ||
|
|
||
| .PARAMETER SquashMergeCommitTitle | ||
| Specifies the default value for a squash merge commit title. This can be one of the | ||
| following values: | ||
| - 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). | ||
|
|
||
| .PARAMETER SquashMergeCommitMessage | ||
| Specifies the default vaule for a squash merge commit message. This can be one of the | ||
| following values: | ||
| - 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. | ||
|
|
||
| .PARAMETER MergeCommitTitle | ||
| Specifies the default value for a merge commit title. This can be one of the | ||
| following values: | ||
| - 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). | ||
|
|
||
| .PARAMETER MergeCommitMessage | ||
| Specifies the default vaule for a merge commit message. This can be one of the | ||
| following values: | ||
| - 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. | ||
|
|
||
| .PARAMETER DeleteBranchOnMerge | ||
| Specifies the automatic deleting of head branches when pull requests are merged. | ||
|
|
||
|
|
@@ -165,6 +193,18 @@ filter New-GitHubRepository | |
|
|
||
| [switch] $DisallowRebaseMerge, | ||
|
|
||
| [ValidateSet('PR_TITLE', 'COMMIT_OR_PR_TITLE')] | ||
|
||
| [string] $SquashMergeCommitTitle, | ||
|
|
||
| [ValidateSet('PR_BODY', 'COMMIT_MESSAGES', 'BLANK')] | ||
| [string] $SquashMergeCommitMessage, | ||
|
|
||
| [ValidateSet('PR_TITLE', 'MERGE_MESSAGE')] | ||
| [string] $MergeCommitTitle, | ||
|
|
||
| [ValidateSet('PR_TITLE', 'PR_BODY', 'BLANK')] | ||
| [string] $MergeCommitMessage, | ||
|
|
||
| [switch] $DeleteBranchOnMerge, | ||
|
|
||
| [switch] $IsTemplate, | ||
|
|
@@ -211,6 +251,10 @@ filter New-GitHubRepository | |
| if ($PSBoundParameters.ContainsKey('DisallowSquashMerge')) { $hashBody['allow_squash_merge'] = (-not $DisallowSquashMerge.ToBool()) } | ||
| if ($PSBoundParameters.ContainsKey('DisallowMergeCommit')) { $hashBody['allow_merge_commit'] = (-not $DisallowMergeCommit.ToBool()) } | ||
| if ($PSBoundParameters.ContainsKey('DisallowRebaseMerge')) { $hashBody['allow_rebase_merge'] = (-not $DisallowRebaseMerge.ToBool()) } | ||
| if ($PSBoundParameters.ContainsKey('SquashMergeCommitTitle')) { $hashBody['squash_merge_commit_title'] = $SquashMergeCommitTitle } | ||
| if ($PSBoundParameters.ContainsKey('SquashMergeCommitMessage')) { $hashBody['squash_merge_commit_message'] = $SquashMergeCommitMessage } | ||
| if ($PSBoundParameters.ContainsKey('MergeCommitTitle')) { $hashBody['merge_commit_title'] = $MergeCommitTitle } | ||
| if ($PSBoundParameters.ContainsKey('MergeCommitMessage')) { $hashBody['merge_commit_message'] = $MergeCommitMessage } | ||
| if ($PSBoundParameters.ContainsKey('DeleteBranchOnMerge')) { $hashBody['delete_branch_on_merge'] = $DeleteBranchOnMerge.ToBool() } | ||
| if ($PSBoundParameters.ContainsKey('IsTemplate')) { $hashBody['is_template'] = $IsTemplate.ToBool() } | ||
|
|
||
|
|
@@ -1066,6 +1110,34 @@ filter Set-GitHubRepository | |
| By default, rebase-merge pull requests will be allowed. | ||
| Specify this to disallow. | ||
|
|
||
| .PARAMETER SquashMergeCommitTitle | ||
| Specifies the default value for a squash merge commit title. This can be one of the | ||
| following values: | ||
| - 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). | ||
|
|
||
| .PARAMETER SquashMergeCommitMessage | ||
| Specifies the default vaule for a squash merge commit message. This can be one of the | ||
X-Guardian marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| following values: | ||
| - 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. | ||
|
|
||
| .PARAMETER MergeCommitTitle | ||
| Specifies the default value for a merge commit title. This can be one of the | ||
| following values: | ||
| - 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). | ||
|
|
||
| .PARAMETER MergeCommitMessage | ||
| Specifies the default vaule for a merge commit message. This can be one of the | ||
| following values: | ||
| - 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. | ||
|
|
||
| .PARAMETER DeleteBranchOnMerge | ||
| Specifies the automatic deleting of head branches when pull requests are merged. | ||
|
|
||
|
|
@@ -1170,6 +1242,18 @@ filter Set-GitHubRepository | |
|
|
||
| [switch] $DisallowRebaseMerge, | ||
|
|
||
| [ValidateSet('PR_TITLE', 'COMMIT_OR_PR_TITLE')] | ||
| [string] $SquashMergeCommitTitle, | ||
|
|
||
| [ValidateSet('PR_BODY', 'COMMIT_MESSAGES', 'BLANK')] | ||
| [string] $SquashMergeCommitMessage, | ||
|
|
||
| [ValidateSet('PR_TITLE', 'MERGE_MESSAGE')] | ||
| [string] $MergeCommitTitle, | ||
|
|
||
| [ValidateSet('PR_TITLE', 'PR_BODY', 'BLANK')] | ||
| [string] $MergeCommitMessage, | ||
|
|
||
| [switch] $DeleteBranchOnMerge, | ||
|
|
||
| [switch] $IsTemplate, | ||
|
|
@@ -1215,6 +1299,10 @@ filter Set-GitHubRepository | |
| if ($PSBoundParameters.ContainsKey('DisallowSquashMerge')) { $hashBody['allow_squash_merge'] = (-not $DisallowSquashMerge.ToBool()) } | ||
| if ($PSBoundParameters.ContainsKey('DisallowMergeCommit')) { $hashBody['allow_merge_commit'] = (-not $DisallowMergeCommit.ToBool()) } | ||
| if ($PSBoundParameters.ContainsKey('DisallowRebaseMerge')) { $hashBody['allow_rebase_merge'] = (-not $DisallowRebaseMerge.ToBool()) } | ||
| if ($PSBoundParameters.ContainsKey('SquashMergeCommitTitle')) { $hashBody['squash_merge_commit_title'] = $SquashMergeCommitTitle } | ||
| if ($PSBoundParameters.ContainsKey('SquashMergeCommitMessage')) { $hashBody['squash_merge_commit_message'] = $SquashMergeCommitMessage } | ||
| if ($PSBoundParameters.ContainsKey('MergeCommitTitle')) { $hashBody['merge_commit_title'] = $MergeCommitTitle } | ||
| if ($PSBoundParameters.ContainsKey('MergeCommitMessage')) { $hashBody['merge_commit_message'] = $MergeCommitMessage } | ||
| if ($PSBoundParameters.ContainsKey('DeleteBranchOnMerge')) { $hashBody['delete_branch_on_merge'] = $DeleteBranchOnMerge.ToBool() } | ||
| if ($PSBoundParameters.ContainsKey('IsTemplate')) { $hashBody['is_template'] = $IsTemplate.ToBool() } | ||
| if ($PSBoundParameters.ContainsKey('Archived')) { $hashBody['archived'] = $Archived.ToBool() } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.