Commit graph

5685 commits

Author SHA1 Message Date
Yuki Osaki
e804053777 change unit 32 to unit 64 2021-06-25 14:32:45 +09:00
Sam Coe
5481b2b5e6
Move dirty repo check before any network calls 2021-06-24 09:08:36 -07:00
Sam Coe
8219710551
Address PR comments 2021-06-23 14:20:14 -07:00
Sam Coe
0e838052a4
Rewrite tests with new mocks 2021-06-23 12:01:58 -07:00
Gowtham Munukutla
5c7da584e5 clone remote repo after creating with gitignore and license 2021-06-23 10:21:28 +05:30
Gowtham Munukutla
9ecbdb26c5 Merge branch 'trunk' of https://github.com/cli/cli into feature/repo-with-gitignore-license 2021-06-23 09:28:20 +05:30
Nate Smith
640a089e55
Merge pull request #3850 from chemotaxis/fix-actions-help
Print help even if logged out
2021-06-22 14:24:06 -07:00
Nate Smith
654336fe64
Merge pull request #3871 from jonlorusso/trunk
Update documentation for gist create command with default of secret
2021-06-22 14:20:02 -07:00
Sam Coe
4ed2bfc4a0
Revert "Add counterfeiter"
This reverts commit 096f30a319.
2021-06-22 13:55:30 -07:00
Sam Coe
1302b71fa7
linter 2021-06-22 11:41:22 -07:00
Sam Coe
e0468dbb29
whitespace 2021-06-22 11:39:47 -07:00
Sam Coe
665f552def
Small reordering 2021-06-22 11:37:56 -07:00
Jon Lorusso
22235c2f97
Update documentation for gist create command to reflect default of secret. 2021-06-21 11:25:49 -04:00
Mislav Marohnić
42efc3f25a Fix test cleanup on Windows 2021-06-21 17:22:17 +02:00
Mislav Marohnić
f99191ea6f Enable setting an alias for an extension command 2021-06-21 16:54:08 +02:00
Mislav Marohnić
1ec47d8191 Improvements to gh extensions
- Extensions on Windows now enabled through the `sh.exe` interpreter
- `sh.exe` now found on Windows when git was installed via scoop
- `gh extensions list` command shows origin repo for the extension
- `gh extensions upgrade --all` is required to upgrade all extensions
- Added `gh extensions remove`
- Shell completions now include aliases and extension names
- `gh` help output now lists available extension names
- Extensions are stored to XDG_DATA_HOME
2021-06-21 16:54:08 +02:00
autopp
0179651dc3
Add shell completion for the --state flag 2021-06-20 20:03:21 +09:00
Cristian Dominguez
6115868343 Suggest to enable auto-merge when PR merge state is BLOCKED 2021-06-19 11:46:17 -03:00
Cristian Dominguez
498f15653e Simplify auto-merge detection 2021-06-19 01:40:28 -03:00
chemotaxis
b0f58d0cf0 Disable authentication check, but keep runnable
In this branch, we originally avoided the authentication check by
getting rid of the run method attached to the command.  Instead of that,
this commit makes the `gh actions` command runnable again, but the
authentication is disabled with `cmdutil.DisableAuthCheck`; this mirrors
what's done for `gh version`.

`gh actions` and `gh actions [-h | --help]` all work while being logged
out.

In addition, this commit restores some original behavior.  Before this
commit, the help footer (usage, inherited flags, etc.) is appended
whether you use `gh actions` or `gh actions --help`.  This commit
restores the original behavior where `gh actions` prints just the text
for the actions explanation, but `gh actions --help` appends the help
footer.
2021-06-18 23:43:42 -04:00
chemotaxis
1c103e20ac Always try to render bold font
It looks like a similar check is done in ColorScheme.Bold() where it
checks whether the scheme is enabled or not.
2021-06-18 23:07:31 -04:00
Mislav Marohnić
052d6588ea Revert "Whitespace"
Trailing whitespace is significant in Markdown.

This reverts commit 682c15d52c.
2021-06-18 15:16:48 +02:00
chemotaxis
89ce78e48b Restore help footer
At the moment, the "help footer" doesn't add any new information, but if
additional flags are added later, they should appear in the footer. This
change restores this help footer:

```shell
USAGE
  gh actions [flags]

INHERITED FLAGS
  --help   Show help for command

LEARN MORE
  Use 'gh <command> <subcommand> --help' for more information about a command.
  Read the manual at https://cli.github.com/manual
```
2021-06-17 13:30:26 -04:00
chemotaxis
682c15d52c Whitespace 2021-06-17 12:58:37 -04:00
Mislav Marohnić
4b2cded1f8 Ensure that tests for command factory never read from user's config
If these tests are going to exerise `factory.New()`, the config getter
should always be overriden since the default config getter reads from
`~/.config/gh` and thus makes tests dependent on the user's environment.
2021-06-17 17:59:34 +02:00
Mislav Marohnić
8ff42bf28c Fix repo override 2021-06-17 17:58:46 +02:00
Mislav Marohnić
8dd1e12f64 Merge remote-tracking branch 'origin' into fix-actions-help 2021-06-17 16:13:34 +02:00
Mislav Marohnić
94c1646209 Simplify gh actions implemenation
The command is now non-runnable, meaning it's exempt from auth check.
2021-06-17 16:02:00 +02:00
Mislav Marohnić
883943946a Add a global pre-run hook to handle auth check and repo override
With auth check being done via Cobra hooks, it is automatically skipped
for non-runnable commands and `-h/--help` flag usage.
2021-06-17 16:01:57 +02:00
Gowtham Munukutla
a44a3c8fd0 remove redundant logs 2021-06-17 10:41:24 +05:30
Gowtham Munukutla
137053399e tweak tests and add extra validations 2021-06-17 10:17:26 +05:30
jlsestak
93118c65df
Merge pull request #52 from bchadwic/trunk
Update browse.go removed trailing newlines on errors
2021-06-16 20:53:06 -07:00
jlsestak
876b61af7b
Update browse.go 2021-06-16 20:50:08 -07:00
jlsestak
203d41c37b
Merge branch 'cli:trunk' into first-browse-pull 2021-06-16 20:37:34 -07:00
Gowtham Munukutla
3c8e163e8b resolve PR comments. Tests WIP 2021-06-16 12:50:05 +05:30
Gowtham Munukutla
7c8b6867f4 Merge branch 'trunk' of https://github.com/cli/cli into feature/repo-with-gitignore-license 2021-06-16 09:27:53 +05:30
jlsestak
0a801c1ed5
Merge pull request #51 from bchadwic/trunk
Fixed parseFileArgs, reformatted tests
2021-06-15 20:14:44 -07:00
Jessica Sestak
b64488fe5c Changed parsefileArg to return a string, reformatted testing, polished up browse.go 2021-06-15 20:10:48 -07:00
Sam
d299b74a37
Merge pull request #3841 from cli/factory-cleanup
Factory cleanup
2021-06-15 12:10:36 -04:00
Mislav Marohnić
543a17df7f
Merge pull request #3787 from cli/editor-tests
Allow explicitly empty body in issue/pr create
2021-06-15 16:16:59 +02:00
Sam Coe
edfac42384
Set up iostreams in factory default 2021-06-15 09:20:00 -04:00
Sam Coe
53fac59ef9
Cleanup factory/default and add tests 2021-06-15 09:19:16 -04:00
Sam
e380d68ed2
Merge pull request #3789 from cristiand391/increase-gh-pager-precedence
Increase `GH_PAGER` precedence
2021-06-15 09:18:57 -04:00
Benjamin Chadwick
3d97aaf7f4
Merge pull request #49 from bchadwic/trunk
Fixed pr issues
2021-06-14 22:37:21 -07:00
bchadwic
679d396c8d reformatted spacing and final touches 2021-06-14 22:31:29 -07:00
ravocean
21691c8d2e Reorganized tests 2021-06-14 22:16:58 -07:00
ravocean
79da79fb68 We added new tests to bring the coverage to 90%+ 2021-06-14 21:40:52 -07:00
Cristian Dominguez
d68a2038b6 add test case 2021-06-14 22:01:35 -03:00
jlsestak
707897ffb6
Deleted extra space 2021-06-14 08:29:22 -07:00
Sam Coe
8423de7f50
Add tests 2021-06-14 10:54:28 -04:00