Commit graph

7230 commits

Author SHA1 Message Date
Mislav Marohnić
e54b29e9cf Merge remote-tracking branch 'origin' into bugfix/release/create/no-tag-when-generated-available 2022-01-17 13:27:47 +01:00
Mislav Marohnić
0a6dc76e5c
Merge pull request #5043 from cli/nolint-insert
Add `nolint-insert` script to mark current lint violations as allowed
2022-01-17 12:35:54 +01:00
Mislav Marohnić
a3f0940c62
Merge pull request #5032 from cli/ask-stubber
Improve Survey stubber for tests
2022-01-17 12:32:28 +01:00
hirasawayuki
44b9ff5ac5 Add tests to enable a workflow in the disabled_inactivity state 2022-01-16 22:22:08 +09:00
hirasawayuki
86566d8187 Add author information in pr list JSON output 2022-01-16 21:22:31 +09:00
hirasawayuki
97d017e802 Add disabled_inactivity state 2022-01-16 12:40:55 +09:00
nate smith
2ade4e5608 add newlines to end of file 2022-01-14 16:46:56 -06:00
nate smith
e6b4fe632b skip signing if env vars not in place 2022-01-14 16:32:56 -06:00
nate smith
a23bdcd84d clean up leftover debugging, add -e 2022-01-14 16:24:04 -06:00
Mislav Marohnić
583af3e54c
Allow gh auth git-credential to authenticate GitHub Gist requests (#3064)
* Allow `gh auth git-credential` to authenticate GitHub Gist requests

When there are stored credentials for `example.com`, allow using them to
authenticate requests to `gist.example.com` as well.

* Fix writing out of credential config

* remove unneccessary function

* actually delete

Co-authored-by: nate smith <vilmibm@github.com>
2022-01-14 22:18:07 +00:00
nate smith
30a30bee2e remove todo 2022-01-14 15:34:06 -06:00
nate smith
0a619d422a undo overzealous find/replace 2022-01-14 15:27:05 -06:00
Mislav Marohnić
9f46def1a8 Add nolint-insert script to auto-comment lint violations
Step 1: mark a function as deprecated
Step 2: run `script/nolint-insert`
Step 3: all callers of that function now have a `//nolint` directive
2022-01-14 19:54:09 +01:00
Mislav Marohnić
44775f87c8 Add nolint directives to allow-list current lint violations 2022-01-14 19:52:52 +01:00
Mislav Marohnić
e43cb2b880 Port more legacy stubs to the new ask stubber 2022-01-14 19:34:15 +01:00
Mislav Marohnić
a33b5a55c4 Have NewAskStubber perform auto-cleanup 2022-01-14 18:52:00 +01:00
Mislav Marohnić
30c5ef23ee Merge remote-tracking branch 'origin' into ask-stubber 2022-01-14 17:41:08 +01:00
Mislav Marohnić
5c2ee024a2
Merge pull request #5034 from cli/markdown-newlines
Touch up Markdown rendering
2022-01-14 15:49:38 +01:00
Mislav Marohnić
659eed777d Have TerminalTheme invoke DetectTerminalTheme if necessary 2022-01-14 15:42:02 +01:00
Mislav Marohnić
d23460a590 Fix filtering issues by milestone
The milestone filter in the `Repository.issues` GraphQL connection is
broken, so switch to the Search API for any milestone filtering.

Previously, we used to work around this by obtaining the milestone
database ID from decoding the GraphQL ID, but that no longer works since
the GraphQL ID format has changed.
2022-01-14 15:06:33 +01:00
nate smith
f30b7dbf72 Work around parallel race condition problems 2022-01-13 13:38:09 -06:00
Matthew Preble
45adc4ad76 Migrate to osslsigncode. 2022-01-13 13:37:57 -06:00
nate smith
e56c78a364 Sign Windows .exes in a post-build hook 2022-01-13 13:37:57 -06:00
Mislav Marohnić
fbda658767
Merge pull request #5033 from cli/go-ci-cache
Cache Go modules between CI runs
2022-01-13 19:46:16 +01:00
Mislav Marohnić
4e1bca736f Preserve newlines in GitHub-flavored markdown 2022-01-13 19:41:01 +01:00
Mislav Marohnić
456d55ead9 Have a single Render function handle all Markdown rendering 2022-01-13 19:39:43 +01:00
Mislav Marohnić
171482970f Cache Go modules between CI runs 2022-01-13 13:17:11 +01:00
Mislav Marohnić
c839d3ba1d Check for unused ask stubs at the end of the test 2022-01-13 12:23:42 +01:00
Mislav Marohnić
8e64c149e1 Return errors in ask stubber instead of panicking 2022-01-13 11:58:58 +01:00
Mislav Marohnić
62bd82809d Port auth login tests to the new ask stubber 2022-01-13 11:56:45 +01:00
Mislav Marohnić
649e30ce2a Fix ask stubs in repo create tests 2022-01-13 11:17:42 +01:00
Mislav Marohnić
0cb4b7aaef Improve SurveyAskOne stub error messages 2022-01-13 11:16:58 +01:00
Mislav Marohnić
90ec1089ef Port pr create tests to the new ask stubber 2022-01-12 23:57:19 +01:00
Mislav Marohnić
ff072574f9 Port release create tests to the new ask stubber 2022-01-12 23:57:19 +01:00
Mislav Marohnić
3c443efbed Improve Survey prompt stubber for tests
Both SurveyAsk and SurveyAskOne methods now share the same sets of
stubs, making it possible to change which of these methods is used in
the implementation without breaking tests.

A new method `AskStubber.StubPrompt("<prompt>")` is added as test helper
to supersede old Stub and StubOne methods. The new helper matches on
prompt messages rather than on field names, enabling tests to be written
based on what the user would see rather than coupling to implementation
details.

The new stubber also allows verifying whether a Select or MultiSelect
was rendered with the expected set of options. Furthermore, if a stubbed
value is not present among those options, the stubber will panic instead
of continuing normally.

Stubbed Selects with an int instead of a string target receiver are now
transparently handled. The values for Select stubs are always strings in
tests, but the stubber will write an int answer if the receiver expects
one as a selected index instead of a selected string value.

Lastly, this set of changes improves test resiliency since the stubs are
now matched based on prompt message (or field name for legacy stubs
created with Stub) instead of sequentially, enabling the implementation
to reorder the prompts without breaking existing tests.
2022-01-12 23:51:21 +01:00
keijun-kumagai
6bc0b69355 feat(http): supress linter 2022-01-13 00:33:07 +09:00
Mislav Marohnić
8198cce59b
Merge pull request #3997 from nicknotfun/non-interactive-auth
Add interactive mode to auth flow, pass from login and refresh

Closes #4506
2022-01-12 15:59:30 +01:00
Mislav Marohnić
be9f01101a Tweak auth flow re: interactivity
Fixes non-interactive login flow and make sure "prompt" configuration is
respected by never prompting if it was explicitly disabled.

No longer asks to press Enter again after "Authentication complete"
message, since that didn't provide any value to the user.
2022-01-12 15:50:51 +01:00
Spenser Black
e8dfa9e728
Fix tag message option hidden
This fixes the option in `gh release create` to generate release notes
from the tag message being hidden whenever generated notes are
available. This changes the behavior from hiding "generate from tag" and
"generate from commit log" being hidden to *only* the "generate from
commit log" option being hidden.

Fixes #5027
2022-01-12 09:36:29 -05:00
Carl Tablante
ad8d7bb02e
#4386 Display a user's name in metadata survey for assignees and reviewers (#4420)
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-01-12 08:52:22 +00:00
Nick Cooper
a408f24d3a auth: add noninteractive flow to login/refresh 2022-01-11 22:44:46 +01:00
nate smith
56522f9f14 formatting 2022-01-11 14:57:10 -06:00
nate smith
562f1b3d0d add GetOrDefault functionality to config 2022-01-11 14:56:58 -06:00
Nate Smith
2deb0ec908
Merge pull request #4915 from znull/znull/stdio
`gh cs ssh` cli integration with openssh config
2022-01-11 14:43:39 -06:00
keijun-kumagai
015b9f7fea fix(release): discussion category with assets 2022-01-11 01:49:19 +09:00
Jason Lunz
61e5fbb007
Revert "move gh cs ssh --config into a separate gh cs ssh config command"
This reverts commit c9d0085e57.
2022-01-06 10:03:54 -07:00
Frank Dietrich
0ac546a81f
Amend location of GPG key file
Following the Debian [documentation](https://wiki.debian.org/SecureApt) the keyring should be stored in `/etc/apt/trusted.gpg.d/.

> In more recent Debian GNU/Linux versions (Wheezy, for example), the keyrings are stored in specific files all located in the `/etc/apt/trusted.gpg.d` directory.
2022-01-06 09:16:27 +01:00
Andrei Jiroh Eugenio Halili
354bac82b3
Add Alpine Linux install docs 2021-12-24 18:43:22 +08:00
Mislav Marohnić
eaa64df801
Merge pull request #4942 from cli/repo-sync-merge-upstream
repo sync: Use the new merge-upstream API if available
2021-12-21 17:05:56 +01:00
Mislav Marohnić
1260023547 repo sync: Use the new merge-upstream API if available
This helps avoid the errors when a new commit from upstream is not yet
available in the fork, resulting in a HTTP 404 when trying to update the
ref in the fork.

If the merge-upstream API is unavailable (404) or errors out (409/422),
the functionality falls back to the previous functionality of manually
updating refs. This ensures that `--force` still has effect.
2021-12-21 16:44:27 +01:00