Cristian Dominguez
8bfe64d593
Accept --body-file flag if --body is supported
2021-03-15 15:12:41 +01:00
Mislav Marohnić
dd34cae112
Merge remote-tracking branch 'origin' into cancel-error-status
2021-03-02 13:52:07 +01:00
Mislav Marohnić
2ebdde1ddd
Exit with status code "2" on user cancellation errors
...
This also stops printing "interrupt" after Ctrl-C is pressed.
2021-03-02 13:48:44 +01:00
Mislav Marohnić
0f85304e3e
Avoid crash in pr merge when verifying whether a PR had diverged
...
A PR is not guaranteed to have commits, it seems, so add a guard against
assuming that there is always a head commit.
2021-02-24 14:37:29 +01:00
Mislav Marohnić
a90997ec95
pr merge: avoid prompting to enter editor after editing phase is chosen
...
When user chooses "Edit commit message", open the editor immediately
instead of showing an additional prompt to open the editor.
2021-02-17 18:47:17 +01:00
Mislav Marohnić
203397baf9
Add tests for pr merge --auto/--disable-auto
2021-02-17 15:24:52 +01:00
Mislav Marohnić
ddddd95d73
Allow pr merge --body '' to prevent having the default body applied
2021-02-17 14:38:33 +01:00
Mislav Marohnić
12cf8ef65b
Separately query viewerMergeBodyText for GHE compatibility
...
GHE versions 2.22 and older will not have this GraphQL field. Avoid the
resulting error and have the command proceeed with empty text as the
default.
2021-02-17 14:06:27 +01:00
Mislav Marohnić
2b36b09abf
Update wording for auto-merge confirmation
...
Co-authored-by: Amanda Pinsker <ampinsk@github.com>
2021-02-17 12:30:04 +01:00
Mislav Marohnić
3b650a8c56
Fix typo
2021-02-16 16:28:23 +01:00
Mislav Marohnić
57abe45b96
Let the server choose the commit subject for squashed merge
...
For single-commit PRs, the commit subject will be the subject of the
head commit and the PR number. For multi-commit PRs, the commit subject
will be the PR title and PR number. Instead of trying to replicate this
logic client-side, omit the `commitHeadline` param and let the server
apply defaults appropriately.
Reverts https://github.com/cli/cli/pull/1627
2021-02-16 16:17:37 +01:00
Mislav Marohnić
67bfedd56b
Add pr merge --auto
2021-02-16 16:01:22 +01:00
Cristian Dominguez
f75bd7280f
Pre-populate default merge commit message if no body was provided
2021-02-16 16:01:22 +01:00
Sam Coe
4ea8d25b85
Fix tests and polish
2021-02-16 15:59:44 +01:00
Cristian Dominguez
d57cb56945
Allow editing commit msg when squash merging a PR
2021-02-16 15:59:06 +01:00
Sam Coe
3f172ad991
Add contional and tests
2021-01-25 13:27:32 -08:00
zamasu
e4b9f7cb8c
Alert unpushed commits when merging a pull request
2021-01-25 12:04:32 -08:00
Mislav Marohnić
f46bab256c
Rename to SuccessIconWithColor
2021-01-25 14:56:39 +01:00
Mislav Marohnić
96fa6e7830
Merge remote-tracking branch 'origin' into success-icon-consistency
2021-01-22 23:56:54 +01:00
Mislav Marohnić
23d68705bc
Match color of the success icon with the end state of the record
2021-01-22 23:55:33 +01:00
Nate Smith
6e2c1b33b0
Merge pull request #2224 from divbhasin/1190-limit-merge-methods
...
#1190 - limit merge methods
2021-01-22 14:23:23 -08:00
Mislav Marohnić
06cf2c9f81
Merge remote-tracking branch 'origin' into cmd-stub-new
2021-01-22 16:31:29 +01:00
Nate Smith
4d28c79192
Merge pull request #2810 from ptxmac/ptx/pr-merge-body
...
Add body argument to `pr merge` command.
2021-01-21 15:25:42 -08:00
vilmibm
6decf4384f
simplify slightly, add tests
2021-01-21 15:18:08 -08:00
Sam Coe
f09b8a8e78
Add mergeMethodSurvey test
2021-01-21 14:58:10 -08:00
Sam Coe
11e873c669
Cleanup impossible code path
2021-01-21 14:45:06 -08:00
Sam Coe
7cc2975a98
Fix tests
2021-01-21 14:42:42 -08:00
Sam Coe
a305ff1488
Split apart interactive merge survey function
2021-01-21 14:00:33 -08:00
Sam Coe
2d782fcb46
Retrieve repo outside of survey function
2021-01-21 13:13:58 -08:00
Sam Coe
71a66cc8d6
Fix merge
2021-01-21 12:53:04 -08:00
Sam Coe
a9123966e3
Merge branch 'trunk' into 1190-limit-merge-methods
2021-01-21 12:45:10 -08:00
Peter Kristensen
bc7f733267
Add body argument to pr merge command.
2021-01-20 13:24:27 +01:00
Mislav Marohnić
fc77cbc964
Deprecate test.ExpectLines
...
For asserting command output, exact string matches are preferred in most cases. In cases when a pattern match is needed, the test can use regexp ad hoc.
2021-01-18 23:25:45 +01:00
Mislav Marohnić
bf4bc1511f
Migrate to new cmd stubber in merge tests
2021-01-18 20:15:40 +01:00
Mislav Marohnić
683ebee6ef
Consistently use green success icon
...
For operations such as closing an issue or merging a PR, we would
display the success icon (a checkmark) in red and magenta colors,
respectively, to reflect the latest state of the record operated on
(red: closed; magenta: merged).
This was always confusing to me, seeing it both in code and in the UI,
because I'm instinctively thinking that it's a bug and have to remind
myself that it's by design.
2021-01-18 19:57:38 +01:00
Mislav Marohnić
6e5a90821c
pr merge: handle case when a cross-repo PR was already merged
...
In this case, do not ever offer to delete the branch.
2021-01-18 19:49:20 +01:00
Mislav Marohnić
66546e2245
When pr merge --delete-branch flag is supplied, avoid prompting for it
2021-01-18 18:10:20 +01:00
Devon Romanko
df31fae9c6
remove prompt for deleting branches on pr merge in interactive mode when -d flag is passed
2021-01-15 17:34:00 -05:00
Devon Romanko
2c35eb04ff
address pr comments
2021-01-15 16:54:46 -05:00
Devon Romanko
85e0e44920
Add prompt to delete local branch when attempting to merge a PR that is already merged
2021-01-15 07:25:24 -05:00
Dylan Strohschein
f853a4b0e2
Allow API request to be made if the PR is in an unknown state
2020-12-09 00:25:21 +00:00
Zach Boyle
1135e5e3ed
set delete-branch merge flag default to false ( #2466 )
...
Co-authored-by: Divya Ramanathan <ramanad@umich.edu>
2020-11-26 11:54:28 +01:00
vilmibm
a2aa154794
port entirely to ColorScheme
2020-10-29 12:37:45 -07:00
div_bhasin
8b0618f45e
refactoring
2020-10-17 16:13:42 -04:00
div_bhasin
5f67ddc975
added to repo struct and working on fetching merge opts for repo
2020-10-17 13:12:26 -04:00
Mislav Marohnić
89529674f9
Restore backwards compatibility in scripted pr merge
2020-10-16 18:27:12 +00:00
Mislav Marohnić
7d317a81be
Merge pull request #1622 from ShubhankarKG/prMergeConfirmations
...
PR Merge confirmations
2020-10-16 20:17:54 +02:00
Ricardo Seriani
6bb2a11d1b
Set default answer to "no" for "deleting branch after merge" question
...
Signed-off-by: Ricardo Seriani <ricardo.seriani@gmail.com>
2020-09-25 13:39:37 -03:00
vilmibm
1073c97409
review feedback
2020-09-11 11:36:24 -05:00
vilmibm
c0fc31f7d5
use CanPrompt in commands
2020-09-10 12:13:48 -05:00