Commit graph

493 commits

Author SHA1 Message Date
cdce8p
f536901bc1 Only fetch DefaultBranchRef when adding upstream remote during gh repo clone 2020-12-09 20:15:21 +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ć
d6add864b8 Ensure efficient resolving of issue/pr create metadata to GraphQL IDs
For metadata types chosen in interactive flow, we fetch all records from
the API in order to be able to display a multi-select interface.

For metadata defined via command-line flags, we resolve records that can
be looked up directly, avoiding fetching the entirety of expensive
datasets (e.g. all members of an organization) if we can.

The new approach ensures efficient fetching when interactive flow is
combined with values from flags.
2020-12-03 15:53:13 +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
Mislav Marohnić
df2ca9c9f9 Fix browser URL test on Windows 2020-12-01 15:55:40 +01:00
Mislav Marohnić
dc1fad9cb0 Fix respecting chosen action in interactive issue create
The `action` variable started being shadowed in the `if` block in
6671106448
2020-12-01 15:28: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
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
Cristian Dominguez
ab05736b98 don't reset previously added metadata 2020-11-25 13:30:54 -03:00
Cristian Dominguez
ea50666c30 Prompt: avoid resetting PR/issue metadata if no option is selected 2020-11-24 13:49:04 -03: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
1d408eb30d linter appeasement 2020-11-23 11:21:28 -08:00
vilmibm
f68909b7a8 use TempFile though the testing is gross 2020-11-23 11:21:28 -08:00
vilmibm
fffd315a7e fix dumb test 2020-11-23 11:21:28 -08:00
vilmibm
d300526318 preserve and restore issue/pr input on failure 2020-11-23 11:21:28 -08:00
vilmibm
e92cd43259 add IOStreams.ReadUserFile 2020-11-23 11:21:28 -08:00
Josh Soref
ded92972cd spelling: template 2020-11-21 21:43:51 -05:00
Josh Soref
ec82d3c47e spelling: settings 2020-11-21 21:43:51 -05:00
Josh Soref
76bd377253 spelling: error 2020-11-21 21:43:51 -05:00
Josh Soref
861d350440 spelling: dunno 2020-11-21 21:43:51 -05:00
Josh Soref
ddd438d5e1 spelling: dismissed 2020-11-21 21:43:51 -05:00
Josh Soref
e58b2dbe92 spelling: chestnuts 2020-11-21 21:43:51 -05:00
Josh Soref
0e681ca6c4 spelling: beginning 2020-11-21 21:43:46 -05:00
Nate Smith
05a1a25271
match parent repo protocol when forking (#2434)
* match parent repo protocol when forking

* guard against nil and prefer PushURL
2020-11-20 12:00:49 -06:00
Nate Smith
c7eb57d443
respect GH_HOST when resolving remotes (#2301)
* vim to gitignore

* respect GH_HOST in Resolver

* slight restructure, add a test

* grammar fix
2020-11-19 12:59:18 -06:00
Nikola Ristić
e87b5bcaff
Add "reference" help topic (#2223)
* Add "reference" help topic

* Only print reference as a help topic

* fix for color fns, slightly generalize

* WIP for switching to markdown

* escape gt/lt

* minor

* higher wrap point

* detect terminal theme

* futz with angle brackets once more

* minor cleanup

* prepend parent commands

* rename help topic fns and add test

* Simplify reference help generation

- the `<...>` characters from command usage line are now preserved by enclosing the entire usage synopsis in a code span
- hard breaks in flag usage lines are preserved by enclosing flag usage in a code block
- TTY detection and Markdown rendering are now delayed until the user explicitly requests `gh help reference`
- `gh help reference` output is now pager-enabled

Co-authored-by: vilmibm <vilmibm@github.com>
Co-authored-by: vilmibm <vilmibm@neongrid.space>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2020-11-18 12:31:36 -06:00
Jakub Warczarek
b205faa941
Implement --web for gh pr checks (#2146) 2020-11-17 12:27:07 -06:00
vilmibm
00617216b8 fix missing import 2020-11-16 14:03:52 -08:00
Christopher Oswald
0bb44c9ced
Support for --web when using gist create (#2263)
* Support for --web when using gist create

Proposal to close #2071

I have not worked with Go prior to this so please smite me down with the
wisdom of a million Golang gods if I'm doing something terribly wrong.

I also added a test to gist/create for the added web arg.

Pretty much referenced the implementation from pr/create.

* Fix for Tests / build (windows-latest)

I believe this fixes it as it stopped failing on a local vm. Otherwise I
will try and tackle it tomorrow.

* minor cleanup

Co-authored-by: vilmibm <vilmibm@github.com>
2020-11-16 16:01:30 -06:00
Alex Johnson
99574f85a3
Add a command to delete a gist (#2265)
* Add a command to delete a gist

* minor cleanup

Co-authored-by: vilmibm <vilmibm@github.com>
2020-11-16 15:47:55 -06:00
Sam
116d5815b5
Merge pull request #2388 from cli/gh-token
Add support for GH_TOKEN and GH_ENTERPRISE_TOKEN
2020-11-16 08:27:50 +03:00
vilmibm
ef52376fe0 fix survey invocation 2020-11-13 10:35:32 -08:00
Nate Smith
9a20719ec4
Merge pull request #2386 from cli/create-refactor
Refactor pr/issue creation code
2020-11-13 11:37:15 -06:00
Mislav Marohnić
fed4df2afa
Merge pull request #2405 from cristiand391/fix-usage-help
Minor fix in USAGE help info for some commands
2020-11-13 16:13:51 +01:00
Cristian Dominguez
867f38970f Fix USAGE help for some commands 2020-11-13 10:10:53 -03:00
Mislav Marohnić
6a0d38df44
Merge pull request #2404 from alissonbrunosa/fix-repo-view-command-with-branch
Generate correct URL when branch option is passed in
2020-11-13 13:05:56 +01:00
Alisson Santos
62e560d6ee add empty line between functions 2020-11-13 10:24:17 +01:00
Alisson Santos
9ecc902959 Generate correct URL when branch option is passed in 2020-11-13 10:20:30 +01: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
1c280d4341 stop using string pointer 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
boonhong
57ec879aea Fix typos 2020-11-12 22:32:36 +08:00