Commit graph

230 commits

Author SHA1 Message Date
Mislav Marohnić
c8cf54c10c
Merge pull request #1258 from cli/ghe-remotes
Parse and respect non-github.com git remotes
2020-07-15 13:07:30 +02:00
vilmibm
97107661fe review feedback 2020-07-14 12:30:53 -05:00
vilmibm
36ade42ba3 scriptability improvements: issue commands
This commit is part of work to make gh more scriptable. It includes both
some general purpose helpers towards this goal as well as improvements
to the issue commands. Other commands will follow.

- Adds `utils/terminal.go` for finding out about gh's execution environment
- introduces `stubTerminal` for either faking being attached to a tty or not during tests
- updates issue commands to behave better when not attached to a tty:
  - issue list doesn't print fuzzy dates
  - issue list doesn't print header
  - issue list prints state explicitly
  - issue create no longer hangs
  - issue create fails with clear error unless both -t and -b are specified
  - issue view prints raw issue body
  - issue view prints metadata in a consistent, linewise format
2020-07-14 12:30:53 -05:00
Mislav Marohnić
87a9dc8d4b Merge remote-tracking branch 'origin' into ghe-remotes 2020-07-13 13:39:14 +02:00
Sibi
2491e98c41 Title of the PR will be shown while closing, merging and re-opening & test cases updated 2020-07-08 12:22:38 +05:30
Sibi
125547fb7b Show title while closing/reopening issue and meriging PR 2020-07-08 01:25:19 +05:30
ShubhankarKG
37d6be58b8 Fixed gh issue close and gh issue reopen when issue number invalid 2020-07-06 17:57:34 +05:30
Mislav Marohnić
a8c37a1f5c Fix hostname being respected in web browse commands 2020-07-02 20:54:07 +02:00
Mislav Marohnić
a68cefadd9 Merge remote-tracking branch 'origin' into ghe-remotes 2020-07-02 20:37:33 +02:00
Mislav Marohnić
446a4111f7 Respect hostnames when resolving git remotes and URL args to repos 2020-07-02 20:36:10 +02:00
Mislav Marohnić
6cc03d30ed
Merge pull request #1253 from cli/remove-global-repo-flag-for-real-this-time
Remove the global repo flag
2020-07-02 15:45:39 +02:00
Mislav Marohnić
db88ac4155 Declare -R, --repo flag on all issue and pr subcommands 2020-06-30 18:51:53 +02:00
Mislav Marohnić
15126a71c9 Merge remote-tracking branch 'origin' into remove-global-repo-flag-for-real-this-time 2020-06-30 17:39:45 +02:00
Mislav Marohnić
6ac61e90b7 Merge remote-tracking branch 'origin' into add_filters_issues 2020-06-30 14:24:30 +02:00
Mislav Marohnić
757bd05c7a 💅 tweaks for mention/milestone filter 2020-06-30 14:24:01 +02:00
Corey Johnson
dd8cbccbd5 Add repo flag to issue commands 2020-06-22 14:26:41 -04:00
Mislav Marohnić
4662abb312 Merge remote-tracking branch 'origin' into fix-incorrect-docs 2020-06-16 17:08:10 +02:00
Mislav Marohnić
27cce8e3ca Apply the no-args handler to issue/pr status commands 2020-06-16 16:50:34 +02:00
Mislav Marohnić
3fea249d70 💅 tweak issue/pr create examples 2020-06-16 16:43:05 +02:00
Eddú Meléndez
cffd56f717 Rename to mention 2020-06-15 16:08:10 -05:00
Mislav Marohnić
b838ac4014 Improve no args error handler and extend it to other commands 2020-06-15 21:01:32 +02:00
Mislav Marohnić
d583f8b5fa Merge remote-tracking branch 'origin' into issue_list 2020-06-15 20:30:34 +02:00
AliabbasMerchant
84f3d46338 Better example section in issue and pr create 2020-06-14 21:53:56 +05:30
Eddú Meléndez
9aebb66a3c Add milestone filter 2020-06-13 20:53:41 -05:00
Eddú Meléndez
2943703d4a Add mentioned flag 2020-06-13 20:53:03 -05:00
ShubhankarKG
15ec2b748e Refactor code 2020-06-12 12:00:01 +05:30
Mislav Marohnić
73ab5810ea Merge remote-tracking branch 'origin' into doc-examples-tweaks 2020-06-11 20:32:47 +02:00
Mislav Marohnić
0dfc0f733f Fix indentation of Example blocks
In HTML, `Example` blocks seem to be already injected in fenced Markdown
blocks `` ``` ``, so they don't need to be especially intented.
2020-06-11 20:31:37 +02:00
Mislav Marohnić
e6a0c3dc28 Fix EXAMPLES sections of various commands
- Code should be intented per Markdown syntax for a code block. This
  matters when this documentation is rendered to HTML

- Fix some innaccurate usage examples

- Tweak wording, formatting in a few places
2020-06-11 18:47:57 +02:00
Corey Johnson
cde76930a1
Merge pull request #1157 from bvwells/limit
Validate pr and issue limit flag
2020-06-11 09:37:05 -07:00
Ben Wells
a89f45b1ed Validate pr and issue limit flag 2020-06-10 21:42:38 +01:00
Corey Johnson
56f1315d5f Merge remote-tracking branch 'origin/trunk' into h-e-l-p 2020-06-10 09:28:40 -07:00
ShubhankarKG
2ebc5ce514 Added examples and custom error message for space separated issues 2020-06-10 18:40:12 +05:30
Mislav Marohnić
e19ea12265 Merge remote-tracking branch 'origin' into blank-issue 2020-06-10 12:35:33 +02:00
AliabbasMerchant
4749e91c53 Use cobra Example field for issue & PR create examples 2020-06-10 09:55:19 +05:30
Corey Johnson
30d1257096 Update help output 2020-06-09 13:19:00 -07:00
AliabbasMerchant
a775562379 Added Examples for Issue and PR Create 2020-06-09 23:42:24 +05:30
Corey Johnson
8979c0ce41 Update repo 2020-06-09 09:51:18 -07:00
Corey Johnson
a6948423f4 Update issue and pr help 2020-06-09 09:33:22 -07:00
Corey Johnson
0af61bee90 Set core root commands 2020-06-09 08:49:22 -07:00
Nate Smith
bc70c52676
Merge pull request #992 from AliabbasMerchant/issue-query-params
Query Params in Web mode of Issue/PR creation
2020-06-04 14:32:38 -05:00
Mislav Marohnić
2e93a065b1 Merge remote-tracking branch 'origin/master' into api-command 2020-05-27 12:56:06 +02:00
AliabbasMerchant
5b9e64b485 Fix incorrect docs in Issue&PR create 2020-05-26 08:00:51 +05:30
AliabbasMerchant
f95b8916f3 Use url package for setting query params 2020-05-26 07:45:14 +05:30
AliabbasMerchant
42edd42da1 Undo unnecessary renames 2020-05-26 07:10:28 +05:30
AliabbasMerchant
5fc722fbb8 Query Params in Web mode of Issue/PR creation 2020-05-23 14:40:49 +05:30
AliabbasMerchant
4fd051b21d Issue/PR template selection flow mirrors that of GitHub 2020-05-23 00:25:13 +05:30
AliabbasMerchant
864d74d0b1 Categorize Templates as Legacy and NonLegacy 2020-05-23 00:03:38 +05:30
Mislav Marohnić
767521c055 Stop providing AuthLogin from context
The login name of the authenticated user will be readily available only
if authentication info comes from the config file. With other upcoming
authentication modes (for example, the GITHUB_TOKEN environment
variable), the token is the only piece of information we got, so we
would need to additionally query for the login name.

Since `issue status` and `pr status` are the only commands that need the
name of the authenticated user right now, have those commands explicitly
query for the login name. This results in an additional API query, but
simplifies Context implementation and future authentication approaches.
2020-05-20 17:09:13 +02:00
Mislav Marohnić
d8146cd16e Extract cmdutil package 2020-05-20 15:21:31 +02:00