Commit graph

588 commits

Author SHA1 Message Date
Mislav Marohnić
f09994dd84 Appease linter that warns about redundant type in composite literals 2020-04-13 15:15:41 +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
Mislav Marohnić
d14b5d3e2c
Merge pull request #764 from cli/pr-view-docs
Improve `issue/pr/repo view` documentation
2020-04-09 19:12:34 +02:00
Nate Smith
3c335104c5
Merge pull request #748 from doi-t/add-pr-metadata-to-view
Add relevant metadata to pr view in CLI
2020-04-09 12:12:18 -05:00
Mislav Marohnić
7f9aef6c0d
Merge pull request #761 from cli/completion-fixes
Improve `completion` command
2020-04-09 19:10:36 +02:00
Toshiya Doi
6d0e5bf2b8 Remove Participants related codes for pr view` 2020-04-10 01:02:51 +09:00
Toshiya Doi
054ec3c635 Remove Participants related codes 2020-04-10 00:56:45 +09:00
Toshiya Doi
531bfbc295 Update unit tests for PR metadata 2020-04-08 20:07:19 +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
542314a9c3 Omit participants metadata from pr view 2020-04-08 14:53:23 +09:00
Toshiya Doi
9169c8d0eb Update unit tests for issue metadata 2020-04-08 14:48:08 +09:00
Toshiya Doi
d600709e9e Omit participants metadata from issue view 2020-04-08 13:50:13 +09:00
Mislav Marohnić
2915abc2ba Improve user-friendliness of completion command
When ran directly in the terminal, the command now errors out with:

    $ gh completion
    error: the value for `--shell` is required
    see `gh completion --help` for more information

This is to avoid the previously default bash code output confusing the
user if they ran the command out of curiousity.

A backwards compatibility layer is present here: if stdout is not a
terminal, then output bash code like before. This is to support users
who have already added a line like this to their bash profile:

    eval "$(gh completion)"
2020-04-07 16:58:50 +02:00
Tiernan L
1aba837589
update text to long-form
Change from "repo" to "repository".  Run "gh repo clone -h` to see the usage text I am referring to.

We use the word "repository" here:

Usage:
  gh repo fork [<repository>] [flags]

Usage:
  gh repo view [<repository>] [flags]
2020-04-06 11:27:17 -10:00
Tiernan L
806574f9c1
spell out PR
changes "PR" ---> "pull request" for consistency and clarity
2020-04-06 09:56:45 -10:00
Mislav Marohnić
e878cdf060
Merge pull request #752 from lumaxis/feature/fetch-upstream-after-adding
Fetch upstream remote after adding it

Fixes #731
2020-04-06 19:48:14 +02:00
Lukas Spieß
7e1ed5f9a3
Fetch upstream remote after adding it 2020-04-05 20:54:29 +02:00
Toshiya Doi
f14459c451 Clean up unnecessary fmt.Sprintf 2020-04-04 15:11:57 +09:00
Toshiya Doi
d5bff70259 Clean up unnecessary fmt.Sprintf 2020-04-04 15:09:22 +09:00
Toshiya Doi
85d8f808f2 Test pr metadata in CLI preview 2020-04-04 13:14:34 +09:00
Toshiya Doi
0cb6890c74 Print pr metadata in CLI preview 2020-04-04 13:09:34 +09:00
Toshiya Doi
5a17962188 Add a new line to test a dynamic string of metadata 2020-04-04 12:53:22 +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
8c697a0d99 Test issue metadata in CLI preview 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ć
43b28f769b
Merge pull request #727 from thefotios/respect-clone-target
Respect clone target

Closes #721
2020-04-03 19:18:05 +02:00
Mislav Marohnić
baeb86a401
Merge pull request #734 from cli/golangci-lint
Check code with golangci-lint on push
2020-04-03 17:35:40 +02:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures (#738) 2020-04-03 16:33:34 +02:00
Fotios Lindiakos
6428e3da10
Rename parseExtraArgs 2020-04-03 10:10:46 -04:00
Fotios Lindiakos
199021d55d
Cleanup clone description 2020-04-03 10:10:32 -04:00
Rainer Sigwald
ad7b4b0130
Clarify error in powershell completion test 2020-04-03 07:18:19 -05:00
Toshiya Doi
7eabbf5881 Simplify expected output definitions with new line testing helper 2020-04-03 00:35:48 +09:00
Toshiya Doi
4c2f15fe37 Roll back the place of colorFuncForState 2020-04-02 23:58:28 +09:00
Toshiya Doi
0095fe9a13 Merge branch 'master' into view-the-current-state 2020-04-02 23:52:41 +09:00
Fotios Lindiakos
59f239bddc
Parse args to find an explicit directory name 2020-04-01 16:43:27 -04:00
Fotios Lindiakos
ed62b7bbd5
Consolidate 'git clone' commands 2020-04-01 15:05:18 -04:00
Mislav Marohnić
f0e6c98bf0 Fix auto-forking scenario in pr create
When an existing `headRepo` couldn't be detected, it's time to auto-fork
one. Unfortunately, an obscure Go behavior made it seem like `headRepo`
was a non-nil value, where in fact it did contain a nil pointer which
would crash the process.

This avoids ever assigning nil pointers to `var headRepo ghrepo.Interface`.
2020-04-01 19:37:56 +02:00
Mislav Marohnić
fa3d65b2b6 Add "upstream" remote after repo fork 2020-03-31 18:36:41 +02:00
Mislav Marohnić
0e9b48d876
Merge pull request #719 from cli/upstream-remote
Automatically set up "upstream" remote for forks
2020-03-31 17:10:50 +02:00
Mislav Marohnić
e0ba3fd614
Merge pull request #717 from cli/improve-finding-commits
Use remote tracking branch for base when detecting commits for `pr create`
2020-03-31 17:08:10 +02:00
Mislav Marohnić
8460609181 repo clone: automatically set up "upstream" remote for forks 2020-03-31 15:32:52 +02:00
Mislav Marohnić
219e3ecc5b Stop querying base branch commit hash from API
This code was put in place in preparation for a feature that never
shipped. Namely, we wanted to use the commit hash for the base branch so
we can get an accurate `git log` involving the changes in a pull
request. However, getting the commit hash from API is not the way to go
because the latest commit might not be available in the person's local
repository, and using a local tracking branch for base such as
`origin/master` works quite well in most cases without dereferencing it.
2020-03-31 13:36:48 +02:00
Mislav Marohnić
24a332bb1b Use remote tracking branch for base when detecting commits for pr create
This is to avoid errors when a local base branch is missing or out of
date.
2020-03-31 13:32:44 +02:00
vilmibm
c966f0dca5 test fallout 2020-03-30 12:04:45 -05:00
vilmibm
44acdd4ec3 Merge branch 'master' into pr-status-no-commits 2020-03-30 12:04:02 -05:00
Mislav Marohnić
da2116f8ee Merge remote-tracking branch 'origin/master' into pr-create-push-default 2020-03-30 13:32:37 +02:00
Mislav Marohnić
04324191fe
Merge pull request #704 from cli/branch-push-detection
Avoid auto-forking/pushing an already pushed branch in `pr create`
2020-03-30 13:28:49 +02:00