Commit graph

85 commits

Author SHA1 Message Date
Sam Coe
9acbf8aae4
Refactor regexp writer 2020-11-03 09:59:40 +03:00
Sam Coe
bf46b870cb
Add multiple writes test 2020-11-03 09:59:39 +03:00
Sam Coe
eaa685ac9b
Use custom scanLines function for RegexWriter 2020-11-03 09:59:38 +03:00
Sam Coe
212993632b
Fix up regex to escape dot in URL 2020-11-03 09:59:11 +03:00
Sam Coe
28b3b2c9e7
Address PR comments 2020-11-03 09:59:09 +03:00
Mislav Marohnić
e093d23521
Merge pull request #2276 from ianbillett/view-closed-prs
Allow `gh pr view <closed_pr_branch_name>` to view closed PRs
2020-10-28 17:50:10 +01:00
Mislav Marohnić
2ac68cc534 PullRequestForBranch: fix outdated error message
This method doesn't necessarily search through open pull requests.
2020-10-28 15:50:59 +01:00
Ian Billett
0f61272333 Allow PullRequestForBranch to search in closed pull requests 2020-10-28 15:50:59 +01:00
Mislav Marohnić
e74e4310bb
Merge pull request #2208 from cli/merge-confirmation-fixup
Restore backwards compatibility in scripted `pr merge`
2020-10-27 13:25:18 +01:00
Mislav Marohnić
4b395c5dd2
Merge pull request #2234 from XD-DENG/stringsbuilder
Use strings.Builder for more efficient string concatenation
2020-10-21 18:22:43 +02:00
Mislav Marohnić
d5cb5574d0 💅 simplify generateCompareURL and test 2020-10-21 12:09:46 +00:00
Leonardo
d0bee19eaf Query escape branch names to allow branch/#123 names 2020-10-21 12:09:46 +00:00
XD-DENG
7e9f1c7147 Use strings.Builder for more efficient string concatenation
It minimizes memory copying.

Reference: https://golang.org/pkg/strings/#Builder
2020-10-19 20:51:51 +02:00
Mislav Marohnić
89529674f9 Restore backwards compatibility in scripted pr merge 2020-10-16 18:27:12 +00:00
Mislav Marohnić
7d317a81be
Merge pull request #1622 from ShubhankarKG/prMergeConfirmations
PR Merge confirmations
2020-10-16 20:17:54 +02:00
Pushpamk
581783176a deleted comment 2020-10-08 20:34:10 +05:30
Pushpamk
f8a49ca624 updated reference comment 2020-10-08 16:04:28 +05:30
Pushpamk
40a0b0d511 updated new github doc. link 2020-10-08 00:55:44 +05:30
Dimitris Apostolou
6f550b5d12
Fix typos 2020-10-04 22:16:30 +03:00
Harsh Shandilya
0107b00043
Don't override user provided title and body when --fill is used (#1994)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-30 16:15:30 +02:00
Nate Smith
aa72881baa
Merge pull request #1962 from ricardoseriani/change-default-answer-after-delete-branch
Set default answer to "no" for "deleting branch after merge" question
2020-09-29 11:29:41 -05:00
Pranjal Mittal
3a9b9de940
Modification of help text for usage of gh pr checks (#1915) 2020-09-29 11:25:02 +02:00
Mislav Marohnić
c11ff0005a
Merge pull request #1926 from cli/pr-create-branch-pushed-fix
Fix `pr create` when branch was already pushed to a non-base remote
2020-09-28 19:12:38 +02:00
Ricardo Seriani
6bb2a11d1b
Set default answer to "no" for "deleting branch after merge" question
Signed-off-by: Ricardo Seriani <ricardo.seriani@gmail.com>
2020-09-25 13:39:37 -03:00
Sam Coe
f0d4fbf84f
Address PR comments around style and naming 2020-09-24 19:27:29 +02:00
Sam Coe
ed4075517c
Check for terminal background color before starting pager 2020-09-24 13:06:28 +02:00
Mislav Marohnić
80b60fc6a9 Fix pr create for branches published under a different name 2020-09-24 11:35:02 +02:00
Mislav Marohnić
e2efc0b8a3 Fix pr create when branch was already pushed to a non-base remote 2020-09-23 19:53:27 +02:00
Martín Montes
bb1005be51 Fixed gh pr checkout on detached HEAD 2020-09-22 00:25:49 +02:00
Mislav Marohnić
b2e36a0979
Merge pull request #1706 from cli/base-resolve
Improve repository base and head resolution
2020-09-16 18:53:21 +02:00
Mislav Marohnić
f99a55438f Remove issue create examples from pr create 2020-09-16 15:48:13 +02:00
Mislav Marohnić
f9239661f2 Reuse the StubRepoInfoReponse test helper 2020-09-16 15:01:13 +02:00
Mislav Marohnić
7a8db80420 Prompt for push target during pr create
We no longer guess the head repository using heuristics; instead, we
present the user with the choice of pushable repositories and an
additional option to create a new fork.

The new `pr create --head` flag is available for the user to specify the
head branch in `branch` or `owner:branch` format and completely skip any
forking or auto-pushing checks.
2020-09-16 14:49:36 +02:00
Mislav Marohnić
d534a94d1b Change how base repository is resolved
On first run in a git repository, `BaseRepo()` will now prompt the user
which repository should be queried as base repository if there are
multiple git remotes or when we are in the context of a fork.

In non-interactive mode, the prompt is skipped and we default to the
first git remote instead.

After the base repo is resolved, the result is cached in the local
repository using `git config` so that RepositoryNetwork API lookups can
be avoided in the future.
2020-09-15 21:27:12 +02:00
Mislav Marohnić
6ad6784c46 Ignore EPIPE when forwarding pr diff output to pager 2020-09-14 15:30:10 +02:00
Mislav Marohnić
b2e7f0c1e2 Merge remote-tracking branch 'origin' into pager-for-everyone 2020-09-14 14:18:42 +02:00
vilmibm
1073c97409 review feedback 2020-09-11 11:36:24 -05:00
vilmibm
c0fc31f7d5 use CanPrompt in commands 2020-09-10 12:13:48 -05:00
Nate Smith
33e11f02e4
Merge pull request #1611 from dhleong/dhleong/pr-prepend-commit-bodies
Prepend PR body defaults to the selected template (if any)
2020-09-09 16:57:27 -05:00
Mislav Marohnić
9040f6adc6 Fix view tests 2020-09-09 17:40:04 +02:00
Mislav Marohnić
fda9659e4a Consistently print browsed URL across commands 2020-09-09 17:02:02 +02:00
Daniel Leong
c7e702203b Update template test to reflect inclusion of "default" text
Also, avoid excessive amounts of newlines separating the two
2020-09-08 20:25:52 -04:00
Daniel Leong
41543b564d "Check" the error value of ioutil.WriteFile
We could, alternatively, use t.Fatal... this matches the MkdirAll
invocation from github_template_test, however...
2020-09-08 20:12:28 -04:00
Daniel Leong
a33124414c Add a test to verify the behavior of prepending commit body to message 2020-09-08 20:12:28 -04:00
Daniel Leong
c4227455e3 Prepend PR body defaults to the selected template (if any)
See #1570
2020-09-08 20:12:28 -04:00
Nate Smith
74614b13da
Merge pull request #1627 from giacomoalbe/add-commit-headline-to-pr-merge
Add PR Title to CommitHeadline during merge PR
2020-09-08 17:05:26 -05:00
Nate Smith
c2d7cbf51f
Merge pull request #1582 from AliabbasMerchant/interactiveCreationTests
Interactive template selection test for issue create
2020-09-08 16:55:04 -05:00
Mislav Marohnić
d77a8c2e61 Scope pr merge commit headline to only squash method 2020-09-07 22:27:27 +02:00
Mislav Marohnić
ccfe38de26 Add PAGER support to commands that produce significant output 2020-09-04 23:36:14 +02:00
Mislav Marohnić
d01355e24b Add global PAGER support
Extract the ad-hoc PAGER behavior from `pr diff` command and make it
available opt-in to any command through IOStreams.
2020-09-04 23:07:17 +02:00