Commit graph

5189 commits

Author SHA1 Message Date
Jeff Hubbard
71d6e61a5b Rename test 2022-01-21 14:28:17 -08:00
Jeff Hubbard
5cee9e16f3 Add interactive prompt to choose from list of available devcontainer files 2022-01-21 14:11:52 -08:00
Jeff Hubbard
e7f888ad1d Add devcontainer_path API param as an option 2022-01-21 10:20:15 -08:00
Des Preston
2e07d0f32c
pr status: show number of approvals (#4240)
If the base branch has no minimum approval requirements, show "N Approved"
reviews. Otherwise, show "N/X Approved".

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-01-21 15:58:15 +00:00
Sam Coe
d3076463aa
Rename gpg-key and ssh-key files to fit golang common practices (#5074) 2022-01-21 16:51:16 +02:00
Adarsh K Kumar
bb3070aaa0
#4258 Add sub command to delete asset from release (#4416)
* #4258 Add sub command to delete asset from release

* Add just a bit of polish

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-01-21 15:49:36 +02:00
Mislav Marohnić
4340c65ad9
Merge pull request #5040 from cli/issues-by-milestone-fix
Fix filtering issues by milestone
2022-01-21 14:47:40 +01:00
Mislav Marohnić
fac020eb39
Merge pull request #5063 from issyl0/repo-envvar-compatible-with-gh-api
cmd/api: Respect `GH_REPO` when substituting `{owner}/{repo}`
2022-01-20 18:16:10 +01:00
dependabot[bot]
f02a73b4cc
Bump github.com/google/go-cmp from 0.5.6 to 0.5.7 (#5070)
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.6...v0.5.7)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-20 14:31:18 +00:00
Issy Long
8c2695b4a0
cmd/api: Respect GH_REPO when substituting {owner}/{repo}
- This fixes issue 5061.
- Previously, a user could set `GH_REPO=TestOrg/repo` and run `gh api
  repos/{owner}/{repo}/releases` expecting to see the releases from
  `TestOrg/repo` but instead see releases from the current git repo
  they're in.
- Or, worse, if the user ran the command from outside of a git repo,
  they'd see a "not a git repo" error from git itself.
- This was different to `GH_REPO=TestOrg/repo gh release list` which
  successfully lists `TestOrg/repo`'s releases.

----

Before:

```shell
$ cd repos/issyl0/not-a-git-repo
$ GH_REPO=issyl0/terraform-provider-improvmx gh api repos/{owner}/{repo}/releases
unable to expand placeholder in path: fatal: not a git repository (or any of the parent directories): .git
/opt/homebrew/bin/git: exit status 128
```

```shell
$ cd repos/issyl0/a-git-repo-with-no-releases
$ GH_REPO=issyl0/terraform-provider-improvmx gh api repos/{owner}/{repo}/releases
[]
```

After:

```shell
$ cd repos/issyl0/not-a-git-repo
$ GH_REPO=issyl0/terraform-provider-improvmx ../../cli/cli/bin/gh api repos/{owner}/{repo}/releases
[lots of JSON about GH_REPO's releases - success]
```

```shell
$ cd repos/issyl0/a-git-repo-with-no-releases
$ GH_REPO=issyl0/terraform-provider-improvmx ../../cli/cli/bin/gh api repos/{owner}/{repo}/releases
[lots of JSON about GH_REPO's releases - success]
```
2022-01-19 23:16:13 +00:00
Nate Smith
27c92f4804
Merge pull request #5066 from cli/not-installable 2022-01-19 13:57:53 -06:00
nate smith
c32bf6387e update wording for extensions that cannot be installed 2022-01-19 11:44:05 -06:00
Mislav Marohnić
66c18b40f2
Handle SAML enforcement challenge from the server (#5054)
Whenever a SSO challenge gets issued by the server by means of a URL in
the `X-GitHub-SSO` response header, gh now additionally prints that URL
on the standard error stream.

This is achieved by installing a middleware to all HTTP requests and
storing the server challenge to a value accessible by `factory.SSOURL()`.
Such approach was made necessary mainly because of the
`shurcool-graphql` client which doesn't give access to response headers
when a GraphQL error case is encountered.
2022-01-19 14:22:22 +01:00
Nate Smith
f950637b0b
Merge pull request #4738 from SteadBytes/gist-edit-description
Support editing gist description
2022-01-18 09:34:22 -06:00
Nate Smith
8c862bbb3a
Merge pull request #2160 from mbpreble/sign-windows-executables
Sign Windows .exes in a post-build hook
2022-01-18 09:13:33 -06:00
Mislav Marohnić
c8fef47a36
Merge pull request #5055 from cli/stub-fix
Fix legacy prompt stub that is tripping up the linter
2022-01-17 19:48:36 +01:00
Mislav Marohnić
4fd208fd59 Fix legacy prompt stub that is tripping up the linter 2022-01-17 19:39:12 +01:00
Nate Smith
4b415f80d7
Merge pull request #5022 from cli/config-defaults
add GetOrDefault and related methods to Config
2022-01-17 10:44:28 -06:00
Mislav Marohnić
d0c7c4800a
Merge pull request #5047 from hirasawayuki/workflow-enable-cmd
Fix disabled_inactivity workflow can be changed to enable
2022-01-17 15:01:20 +01:00
Mislav Marohnić
227d0e0018
Merge pull request #5028 from spenserblack/bugfix/release/create/no-tag-when-generated-available
Fix tag message option hidden
2022-01-17 14:47:35 +01:00
Mislav Marohnić
df21025133 Add tests for release create from commit log, annotated tag 2022-01-17 14:23:05 +01:00
Mislav Marohnić
7090922713 💅 release create tests 2022-01-17 14:05:01 +01:00
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
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