Mislav Marohnić
e96d974331
Merge pull request #3023 from cli/cancel-error-status
...
Issue/pr create: exit with nonzero status code when "Cancel" was chosen
2021-03-04 13:45:11 +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ć
3efa764305
Avoid the issue/pr recovery mechanism handling Ctrl-C keypress in prompts
...
Either InterruptErr or SilentErr will be present when the user has
chosen "Cancel" or pressed Ctrl-C in prompts. We don't want the recovery
mechanism to kick in these cases because the cancellation was likely
willingly initiated by the user.
2021-02-23 20:09:03 +01:00
Mislav Marohnić
fff051468e
Avoid triggering recovery mechanism when cancelling issue/pr create
2021-02-23 19:42:41 +01:00
Mislav Marohnić
b0b90afa87
issue/pr create: exit with nonzero status code when "Cancel" was chosen
...
This is to indicate that the command had not finished successfully.
2021-02-23 17:06:29 +01:00
Mislav Marohnić
fee7adf9ba
Add issue create -F <file> flag and tests
2021-02-23 14:25:32 +01:00
castaneai
13c3c6543b
Add pr create --body-file flag
2021-02-23 12:58:34 +01:00
Mislav Marohnić
83bb1bfd9d
Port pr create to new templates implementation
2021-02-10 18:20:57 +01:00
Mislav Marohnić
47baf8fb10
pr create: explain how to link an issue
2021-02-03 22:17:31 +01:00
AliabbasMerchant
1c54db4919
fix: Project Argument working along with --web flag
2021-01-22 23:07:00 +01:00
Mislav Marohnić
e334a1f10c
Add docs for using @me to reference self
2021-01-22 22:14:47 +01:00
Mislav Marohnić
73da25a96d
Use concrete type instead of an interface to avoid forced casting
2021-01-22 22:05:33 +01:00
Mislav Marohnić
28c2d042e7
Extend @me replacing behavior to issue list
2021-01-22 22:05:33 +01:00
Nate Smith
d25938e223
Merge pull request #2808 from KarelCoudijzer/fork-hang
...
Show progress while creating a new pull request
2021-01-21 14:54:15 -08:00
vilmibm
05d39ebd0d
remove garbling spinner
...
one of the three new spinners produced less than ideal output when a
push happened; the other two do enhance the create experience and i
think we can get away without one for push.
2021-01-21 14:53:19 -08:00
Björn Heinrichs
c9f79271b1
Add --maintainer-edit flag ( #2250 )
...
* Add --maintainer-edit flag
Closes #2213 while retaining backwards compatibility.
* Fix linting
* Adjust documentation and validation
* Negate logic and fix build errors
* rename to no-maintainer-edit
* test
* use a positive option instead of negative
Co-authored-by: vilmibm <vilmibm@github.com>
2021-01-20 14:51:27 -08:00
Karel Coudijzer
a7b9e3916c
Show progress while creating pr
2021-01-19 22:19:10 +01:00
Mislav Marohnić
f4152454f2
Merge pull request #2472 from cristiand391/preserve-metadata-state
...
Prompt: avoid resetting PR/issue metadata
2020-12-03 18:51:29 +01:00
Mislav Marohnić
8db2027c99
Allow interactive pr create even if we failed to look up commits
2020-12-03 18:02:24 +01:00
Mislav Marohnić
be39f4363b
Make MetadataSurvey testable by accepting an interface
2020-12-03 17:47:40 +01:00
Mislav Marohnić
8e1f736775
Merge pull request #2519 from cli/issue-create-browser-fix
...
Fix respecting chosen action in interactive `issue create`
2020-12-02 13:02:16 +01:00
Mislav Marohnić
be759785f0
Fix "Continue in browser" for pr create coming from forks
...
Ensures that the `owner:` prefix is present when referencing the head branch
2020-12-01 21:23:39 +01:00
Max Horstmann
34d549e7b6
Document that reviewers can be teams ( #2465 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2020-11-26 17:31:15 +01:00
vilmibm
cf37ce7463
no shorthand for --recover
2020-11-23 11:24:28 -08:00
vilmibm
d6e84a75fb
switch to recover instead of resubmit
2020-11-23 11:21:34 -08:00
vilmibm
d300526318
preserve and restore issue/pr input on failure
2020-11-23 11:21:28 -08:00
vilmibm
a686455fb6
add Draft to issue state
2020-11-12 12:17:37 -08:00
vilmibm
b231e6c2cf
use NewIssueState
2020-11-12 12:15:48 -08:00
vilmibm
f5277e452e
get everything working
2020-11-12 12:03:32 -08:00
vilmibm
0ed7879329
stop using Defaults struct
2020-11-12 12:03:20 -08:00
vilmibm
6671106448
WIP works, probably some title/body input edge cases
2020-11-12 12:03:20 -08:00
vilmibm
6fde02df1c
use named output param
2020-11-12 12:02:17 -08:00
Nate Smith
24d863eccc
Merge pull request #2316 from cli/colors-1624
...
migrate off of utils color functions
2020-11-03 12:49:02 -06:00
Sam Coe
9acbf8aae4
Refactor regexp writer
2020-11-03 09:59:40 +03:00
Sam Coe
eaa685ac9b
Use custom scanLines function for RegexWriter
2020-11-03 09:59:38 +03:00
Sam Coe
212993632b
Fix up regex to escape dot in URL
2020-11-03 09:59:11 +03:00
Sam Coe
28b3b2c9e7
Address PR comments
2020-11-03 09:59:09 +03:00
vilmibm
a2aa154794
port entirely to ColorScheme
2020-10-29 12:37:45 -07:00
Ian Billett
0f61272333
Allow PullRequestForBranch to search in closed pull requests
2020-10-28 15:50:59 +01:00
Mislav Marohnić
4b395c5dd2
Merge pull request #2234 from XD-DENG/stringsbuilder
...
Use strings.Builder for more efficient string concatenation
2020-10-21 18:22:43 +02:00
Mislav Marohnić
d5cb5574d0
💅 simplify generateCompareURL and test
2020-10-21 12:09:46 +00:00
Leonardo
d0bee19eaf
Query escape branch names to allow branch/#123 names
2020-10-21 12:09:46 +00:00
XD-DENG
7e9f1c7147
Use strings.Builder for more efficient string concatenation
...
It minimizes memory copying.
Reference: https://golang.org/pkg/strings/#Builder
2020-10-19 20:51:51 +02:00
Dimitris Apostolou
6f550b5d12
Fix typos
2020-10-04 22:16:30 +03:00
Harsh Shandilya
0107b00043
Don't override user provided title and body when --fill is used ( #1994 )
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-30 16:15:30 +02:00
Mislav Marohnić
80b60fc6a9
Fix pr create for branches published under a different name
2020-09-24 11:35:02 +02:00
Mislav Marohnić
e2efc0b8a3
Fix pr create when branch was already pushed to a non-base remote
2020-09-23 19:53:27 +02:00
Mislav Marohnić
f99a55438f
Remove issue create examples from pr create
2020-09-16 15:48:13 +02:00
Mislav Marohnić
7a8db80420
Prompt for push target during pr create
...
We no longer guess the head repository using heuristics; instead, we
present the user with the choice of pushable repositories and an
additional option to create a new fork.
The new `pr create --head` flag is available for the user to specify the
head branch in `branch` or `owner:branch` format and completely skip any
forking or auto-pushing checks.
2020-09-16 14:49:36 +02:00
Mislav Marohnić
d534a94d1b
Change how base repository is resolved
...
On first run in a git repository, `BaseRepo()` will now prompt the user
which repository should be queried as base repository if there are
multiple git remotes or when we are in the context of a fork.
In non-interactive mode, the prompt is skipped and we default to the
first git remote instead.
After the base repo is resolved, the result is cached in the local
repository using `git config` so that RepositoryNetwork API lookups can
be avoided in the future.
2020-09-15 21:27:12 +02:00