Commit graph

31 commits

Author SHA1 Message Date
Marwan Sulaiman
b9bdef2b00
Add org scoped port forwarding + fix test formatting (#4497)
* Add org scoped port forwarding + fix test formatting

* Redesign port visibility

* Update pkg/cmd/codespace/ports.go

Co-authored-by: Jose Garcia <josebalius@github.com>

* Change sub command to privacy

* Example pr comment

* Fix test mock

* Fix test mock

Co-authored-by: Jose Garcia <josebalius@github.com>
2021-10-13 13:56:03 -04:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
492f45422e Add a note about the style of git tests 2021-02-26 13:07:38 +01:00
Mislav Marohnić
d97e8fe172 Add live tests for some methods in the git package
We relied too much on stubs for these methods. These new tests actually
invoke `git` commands in the context of a test repository.
2021-02-24 15:05:56 +01:00
Mislav Marohnić
06cf2c9f81 Merge remote-tracking branch 'origin' into cmd-stub-new 2021-01-22 16:31:29 +01:00
vilmibm
dcedd32249 use newer command stubbing in tests 2021-01-21 12:32:40 -08:00
Mislav Marohnić
1717c8d083 Migrate to new cmd stubber in git tests 2021-01-18 22:39:59 +01:00
cdce8p
f536901bc1 Only fetch DefaultBranchRef when adding upstream remote during gh repo clone 2020-12-09 20:15:21 +01:00
Martín Montes
2a166d1dd7 Using TrimPrefix for getting current branch and improved tests 2020-09-30 18:26:22 +02:00
Martín Montes
3ef1693881 Using symbolic-ref for getting branch and parsing its output 2020-09-30 13:44:16 +02:00
Martín Montes
0e2e97af68 Using git branch --show-current for getting the current branch. Fallback to symbolic-ref 2020-09-29 22:45:32 +02:00
vilmibm
1831d95433 isolated clone command
This commit hacks the existing repo clone tests into something usable by
the new isolated command. It went ok and was less effort than trying to
introduce the same kind of test format as repo view and gist create.
2020-07-23 16:40:31 -05:00
Mislav Marohnić
ab903bdfc0
Merge pull request #1155 from metalogical/FIX-detached-head
fix regression in support for detached HEAD state
2020-06-24 17:01:22 +02:00
gedenata
8ffd0d59f6 redundant type composite literal 2020-06-12 04:23:51 +08:00
naman
3bb6983b35 fix regression in support for detached HEAD state
for gh pr status
2020-06-10 11:41:44 -07:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures (#738) 2020-04-03 16:33:34 +02:00
vilmibm
ca99096ca8 use CmdError in StubError and fix git_test 2020-03-26 15:32:31 -05:00
vilmibm
897d5c3dca fall back to symbolic-ref in CurrentBranch 2020-03-25 11:57:53 -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
5187ad4431 move preparecmd and Runnable to its own package 2020-03-23 16:32:29 -05:00
vilmibm
a23549001e cleanup 2020-03-13 15:14:32 -05:00
vilmibm
ed8aaa83e3 add CmdStubber 2020-03-13 15:12:09 -05:00
Mislav Marohnić
a710893fc1 Rename to cli/cli 2020-01-24 16:08:52 +01:00
Mislav Marohnić
d7513ef3f6 Fix test assertion when running on Windows 2019-12-16 14:56:44 +01:00
Mislav Marohnić
6aa0c071d6 Simplify tests that use StubExecCommand 2019-11-11 17:04:26 +01:00
nate smith
7555aa9be3 first pass at generalizing process stubbing 2019-10-31 11:29:39 -05:00
nate smith
ee0fe61b04 test nonzero exit code 2019-10-30 17:46:34 -05:00
nate smith
ab115efd89 add cases to test for 2019-10-30 17:06:49 -05:00
nate smith
fdbf85e9ab sigh worthy mechanism for selecting arbitrary git outputs 2019-10-30 16:45:11 -05:00
nate smith
f6afe1b576 use testing hack to mock git call 2019-10-30 16:34:23 -05:00