Mislav Marohnić
988d36deb4
Merge pull request #709 from cli/www-hostname-support
...
Support `www.github.com` git remote URLs
2020-03-30 11:57:52 +02:00
Mislav Marohnić
d4692c3ad9
Merge pull request #707 from cli/stale-check-conclusion
...
Prevent crash when encountering "STALE" check conclusion
2020-03-30 10:29:01 +02:00
vilmibm
eb403a3b1e
more nuanced error typing
2020-03-27 11:35:39 -05:00
Mislav Marohnić
894899c71d
Add code docs for ghrepo package
2020-03-27 14:01:44 +01:00
Mislav Marohnić
303f60815f
Support www.github.com git remote URLs
2020-03-27 14:01:44 +01:00
Mislav Marohnić
c17251d106
Add table-driven test for repoFromURL
2020-03-27 14:01:44 +01:00
Mislav Marohnić
965f2704f3
repo fork: reuse existing git remote
...
Avoid adding a new git remote for a fork if an existing remote is found
that points to the exact forked repo.
2020-03-27 13:30:25 +01:00
Mislav Marohnić
0f98d56649
Rename underscored variable to camelcase
2020-03-27 13:30:25 +01:00
Mislav Marohnić
a6335396cf
repo fork: simplify printing the name of an existing forked repo
2020-03-27 13:30:25 +01:00
Mislav Marohnić
c0bc938ea4
Prevent crash when encountering "STALE" check conclusion
...
The "STALE" conclusion has shipped this January and is basically a
conclusion that can only be reported by GitHub and not explicitly set by
any integrations.
2020-03-27 09:54:11 +01:00
vilmibm
ca99096ca8
use CmdError in StubError and fix git_test
2020-03-26 15:32:31 -05:00
vilmibm
0af232444c
consolidate into one symbolic-ref call
2020-03-26 15:00:58 -05:00
Mislav Marohnić
cba8331d55
Avoid auto-forking/pushing an already pushed branch in pr create
...
A branch is considered already pushed if its HEAD commit hash matches
the commit hash of one of the remote tracking branches:
`refs/remotes/<remote>/<branch>`
This mechanism allows the user to:
- Choose a remote as push target for their branch different than the one
that would automatically get chosen for them by `pr create`;
- Avoid a `git push` operation (and its associated git hooks) if a push
was not necessary in the first place.
2020-03-26 20:35:42 +01:00
Mislav Marohnić
3907914225
Guard against filesystem paths in git.ReadBranchConfig
...
A valid remote specificication read from `branch.<name>.remote` git
config can be a URL, a `.`, a filesystem path, and a remote name. When
detecting the remote name, be sure not to take filesystem paths instead.
2020-03-26 19:23:17 +01:00
Mislav Marohnić
c36b84e550
Convert git.VerifyRef into a more versatile ShowRefs
...
This is so we can pass a list of full qualified refs and have them
resolved for both existence and their commit hashes.
2020-03-26 19:21:40 +01:00
Mislav Marohnić
beb0a6a322
Merge pull request #683 from cli/pr-status-unicode
...
Add unicode to pr status
2020-03-26 13:30:26 +01:00
vilmibm
dd877b6a34
merge fallout
2020-03-25 12:01:44 -05:00
vilmibm
f4b8851011
Merge remote-tracking branch 'origin/master' into pr-status-no-commits
2020-03-25 12:00:58 -05:00
vilmibm
897d5c3dca
fall back to symbolic-ref in CurrentBranch
2020-03-25 11:57:53 -05:00
Nate Smith
e4b8ae0ec4
Merge pull request #665 from cli/preview-default
...
switch {pr,issue} view default
2020-03-25 11:32:46 -05:00
Nate Smith
26022bc684
Merge pull request #690 from cli/repo-view-terminal
...
Add ability to view repo in terminal and do it by default
2020-03-25 11:32:26 -05:00
vilmibm
a8a57595dc
explicitly ignore readme fetching error
2020-03-25 11:26:58 -05:00
Toshiya Doi
7d42f46cda
Merge branch 'master' into view-the-current-state
2020-03-25 22:46:12 +09:00
Mislav Marohnić
88cbcc9ec5
Merge remote-tracking branch 'origin/master' into pr-status-unicode
2020-03-25 09:06:27 +01:00
Mislav Marohnić
11327030e7
Tweak whitespace printing in pr status
2020-03-25 09:05:51 +01:00
Mislav Marohnić
5726376ab1
Guard against faulty affiliations GraphQL filter
...
This API was just fixed in github.com, but it will take a while for the
change to propagate to GitHub Enterprise installs, so guard ourselves
from false positives when querying forks.
2020-03-25 08:26:06 +01:00
Mislav Marohnić
5b2e1847b7
Merge remote-tracking branch 'origin/master' into pr-create-push-default
2020-03-25 08:16:04 +01:00
Mislav Marohnić
bc3f964621
Merge pull request #697 from tariq1890/simple_sort
...
simplify sort string slice method call
2020-03-25 07:34:29 +01:00
Tariq Ibrahim
653229c7b5
simplify sort string slice method call
2020-03-24 22:47:51 -07:00
Amanda Pinsker
7c73cf88ae
Remove formatting from Fprint
...
Co-Authored-By: Mislav Marohnić <mislav@github.com>
2020-03-24 15:01:21 -07:00
vilmibm
379ecdab54
move readme fetching to api package
2020-03-24 15:21:18 -05:00
Nate Smith
f2e5269158
Merge pull request #694 from cli/respect-b
...
respect -B when checking for existing pull requests
2020-03-24 15:14:28 -05:00
Nate Smith
537842f64f
Merge pull request #687 from cli/pr-checkout-repo-override
...
Respect base repository when passing URL argument to `pr checkout/view`
2020-03-24 14:31:38 -05:00
Nate Smith
39839c96da
Merge pull request #688 from cli/spinner-writer
...
Enable tests to capture spinner output
2020-03-24 14:31:11 -05:00
vilmibm
4632ab1a1e
test for CurrentBranch on an empty repo
2020-03-24 14:19:35 -05:00
vilmibm
dd1e2a2dfc
add StubError to CmdStubber
2020-03-24 14:19:35 -05:00
vilmibm
88cf6ce16e
consolidate CmdStubber into test package
2020-03-23 16:36:24 -05:00
vilmibm
5187ad4431
move preparecmd and Runnable to its own package
2020-03-23 16:32:29 -05:00
vilmibm
633ccddb7a
remove unused test helper
2020-03-23 16:30:25 -05:00
vilmibm
121173c330
better error reporting + catch for empty repo
2020-03-23 15:21:58 -05:00
vilmibm
2895252e3b
respect -B when checking for existing pull requests
2020-03-23 14:26:31 -05:00
vilmibm
3459dfab95
add viewing repo in terminal
2020-03-20 16:26:49 -05:00
vilmibm
ff96f48479
add ExpectLines helper
2020-03-20 16:26:49 -05:00
Nate Smith
deb7ee6aa4
Merge pull request #689 from muesli/glamour-bump
...
Bump glamour dependency
2020-03-20 12:26:53 -07:00
Christian Muehlhaeuser
d2fda98e16
Bump glamour dependency
...
This fixes #647 by not retrieving the terminal's background color on init.
2020-03-20 18:51:17 +01:00
Mislav Marohnić
488b47bded
Enable tests to capture spinner output
...
Explicitly assign the writer stream for the progress spinner so that
tests may override it.
The default when not in testing stays the same: the output stream is the
colorable stdout.
2020-03-20 18:18:27 +01:00
Mislav Marohnić
88c060c610
Fix broken pr view test
2020-03-20 18:15:09 +01:00
Mislav Marohnić
9786498a25
Respect base repository when passing URL argument to pr checkout/view
...
Previously, the repository owner+name component of the URL was ignored
and only the pull request number was read. Now, the URL dictates which
base repository will be used.
2020-03-20 18:06:40 +01:00
Mislav Marohnić
e3653672a8
Simplify git.AddRemote implementation
...
The 2nd argument now unused since we've determined that, in practice, we
can safely fetch git objects from a freshly created fork on GitHub and
that we don't need the remote URL-swapping workaround.
2020-03-20 13:08:33 +01:00
Toshiya Doi
0ba0a0757d
Merge branch 'master' into view-the-current-state
2020-03-20 18:16:47 +09:00