Commit graph

183 commits

Author SHA1 Message Date
AliabbasMerchant
84f3d46338 Better example section in issue and pr create 2020-06-14 21:53:56 +05:30
AliabbasMerchant
4749e91c53 Use cobra Example field for issue & PR create examples 2020-06-10 09:55:19 +05:30
AliabbasMerchant
a775562379 Added Examples for Issue and PR Create 2020-06-09 23:42:24 +05:30
AliabbasMerchant
5b9e64b485 Fix incorrect docs in Issue&PR create 2020-05-26 08:00:51 +05:30
dulltz
821324c2fb cosmetic
- Align the first letter to uppercase.
- Align with no period at the end.
2020-05-19 12:03:56 +09:00
vilmibm
c8c807b954 pass apiClient to determineBaseRepo
Our code had an unspoken assumption that only one apiClient is created
during the course of a command. Violating this assumption is fine in
almost all cases, but not when we need to do a re-auth to add a new
oauth scope to a user's token.

There is likely a more elegant solution to the problem but until then
this changes determineBaseRepo to use an existing apiClient.
2020-05-15 15:29:33 -05:00
Mislav Marohnić
1ff37be361 Fix assigning multiple user reviewers
This was due to a typo. Fixes #913
2020-05-13 17:16:12 +02:00
Mislav Marohnić
386a53c34a Fix metadata resolver query 2020-05-12 16:48:30 +02:00
Mislav Marohnić
3abc2be0f7 Switch issue create to optimized resolver and update tests 2020-05-12 16:17:06 +02:00
Mislav Marohnić
00f23b8d86 Store milestones as slice for consistency with other metadata
This is for code simplicity. Only 1 milestone per issue or PR is
allowed, like before.
2020-05-12 15:48:59 +02:00
Mislav Marohnić
1128439cd1 issue/pr create: hide "Add metadata" if viewer does not have triage permission 2020-05-08 18:37:08 +02:00
Mislav Marohnić
d7e6d21766 Order projects, teams, and labels by name 2020-05-08 18:22:14 +02:00
Mislav Marohnić
716036161b Rename titleBody (now a misnomer) to something more descriptive 2020-05-08 17:55:46 +02:00
Mislav Marohnić
72e99e9530 Merge branch 'issue-pr-create-metadata' into issue-pr-create-metadata-wizard 2020-05-08 17:46:47 +02:00
Mislav Marohnić
d0f168f4c3 Merge remote-tracking branch 'origin/master' into issue-pr-create-metadata 2020-05-08 17:46:17 +02:00
Mislav Marohnić
a7242f4ca3
Merge pull request #863 from cli/close-cmd-syntax
Tweak syntax in `issue/pr close` docs
2020-05-07 16:55:13 +02:00
Mislav Marohnić
5913a72532
Merge pull request #819 from rista404/interactive-when-defaults-807
Disable interactive mode for `issue create` if all flags are passed
2020-05-07 16:29:04 +02:00
Nikola Ristic
1f9b7c0fe0
Disable interactive only if both flags are passed
Co-authored-by: Mislav Marohnić <mislav@github.com>
2020-05-05 16:34:31 +02:00
Mislav Marohnić
1834d8cfd5 Tweak syntax in issue/pr close docs
This makes it consistent with other subcommands under `issue/pr`.
2020-05-05 13:32:42 +02:00
Mislav Marohnić
0bf4f16fd5 Merge branch 'issue-pr-create-metadata' into issue-pr-create-metadata-wizard 2020-05-04 17:10:06 +02:00
Mislav Marohnić
b59407dd7d Merge remote-tracking branch 'origin/master' into issue-pr-create-metadata 2020-05-04 17:09:41 +02:00
Corey Johnson
23c072b39d Add api call 2020-04-29 14:14:50 -07:00
Corey Johnson
7df1b992db Add "already open" test 2020-04-29 13:57:53 -07:00
Corey Johnson
abf6d59ee6 Green boi 2020-04-29 13:56:00 -07:00
Corey Johnson
f7162d7591 Implement issue reopen 2020-04-29 12:29:41 -07:00
Corey Johnson
28b35aa333
Merge pull request #843 from cli/when-god-closes-an-issue-he-opens-a-pull-request
Add `gh issue close <urlOrNumber>`
2020-04-29 11:54:48 -07:00
Corey Johnson
ab715638a4 Case changes 2020-04-28 12:51:06 -07:00
Corey Johnson
426c1e3460 Make the checkmark red 2020-04-28 12:50:39 -07:00
Corey Johnson
660cce7790 Take a URL 2020-04-28 12:15:33 -07:00
Corey Johnson
f22f584e8d Handle closed issues 2020-04-28 11:53:25 -07:00
Corey Johnson
7ba6615919 Close test now works
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-04-28 09:51:28 -07:00
Corey Johnson
ad48d8b3c3 Add issue close
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-04-28 09:13:08 -07:00
Mislav Marohnić
aeb08529e7 Add wizard that prompts for issue/pr metadata on create 2020-04-27 18:58:25 +02:00
rista404
76c73db5a0
Disable interactivity if any flag is passed
- Error if title is an empty string
2020-04-25 23:47:07 +02:00
rista404
4b32e3f215
Enable interactive mode only if flags aren't passed 2020-04-25 23:32:14 +02:00
rista404
fab18ed4a9
Show awaiting triage when project col is empty 2020-04-25 22:57:03 +02:00
Mislav Marohnić
a7d061709d Add ability to prefetch granulated repository metadata 2020-04-21 19:14:57 +02:00
Mislav Marohnić
d3a89b8744 Expand issue create metadata flags to pr create
- Includes support `pr create --reviewer <login>`
- Hide "Preview in browser" menu option when any metadata are set
2020-04-17 20:23:57 +02:00
Mislav Marohnić
de59f6a1bf Add flags to add additional metadata to issue create
- `-a, --assignee` (accepts multiple)
- `-l, --label` (accepts multiple)
- `-p, --project` (accepts multiple)
- `-m, --milestone`
2020-04-15 18:28:52 +02:00
Nate Smith
c670049ce7
Merge pull request #745 from doi-t/add-metadata-to-view
Add relevant metadata to issue view in CLI
2020-04-09 16:27:07 -05:00
Toshiya Doi
054ec3c635 Remove Participants related codes 2020-04-10 00:56:45 +09:00
Mislav Marohnić
d1754b2bb0 Improve issue/pr/repo view documentation
- Short-form docs for `pr/repo view` no longer say "in browser"

- Long-form docs for all these commands now list more information about
  what will be displayed in the terminal, plus stressing out the
  alternate behavior with the `--web` flag.

- `--web` flag docs: add English articles
2020-04-08 12:04:39 +02:00
Toshiya Doi
d600709e9e Omit participants metadata from issue view 2020-04-08 13:50:13 +09:00
Toshiya Doi
f14459c451 Clean up unnecessary fmt.Sprintf 2020-04-04 15:11:57 +09:00
Toshiya Doi
13864131c0 Rename issue metadata list functions to avoid naming conflicts with pr 2020-04-04 11:28:52 +09:00
Toshiya Doi
1279131f0f Simplify issue struct avoiding to sue edges 2020-04-04 11:28:52 +09:00
Toshiya Doi
97cad74d75 Add a new line even an issue Body content is empty 2020-04-04 11:28:52 +09:00
Toshiya Doi
bfb3501cf9 Print issue metadata in CLI preview 2020-04-04 11:28:52 +09:00
Mislav Marohnić
e10ccefaf5
Merge pull request #667 from doi-t/view-the-current-state
Show the state (open, closed, merged) in issue view and pr view
2020-04-03 19:41:29 +02:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures (#738) 2020-04-03 16:33:34 +02:00