diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index ae0d29096a4..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: "\U0001F41B Bug report" -about: Report a bug or unexpected behavior while using GitHub CLI -title: '' -labels: bug -assignees: '' - ---- - -### Describe the bug - -A clear and concise description of what the bug is. - -### Affected version - -Please run `gh version` and paste the output below. - -### Steps to reproduce the behavior - -1. Type this '...' -2. View the output '....' -3. See error - -### Expected vs actual behavior - -A clear and concise description of what you expected to happen and what actually happened. - -### Logs - -Paste the activity from your command line. Redact if needed. - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0cad7e02ccc..58a02da3e17 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,5 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - - name: Ask a question on how to use GitHub CLI - about: For general-purpose questions and answers, see the Discussions section. - url: https://github.com/cli/cli/discussions - - name: Ask a question about the GitHub API - about: Please check out the GitHub community forum for discussions about the GitHub API. - url: https://github.community/c/github-ecosystem/37 + - name: "GitHub CLI issues" + url: https://github.com/cli/cli/issues/new/choose + about: "Go to the upstream repository for anything unrelated to the snap packaging" diff --git a/.github/ISSUE_TEMPLATE/submit-a-request.md b/.github/ISSUE_TEMPLATE/default.md similarity index 67% rename from .github/ISSUE_TEMPLATE/submit-a-request.md rename to .github/ISSUE_TEMPLATE/default.md index 4f66ac457b6..8f39ec3e3bb 100644 --- a/.github/ISSUE_TEMPLATE/submit-a-request.md +++ b/.github/ISSUE_TEMPLATE/default.md @@ -1,10 +1,6 @@ --- -name: "⭐ Submit a request" -about: Surface a feature or problem that you think should be solved -title: '' -labels: enhancement -assignees: '' - +name: "⭐ Snap Issue" +about: Submit an issue related to the snapcraft packaging of GitHub CLI --- ### Describe the feature or problem you’d like to solve diff --git a/.github/ISSUE_TEMPLATE/feedback.md b/.github/ISSUE_TEMPLATE/feedback.md deleted file mode 100644 index 837c36632a5..00000000000 --- a/.github/ISSUE_TEMPLATE/feedback.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: "\U0001F4E3 Feedback" -about: Give us general feedback about the GitHub CLI -title: '' -labels: feedback -assignees: '' - ---- - -# CLI Feedback - -You can use this template to give us structured feedback or just wipe it and leave us a note. Thank you! - -## What have you loved? - -_eg "the nice colors"_ - -## What was confusing or gave you pause? - -_eg "it did something unexpected"_ - -## Are there features you'd like to see added? - -_eg "gh cli needs mini-games"_ - -## Anything else? - -_eg "have a nice day"_ diff --git a/.gitignore b/.gitignore index a4b73ac7a50..42ea80f520b 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ *~ vendor/ + +# snap +/gh_*.snap diff --git a/README.md b/README.md index 8257cf56692..f77f2d175bb 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,14 @@ For more information, see [Linux & BSD installation](./docs/install_linux.md). MSI installers are available for download on the [releases page][]. +### Snapcraft + +Install: + +`sudo snap install gh --classic` + +Updates are automatically checked for (and if available, downloaded) every 6 hours. + ### Codespaces To add GitHub CLI to your codespace, add the following to your [devcontainer file](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file): diff --git a/go.mod b/go.mod index 018df2aae9a..43ebe21517b 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/sigstore/protobuf-specs v0.5.0 github.com/sigstore/sigstore-go v1.0.0 github.com/spf13/cobra v1.9.1 - github.com/spf13/pflag v1.0.6 + github.com/spf13/pflag v1.0.7 github.com/stretchr/testify v1.10.0 github.com/theupdateframework/go-tuf/v2 v2.1.1 github.com/yuin/goldmark v1.7.12 diff --git a/go.sum b/go.sum index baa93604d8c..8f759b12b1b 100644 --- a/go.sum +++ b/go.sum @@ -482,8 +482,9 @@ github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= +github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 00000000000..3e15930a611 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,46 @@ +name: gh +summary: The GitHub CLI +description: | + https://cli.github.com + + **`gh` - The GitHub CLI tool** + + `gh` is GitHub on the command line, and it's now available in beta. It brings pull requests, issues, and other GitHub concepts to + the terminal next to where you are already working with `git` and your code. + + _Usage_ + + - `gh pr [create, list, status, view, checkout, ...]` + - `gh issue [create, list, status, view, ...]` + - `gh [auth, browse, codespace, gist, org, project, release, repo, ...]` + - `gh [cache, run, workflow, ...]` + - `gh [alias, api, attestation, config, extension, gpg-key, label, preview, ruleset, search, secret, ssh-key, status, variable, ...]` + - `gh help` +adopt-info: gh +grade: stable +confinement: classic +base: core24 +license: MIT +parts: + gh: + plugin: make + source: . + build-snaps: + - go + - snapd + build-packages: + - git + - gcc + stage-packages: + - git + override-pull: | + snapcraftctl pull + snapcraftctl set-version `(git describe --tags | sed 's/^v//') 2>/dev/null || git rev-parse --short HEAD` + override-build: | + LDFLAGS='' make -j2 + cp bin/gh $SNAPCRAFT_PART_INSTALL/ + bin/gh completion -s bash > $SNAPCRAFT_PART_INSTALL/completion.sh +apps: + gh: + command: gh + completer: completion.sh