Commit graph

141 commits

Author SHA1 Message Date
Mislav Marohnić
a73880f5dd
Merge pull request #567 from cli/pr-selector-base
Fix detecting PR for current branch pushed to fork
2020-03-03 22:02:21 +01:00
Nate Smith
fdf940eeba
Merge pull request #530 from doi-t/issue-467
Ability to differentiate pull requests by their state
2020-03-02 16:12:55 -06:00
Mislav Marohnić
201217d88a Fix detecting PR for current branch pushed to fork
Now passing base repo as reference to `prSelectorForCurrentBranch()` so
that it doesn't have to (inexactly) determine the base repo itself and
risk it being different than the base repo determined during `pr
status/view`.
2020-03-02 11:35:20 +01:00
Mislav Marohnić
adf2177a24
Merge pull request #474 from politas/fix/StripHash
Handle properly passed #<num> as equivalent to <num> for PRs and Issues
2020-02-27 12:15:00 +01:00
Myk
038e5e5342 Accept #<num> syntax as issue/PR number 2020-02-27 12:11:49 +01:00
Toshiya Doi
5f152a349d Print merged and closed PRs of the current branch along with an opening PR 2020-02-27 00:07:48 +09:00
Toshiya Doi
8b31b283f5 Merge branch 'master' into issue-467 2020-02-26 15:37:32 +09:00
rista404
2a42f61d8d Use gray color for PR number if PR is a draft 2020-02-25 18:47:44 +01:00
Toshiya Doi
957adc1cff Change a PR number's color based on its PR status 2020-02-25 14:33:39 +09:00
Toshiya Doi
28460e4b7e Change a PR state color 2020-02-25 01:26:07 +09:00
Mislav Marohnić
ac94ae5872 Return interface from determineBaseRepo(), not pointer to interface
It's sufficient to return a value of type `ghrepo.Interface` instead of
a pointer to an interface. This avoids having to use `*` whenever we are
passing the result of `determineBaseRepo()` into another function that
accepts a `ghrepo.Interface`.
2020-02-24 13:40:58 +01:00
Toshiya Doi
b965683594 Append a pull request status for the current branch 2020-02-22 16:56:30 +09:00
Mislav Marohnić
4c3e498021 Fix column alignment and truncation for Eastern Asian languages
- Ensure that text is never truncated mid-character, which would result
  in garbled text

- Ensure that columns in `issue/pr list` output align properly
2020-02-20 18:52:17 +01:00
Mislav Marohnić
13dbfa44c2 go fmt 2020-02-20 13:55:55 +01:00
Mislav Marohnić
861b231344 Have --state=closed include merged PRs
Since we currently offer no way of querying PRs by combining multiple
states with an OR, the best way to handle the `closed` state is to match
what the web UI is doing; that is to include merged PRs.
2020-02-20 13:53:44 +01:00
Nate Smith
c65ac4ae9d
Merge branch 'master' into glamour-markdown 2020-02-18 14:23:49 -06:00
Dmitry Sharshakov
b67bb55383 Correct typoes 2020-02-16 17:28:03 +03:00
Anowar Islam
8f9574be35
added fix for empty body in pr preview 2020-02-13 01:43:51 -08:00
vilmibm
135c63aa36 remove --self for now 2020-02-11 20:46:46 -06:00
vilmibm
c93c5f7668 move determineBaseRepo to root 2020-02-11 19:44:49 -06:00
vilmibm
ad170118e4 use resolve remotes code in issue commands 2020-02-11 19:43:02 -06:00
vilmibm
f653dbb6b5 wrap and reuse the resolveToRemotes code from PR commands 2020-02-11 19:33:04 -06:00
Borna Butkovic
f0d8c65194 pr view, status, list parent repo instead of fork 2020-02-11 19:33:04 -06:00
Amanda Pinsker
e61b216b4f
Make approval statuses sentence case 2020-02-10 16:15:02 -08:00
Nicolas Martin
950144945f Use glamour as markdown rendering backend for issue & pr previews
glamour uses the CommonMark compliant Goldmark markdown parser instead of
go-termd which is based on Blackfriday.
2020-02-06 00:20:16 +01:00
vilmibm
36397dbdc5 move checkout to its own file 2020-02-04 13:18:29 -06:00
vilmibm
d7bf83a82c strip color, add whitespace 2020-01-30 14:00:43 -06:00
vilmibm
d81cf009f5 simpler repo context 2020-01-29 17:47:29 -06:00
vilmibm
86cb09fe84 Revert "print repo info for status commands"
This reverts commit d64dcdca95.
2020-01-29 17:41:36 -06:00
vilmibm
d64dcdca95 print repo info for status commands 2020-01-29 15:50:04 -06:00
Mislav Marohnić
a710893fc1 Rename to cli/cli 2020-01-24 16:08:52 +01:00
Mislav Marohnić
c5960f0906 Merge remote-tracking branch 'origin/master' into ghrepo-interface 2020-01-23 16:36:22 +01:00
Nate Smith
55a5d19252 Merge pull request #247 from github/issue-pr-view-docs
Tweak `issue/pr view` documentation
2020-01-23 09:35:38 -06:00
Mislav Marohnić
f58dd04074 Avoid saying "number as argument" for issue/pr view
Since issue URLs, PR URLs, and PR branch names are all accepted as arguments,
avoid explicitly requesting "number" as argument.
2020-01-23 13:09:37 +01:00
Mislav Marohnić
f5ad43458c Avoid using <...> in docs
When converted to HTML docs, these get interpreted as HTML tags.

In theory, we could encapsulate these bits in backticks, but the docs are
already in raw Go string literals, and we can't easily escape backticks in that
context. Instead, just avoid using `<>` for now.
2020-01-23 10:28:29 +01:00
Mislav Marohnić
305410cdee Fix usage synopsis for pr view
Indicate that the argument is optional
2020-01-23 10:28:26 +01:00
Mislav Marohnić
1f90579d2a Extract common interface for a GitHub Repository
Also define a handful of utility methods:
- `New(owner, repo)`
- `FullName`: the name slash owner pair
- `FromFullName`: parse the name slash owner pair
- `FromURL`: parse a GitHub.com URL
- `IsSame(r1, r2)`: compare two repositories
2020-01-22 22:44:46 +01:00
Tiernan L
96edddc874 PR to pull request 2020-01-14 12:33:48 -10:00
Tiernan L
cf44dcd81b removed terminal mention 2020-01-14 11:27:40 -10:00
Tiernan L
2026b8ae0d use long-form reference 2020-01-14 10:34:57 -10:00
vilmibm
5bc6d220c4 review feedback 2020-01-13 15:32:07 -06:00
vilmibm
bbdf30c8f8 add tests for pr/issue previewing in terminal 2020-01-10 15:40:09 -06:00
vilmibm
4925c3cf01 preview PRs and issues in the terminal with -p 2020-01-10 11:41:26 -06:00
Corey Johnson
c9bcf807b1 Make it work with PRs 2020-01-08 12:31:23 -08:00
Corey Johnson
4fcf13dac4 Make it work with PRs 2020-01-08 11:44:27 -08:00
Corey Johnson
8f74b658b2 Merge remote-tracking branch 'origin/master' into appropriate-context-and-feedback 2019-12-20 11:51:37 -08:00
Corey Johnson
b66c34e0ec Output to stderr 2019-12-20 11:16:27 -08:00
Mislav Marohnić
3346e7b8dc Print pr status numbers in green
We use green to signify "open" state of issues & PRs in `list` commands
(as opposed to red for "closed" and purple for "merged" state), so let's
be consistent in `status` commands too, where all displayed items are
guaranteed to be open.
2019-12-19 17:50:44 +01:00
Mislav Marohnić
7b7c985e79 Merge remote-tracking branch 'origin/master' into appropriate-context-and-feedback 2019-12-17 13:00:10 +01:00
Corey Johnson
6d0f4e7a90 Add more text 2019-12-16 11:41:56 -08:00