Commit graph

3914 commits

Author SHA1 Message Date
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
Sam Coe
096f30a319
Add counterfeiter 2021-06-14 10:51:51 -04:00
Sam Coe
2729af50df
Cleanup SyncOptions 2021-06-14 10:51:51 -04:00
Sam Coe
8d61b96bde
Fix up error message 2021-06-14 10:51:51 -04:00
Sam Coe
8b5abc77ea
Extract git interactions into interface 2021-06-14 10:51:51 -04:00
Sam Coe
c6f89d3c17
Start tests 2021-06-14 10:51:50 -04:00
Sam Coe
86e16cc7c4
Add repo sync command 2021-06-14 10:51:50 -04:00
Mislav Marohnić
5984cf2a82
Merge pull request #3832 from cli/env-set-fix
Fix setting environment secrets
2021-06-14 16:17:24 +02:00
Cristian Dominguez
d8ce615252 Remove unused method from httpmock package 2021-06-14 09:39:14 -03:00
Cristian Dominguez
6ba70d4a1e Add run cancel command 2021-06-14 08:57:06 -03:00
Mislav Marohnić
3a7ce3a440 Fix setting environment secrets
This uses the correct public key when setting environment secrets.
https://docs.github.com/en/rest/reference/actions#get-an-environment-public-key
2021-06-14 11:51:20 +02:00
Mislav Marohnić
1f4bd80c56 Fix test flaky due to race in showing/hiding cursor
https://github.com/cli/cli/pull/3787/checks?check_run_id=2793254411
2021-06-14 10:58:53 +02:00
bchadwic
9c7a788193 created more tests, and removed repoFlag 2021-06-13 21:05:50 -07:00
Jessica Sestak
7ea9d9164a Fixed TestNewCmdBrowse and added more tests 2021-06-13 20:16:19 -07:00
Jessica Sestak
edef757c6c Made more runBrowse tests 2021-06-12 22:36:03 -07:00
bchadwic
2b42ab92c3 refactored browse.go 2021-06-12 21:58:29 -07:00
camille folch
568f4e4ee0
Minor refactoring for readability in NewCmdFork's runE 2021-06-11 23:28:41 -03:00
camille folch
54b86c7093
repo fork: check that --org is not the empty string
As it is already being done for --remote-name, except in this case
the default is the empty string.
2021-06-11 23:28:41 -03:00
Mislav Marohnić
7999a457ad Separate out NewCmdBrowse tests from runBrowse tests
Co-authored-by: Benjamin Chadwick <benchadwick87@gmail.com>
Co-authored-by: Jessica Sestak <jlsestak@gmail.com>
2021-06-11 18:53:34 +02:00
Nate Smith
aecfc01e69
Merge pull request #3809 from cli/fork-test-cleanup
fork tests cleanup
2021-06-11 11:31:33 -05:00
Owen Voke
d96a773afc
tests: add tests for GPG key commands 2021-06-11 15:55:31 +01:00
Owen Voke
dad2d52571
feat: add commands for managing GPG keys 2021-06-11 15:55:17 +01:00