Sam Coe
98ab1f2587
Authenticate network git commands ( #6541 )
2022-11-15 13:14:37 +02:00
Sam Coe
6bbfc5056d
Use git client in extension manager ( #6547 )
2022-11-10 11:38:12 +02:00
Sam Coe
f96b2fce57
Refactor git client and add tests ( #6525 )
2022-11-03 11:58:38 +01:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 ( #6474 )
2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression ( #6472 )
...
* Revert "Refactor to use new git client (#6447 )"
This reverts commit 57fbe4f317 .
* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client ( #6447 )
2022-10-19 21:11:36 +03:00
tdakkota
d41efa7a6a
Fix #6452 ( #6453 )
2022-10-18 06:36:52 +00:00
Sam Coe
2944f7c3ab
Create git client ( #6354 )
2022-10-14 07:47:03 +00:00
Eng Zer Jun
471cbea4fa
test: use t.Setenv to set env vars in tests ( #6333 )
...
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
Mislav Marohnić
6ca9406554
pr create: allow git push step to prompt on stdin
2022-09-21 20:57:53 +02:00
Sam Coe
743a747804
Use go-gh for SSH hostname alias translation ( #5654 )
2022-06-08 21:32:29 +00:00
Ahmed Adan
31bee2e639
Add --upstream-remote-name flag to gh replo clone ( #5619 )
2022-05-24 13:12:01 +02:00
Boston Cartwright
bb9bf29835
pr merge switch to base branch if available ( #5251 )
...
* after merge, switch to base branch if available
* Add ability to checkout new branch
* Style cleanup
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-03-14 14:02:57 +02:00
Mislav Marohnić
c240ab9137
Unconditionally resolve "ssh.github.com" to "github.com"
...
Previously, only "github.com" mapped to "ssh.github.com" via ssh config
was treated as "github.com". Now, any "ssh.github.com" host is treated
as "github.com", even if it was initially aliased as something else in
the user's ssh hostname mappings.
2021-12-20 16:09:46 +01:00
Parth
c987c5711d
pr merge: pull after switching branches ( #4748 )
2021-11-29 18:26:35 +01:00
Nate Smith
b5d90e1204
Merge pull request #4588 from cli/bin-ext-migrate
...
binary extension migration
2021-11-17 13:22:28 -06:00
Meijke
0a0a358168
rewrite gh repo create ( #4578 )
...
Co-authored-by: Parth Patel <ppatil91099@gmail.com>
2021-11-17 20:16:37 +01:00
nate smith
54b82dd072
Migrate to binary style extensions when detected
2021-11-17 13:15:04 -06:00
Parth Patel
8e72d48e72
Merge branch 'trunk' into repo-rename
2021-10-20 16:16:31 -04:00
Parth Patel
dd87e80b4c
added final touches
2021-10-20 16:12:32 -04:00
Parth Patel
ddd0b7cb04
added remote update
2021-10-18 16:43:40 -04:00
nate smith
4996ba2ba4
Merge remote-tracking branch 'origin/trunk' into relative-path
2021-10-14 12:24:27 -05:00
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
Dan Burzo
9f43967042
Fixes #4346 : allow git+https URL protocol
2021-09-20 19:35:06 +03:00
Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00
Mislav Marohnić
21521b06b9
Check git presence during auth login only if it's going to be needed
2021-08-11 19:22:16 +02:00
bchadwic
8469441464
new functionality: current folder './', parent folder '../', absolute 'filename'
2021-07-25 23:53:27 -07:00
bchadwic
b3a24d273b
cleaned up git.go, browse_test.go, and browse.go
2021-07-16 00:07:04 -07:00
bchadwic
25a35a6e88
added relative path access in gh browse
2021-07-15 23:38:54 -07: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ć
0f85304e3e
Avoid crash in pr merge when verifying whether a PR had diverged
...
A PR is not guaranteed to have commits, it seems, so add a guard against
assuming that there is always a head commit.
2021-02-24 14:37:29 +01:00
Sam Coe
3f172ad991
Add contional and tests
2021-01-25 13:27:32 -08:00
zamasu
e4b9f7cb8c
Alert unpushed commits when merging a pull request
2021-01-25 12:04:32 -08:00
Mislav Marohnić
64fda21116
Avoid ever invoking go-homedir when config was found in a new location
2021-01-22 20:22:32 +01:00
Matthew Gleich
7d9461b819
♻️ Refactor to use os.UserHomeDir()
2021-01-22 18:51:28 +01:00
Mislav Marohnić
06cf2c9f81
Merge remote-tracking branch 'origin' into cmd-stub-new
2021-01-22 16:31:29 +01:00
Nate Smith
29805a4003
Merge pull request #2588 from cdce8p/gh-clone-fetch
...
Only fetch default branch when adding upstream remote
2021-01-21 12:57:10 -08:00
vilmibm
dcedd32249
use newer command stubbing in tests
2021-01-21 12:32:40 -08:00
Cristian Dominguez
45f4a1f087
Equal: flip arguments position
2021-01-18 21:00:59 -03:00
Mislav Marohnić
1717c8d083
Migrate to new cmd stubber in git tests
2021-01-18 22:39:59 +01:00
Cristian Dominguez
3afb1d0b1a
Use Testify assertions in test
2021-01-16 19:19:30 -03:00
Mislav Marohnić
935f6444ae
Refactor ssh parser for format compatibility & testability
...
- Per ssh_config(5), keywords and arguments may be separated by an `=`
sign as well as whitespace.
- When following the `Include` directive, skip directories that were
returned as the result of globbing.
- Respect the `Host` context when recursing into `Include`s
- Avoid having tests read from the actual filesystem.
- Avoid repeatedly looking up the home directory.
2020-12-15 15:59:18 +01:00
Alisson Santos
dc8698ee46
Make ssh parser to parse included config files
2020-12-15 15:37:17 +01:00
cdce8p
f536901bc1
Only fetch DefaultBranchRef when adding upstream remote during gh repo clone
2020-12-09 20:15:21 +01:00
Josh Soref
c8b9486fd3
spelling: nonexistent
2020-11-21 21:43:51 -05:00
Mislav Marohnić
38f68d849f
Improve error message when git isn't found
2020-11-11 16:33:13 +01:00
Mislav Marohnić
5b4a08dcb9
Ensure that only PATH is searched when shelling out to external commands
...
Works around https://github.com/golang/go/issues/38736 for Windows.
2020-11-11 16:33:13 +01:00
Sam Coe
28b3b2c9e7
Address PR comments
2020-11-03 09:59:09 +03:00
Sam Coe
97504f4f1f
Filter out unwanted stderr output during git push commands
2020-11-03 09:58:29 +03:00