Commit graph

5080 commits

Author SHA1 Message Date
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
Mislav Marohnić
8272035aac
Merge pull request #4534 from lpessoa/lp-secret-load-env
Adding set secrets from env files

Closes #3610
2021-12-20 23:43:48 +01:00
Mislav Marohnić
95a71f75c5 Improve setting multiple secrets
- Store multiple secrets in parallel
- Perform repo ID resolution in parallel with looking up the encryption key
- Avoid resolving repo IDs more than once
- Allow passing `--env-file=-` to read from stdin
- Fix storing user secrets from file
2021-12-20 23:35:31 +01:00
lpessoa
5589583e4d Adding set secrets from env files
Allows to set multiple secrets from an env file.

    gh secret set -f secrets.env

The env file follows a simple format as defined in https://github.com/joho/godotenv

    SPAM=eggs
    FOO="bar"
2021-12-20 23:33:54 +01:00
Ayush Rawal
ca25026613
Avoid showing non-open PRs on the default branch (#4285)
Co-authored-by: Andrew Hsu <xuzuan@gmail.com>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-20 18:46:12 +00:00
Cristian Dominguez
f2d23d8c88
Allow editing commit subject when squash-merging a PR (#3344)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-20 18:25:17 +00:00
Mislav Marohnić
9f2639e8cd
Merge pull request #4939 from cli/man-refresh
Refresh man pages
2021-12-20 18:29:34 +01:00
Mislav Marohnić
31c7181297 Refresh man pages
- Fix name of man pages for all but the toplevel command
- Set title of all man pages to "GitHub CLI manual"
- Include gh version information in man pages
- Clean up rendering of flags section
- List subcommands for every command
2021-12-20 18:11:31 +01:00
Mislav Marohnić
17291d1d5f
Merge pull request #4936 from cli/bump-cobra
Bump Cobra to 1.3.0
2021-12-20 17:41:07 +01:00
Mislav Marohnić
dac771e088
Merge branch 'trunk' into bump-cobra 2021-12-20 16:35:44 +01:00
Mislav Marohnić
58864f4cff
Merge pull request #4937 from cli/bump-spinner
Bump spinner to 1.18.0
2021-12-20 16:34:41 +01:00
Mislav Marohnić
9605f9f4f2
Unconditionally resolve "ssh.github.com" to "github.com" (#4938) 2021-12-20 16:34:19 +01: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
Mislav Marohnić
69eec45fe2 Bump spinner to 1.18.0 2021-12-20 16:00:42 +01:00
Mislav Marohnić
344f758406 Bump Cobra to 1.3.0 2021-12-20 12:40:45 +01:00
Benny Siegert
0aaa334edf
Add installation instructions for NetBSD/pkgsrc (#4931)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-20 10:00:57 +00:00
Cristian Dominguez
ddaef8baa4
Add --json export flag for workflow runs (#3869)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-17 15:55:45 +00:00
Mislav Marohnić
0607ce56c5
Merge pull request #4920 from simi/patch-1
Update StateDir comment to mention XDG_STATE_HOME.
2021-12-17 14:10:30 +01:00
Josef Šimánek
f2848fcdda
Update StateDir comment to mention XDG_STATE_HOME. 2021-12-16 20:07:33 +01:00
tison
0d3dd7e758
extension upgrade: do not consider up-to-date to be a failure (#4857)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-16 12:59:22 +01:00
Benjamin Chadwick
3ea69c8c9b
pr checks: count "cancelled" jobs as failing instead of neutral (#4850) 2021-12-16 12:01:53 +01:00
Mislav Marohnić
f588aec7f3
Fix repo create regressions (#4904) 2021-12-15 19:05:04 +01:00
Mislav Marohnić
5cd977e328 💅 normalize prompt style for text inputs 2021-12-14 18:38:46 +01:00
Mislav Marohnić
c90fc18b0c Avoid creating repo when cancelling from interactive mode 2021-12-14 18:18:08 +01:00
Mislav Marohnić
3e40780074 💅 repo create cleanups 2021-12-14 18:05:42 +01:00
Mislav Marohnić
21e6d95982 Fix repo create printing created URL in no-TTY mode 2021-12-14 17:49:43 +01:00
Benjamin Chadwick
4bbbf46321
Fix browse last commit when using the repo override flag (#4845) 2021-12-13 15:00:22 +01:00
Mislav Marohnić
2d0b9460be
Merge pull request #4318 from g14a/gh-repo-edit
gh repo edit
2021-12-10 13:44:39 +01:00
Mislav Marohnić
c509a3d4e6
Merge pull request #4861 from despreston/4835-labels-race
fix race condition when updating labels
2021-12-08 16:25:00 +01:00
Mislav Marohnić
db50b54513 Simplify GraphQL mutations whose response we are not interested in 2021-12-08 13:35:19 +01:00
Des Preston
886f5e0e78 Avoid race condition when updating labels
Update labels using the `addLabelsToLabelable` and
`removeLabelsFromLabelable` mutations instead of via the `updateIssue`
mutation that replaces the entire set of labels. This prevents the edit
operation from clobbering any unseen changes to the list of labels.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-08 13:29:47 +01:00
Sergio Guzmán Mayorga
43ae0e5f87
Add interactive tag selector to create release (#4525) 2021-12-08 16:20:15 +04:00
Tomohiro Nishimura
a9d397be69
Add --generate-notes flag to gh release create command. (#4467) 2021-12-08 15:20:59 +04:00
Mislav Marohnić
29816b63c3
Merge pull request #4862 from cli/api-err-409
api: handle HTTP 409 error message from the server
2021-12-07 19:37:19 +01:00
Mislav Marohnić
7d199fa783 repo edit: add ability to add or remove repository topics 2021-12-07 19:28:29 +01:00
Gowtham Munukutla
98217fc38c gh repo edit
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-07 19:28:29 +01:00
Mislav Marohnić
ead6bf87d9 api: handle HTTP 409 error message from the server
Previously, "errors" field was either an array of strings or an array of
error objects. This covers an additional case when "errors" is a string:

    $ gh api orgs/cli/actions/permissions/repositories
    {
      "message": "Conflict",
      "errors": "Actions are enabled for all repositories",
      "documentation_url": "https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization"
    }
2021-12-06 19:54:54 +01:00
Mislav Marohnić
0e3c3bb4a4
pr view: ensure that PR reviews are always rendered in --comments mode (#4848)
The GraphQL query for review didn't use to request the `TotalCount`
field, but that field was checked before rendering the conversation
thread in `pr view --comments`. This fixes rendering the conversation
thread when a PR only has reviews but no ordinary comments.
2021-12-03 18:07:27 +01:00
Mislav Marohnić
4a476bb400
Merge pull request #4847 from rsteube/fix-shorthand
gist view: fix missing files shorthand
2021-12-03 11:23:30 +01:00
rsteube
24c41b5e88 gist view: fix missing files shorthand
converted to `BoolVar`
2021-12-03 10:45:33 +01:00
Alan Donovan
0052199a4c
Merge pull request #4842 from cli/gh-cs-cp-help-typo
gh cs cp --help: fix typo
2021-12-02 23:44:25 -05:00
Alan Donovan
5fea604f78
gh cs cp --help: fix typo 2021-12-02 17:09:20 -05:00
Des Preston
94a640bd2a
Add auth setup-git for setting up gh as a git credential helper (#4246)
Adds a new command `gh auth setup-git [<hostname>]` that sets up git to
use the GitHub CLI as a credential helper.

The gist is that it runs these two git commands for each hostname the
user is authenticated with.

```
git config --global --replace-all 'credential.https://github.com.helper' ''
git config --global --add 'credential.https://github.com.helper' '!gh auth git-credential'
```

If a hostname flag is given, it'll setup GH CLI as a credential helper
for only that hostname.

If the user is not authenticated with any git hostnames, or the user is
not authenticated with the hostname given as a flag, it'll print an
error.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-02 16:38:34 +00:00
Nate Smith
a056fbf0cb
Merge pull request #4838 from cli/go-1.17-fmt
Generate Go 1.17-style `go:build` directives
2021-12-02 10:24:56 -06:00
Sergio Guzmán Mayorga
f13f0e7d87
Add secret set --no-store to print the encrypted secret (#4423)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-02 16:05:10 +00:00
Mislav Marohnić
d02f184bd1 go fmt 2021-12-02 16:12:24 +01:00
Nate Smith
7e7735d450
Merge pull request #4729 from cli/config-list
Add `gh config list`
2021-12-01 17:34:59 -06:00
Des Preston
8f9548fd37
Ignore scope suggestions for http 422 (#4809)
HTTP 422 messages are for validation errors, but OAUTH permissions
suggestions get printed anyways. Most times, the user probably has the
right permissions. This fix adds the check to avoid printing a confusing
message.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-01 18:13:48 +00:00