From 12b9c9d42002b6ad33e8572430ab446448c117fb Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 19 Apr 2022 16:32:23 -0400 Subject: [PATCH 1/8] Bump matrix of supported Go versions to test on the latest release (^1.18) and drop testing/supporting ^1.15. --- .github/workflows/cli.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index e3b7a97..2752ec2 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - go: [1.15, 1.16, 1.17] + go: [^1.16, ^1.17, ^1.18] name: ${{ matrix.os }} @ Go ${{ matrix.go }} runs-on: ${{ matrix.os }} steps: @@ -38,7 +38,7 @@ jobs: ref: ${{ github.ref }} - name: GOFMT Check - if: matrix.go == 1.17 && matrix.os == 'ubuntu-latest' + if: matrix.go == '^1.17' && matrix.os == 'ubuntu-latest' run: test -z $(gofmt -l .) - name: vet @@ -51,7 +51,7 @@ jobs: run: go run internal/build/build.go check-binary-size - name: Upload coverage to Codecov - if: success() && matrix.go == 1.17 && matrix.os == 'ubuntu-latest' + if: success() && matrix.go == '^1.17' && matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v1 with: fail_ci_if_error: true @@ -63,8 +63,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - # Currently fails on 1.16+ - go-version: 1.15 + go-version: ^1.18 - name: Use Node.js 12.x uses: actions/setup-node@v1 From e61b99e19a022a8db3ac0538518c781676f06362 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 19 Apr 2022 16:51:13 -0400 Subject: [PATCH 2/8] Add Stale bot configuration per docs with (greatly) extended values for `daysUntilStale` and `daysUntilClose` per suggestion. --- .github/stale.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..f050e9b --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 365 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 90 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false From 17aa508d22ae7997bc9b650556f27caa0f24265c Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Wed, 20 Apr 2022 14:38:32 -0400 Subject: [PATCH 3/8] Switch to gfmrun v1.3.0 --- .github/workflows/cli.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 2752ec2..8edeb91 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -29,7 +29,7 @@ jobs: echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV echo "GO111MODULE=on" >> $GITHUB_ENV echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV - echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH + echo "${GITHUB_WORKSPACE}/.local/bin" >> $GITHUB_PATH shell: bash - name: Checkout Code @@ -75,7 +75,7 @@ jobs: echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV echo "GO111MODULE=on" >> $GITHUB_ENV echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV - echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH + echo "${GITHUB_WORKSPACE}/.local/bin" >> $GITHUB_PATH shell: bash - name: Checkout Code @@ -85,9 +85,9 @@ jobs: - name: Install Dependencies run: | - mkdir -p $GOPATH/bin - curl -L -o $GOPATH/bin/gfmrun "https://github.com/urfave/gfmrun/releases/download/v1.2.14/gfmrun-$(go env GOOS)-amd64-v1.2.14" - chmod +x $GOPATH/bin/gfmrun + mkdir -p "${GITHUB_WORKSPACE}/.local/bin" && \ + curl -fsSL -o "${GITHUB_WORKSPACE}/.local/bin/gfmrun" "https://github.com/urfave/gfmrun/releases/download/v1.3.0/gfmrun-$(go env GOOS)-$(go env goarch)-v1.3.0" && \ + chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun" && \ npm install -g markdown-toc@1.2.0 - name: Run Tests (v1) From 8c33a078d1fd99ad15144ff275f4cc767301b806 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Wed, 20 Apr 2022 14:41:26 -0400 Subject: [PATCH 4/8] Use `go env` correctly --- .github/workflows/cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 8edeb91..480a4a0 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -86,7 +86,7 @@ jobs: - name: Install Dependencies run: | mkdir -p "${GITHUB_WORKSPACE}/.local/bin" && \ - curl -fsSL -o "${GITHUB_WORKSPACE}/.local/bin/gfmrun" "https://github.com/urfave/gfmrun/releases/download/v1.3.0/gfmrun-$(go env GOOS)-$(go env goarch)-v1.3.0" && \ + curl -fsSL -o "${GITHUB_WORKSPACE}/.local/bin/gfmrun" "https://github.com/urfave/gfmrun/releases/download/v1.3.0/gfmrun-$(go env GOOS)-$(go env GOARCH)-v1.3.0" && \ chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun" && \ npm install -g markdown-toc@1.2.0 From 5c6ccfb097f10c64582ed943d52d9cac21dd5106 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Wed, 20 Apr 2022 14:45:04 -0400 Subject: [PATCH 5/8] Add missing `"fmt"` import in example --- .gitignore | 1 + docs/v2/manual.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index afdca41..e0c50ab 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ vendor .idea internal/*/built-example coverage.txt +/.local/ *.exe diff --git a/docs/v2/manual.md b/docs/v2/manual.md index 56be65b..b480dd6 100644 --- a/docs/v2/manual.md +++ b/docs/v2/manual.md @@ -674,8 +674,10 @@ Take for example this app that requires the `lang` flag: package main import ( + "fmt" "log" "os" + "github.com/urfave/cli/v2" ) From e63054a42e87bc5710b8911d8650f33f8cde2027 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Thu, 21 Apr 2022 15:07:45 -0400 Subject: [PATCH 6/8] Attempting to soften the barrier to entry and also removing issue title formatting that overlaps with label functionality --- .github/ISSUE_TEMPLATE/question.md | 8 ++-- .github/ISSUE_TEMPLATE/v1-bug-report.md | 39 +++++++++++++------- .github/ISSUE_TEMPLATE/v2-bug-report.md | 39 +++++++++++++------- .github/ISSUE_TEMPLATE/v2-feature-request.md | 16 +++++--- .github/pull_request_template.md | 13 +++++-- 5 files changed, 72 insertions(+), 43 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index bca4fea..b968075 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,12 +1,10 @@ --- name: ask a question -about: ask us question - assume stackoverflow's guidelines apply here -title: 'q: ( your question title goes here )' +about: ask a question - assume stackoverflow's guidelines apply here +title: your question title goes here labels: 'kind/question, status/triage, area/v2' assignees: '' --- -## my question is... - -_**( Put the question text here )**_ +my question is... diff --git a/.github/ISSUE_TEMPLATE/v1-bug-report.md b/.github/ISSUE_TEMPLATE/v1-bug-report.md index aabfe82..b37f40e 100644 --- a/.github/ISSUE_TEMPLATE/v1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/v1-bug-report.md @@ -1,28 +1,32 @@ --- name: v1 bug report about: Create a report to help us fix v1 bugs -title: 'v1 bug: ( your bug title goes here )' +title: 'your bug title goes here' labels: 'kind/bug, status/triage, area/v1' assignees: '' --- -## my urfave/cli version is +## My urfave/cli version is _**( Put the version of urfave/cli that you are using here )**_ ## Checklist -* [ ] Are you running the latest v1 release? The list of releases is [here](https://github.com/urfave/cli/releases). -* [ ] Did you check the manual for your release? The v1 manual is [here](https://github.com/urfave/cli/blob/master/docs/v1/manual.md) -* [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching. +- [ ] Are you running the latest v1 release? The list of releases is [here](https://github.com/urfave/cli/releases). +- [ ] Did you check the manual for your release? The v1 manual is [here](https://github.com/urfave/cli/blob/master/docs/v1/manual.md). +- [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching. ## Dependency Management -- [ ] My project is using go modules. -- [ ] My project is using vendoring. -- [ ] My project is automatically downloading the latest version. -- [ ] I am unsure of what my dependency management setup is. + + +- My project is using go modules. +- My project is using vendoring. +- My project is automatically downloading the latest version. +- I am unsure of what my dependency management setup is. ## Describe the bug @@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the behavior ## Observed behavior -What did you see happen immediately after the reproduction steps above? +What did you see happen immediately after the reproduction steps +above? ## Expected behavior -What would you have expected to happen immediately after the reproduction steps above? +What would you have expected to happen immediately after the +reproduction steps above? ## Additional context Add any other context about the problem here. -If the issue relates to a specific open source Github repo, please link that repo here. +If the issue relates to a specific open source Github repo, please +link that repo here. -If you can reproduce this issue with a public CI system, please link a failing build here. +If you can reproduce this issue with a public CI system, please +link a failing build here. ## Want to fix this yourself? -We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it. You'll want to base the PR off the `v1` branch, all `v1` bug fix releases will be made from that branch. +We'd love to have more contributors on this project! If the fix for +this bug is easily explained and very small, free free to create a +pull request for it. You'll want to base the PR off the `v1` +branch, all `v1` bug fix releases will be made from that branch. ## Run `go version` and paste its output here diff --git a/.github/ISSUE_TEMPLATE/v2-bug-report.md b/.github/ISSUE_TEMPLATE/v2-bug-report.md index 9944769..6561ebf 100644 --- a/.github/ISSUE_TEMPLATE/v2-bug-report.md +++ b/.github/ISSUE_TEMPLATE/v2-bug-report.md @@ -1,28 +1,32 @@ --- name: v2 bug report about: Create a report to help us fix v2 bugs -title: 'v2 bug: ( your bug title goes here )' +title: 'your bug title goes here' labels: 'kind/bug, area/v2, status/triage' assignees: '' --- -## my urfave/cli version is +## My urfave/cli version is _**( Put the version of urfave/cli that you are using here )**_ ## Checklist -* [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases). -* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md) -* [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching. +- [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases). +- [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md) +- [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching. ## Dependency Management -- [ ] My project is using go modules. -- [ ] My project is using vendoring. -- [ ] My project is automatically downloading the latest version. -- [ ] I am unsure of what my dependency management setup is. + + +- My project is using go modules. +- My project is using vendoring. +- My project is automatically downloading the latest version. +- I am unsure of what my dependency management setup is. ## Describe the bug @@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the behavior ## Observed behavior -What did you see happen immediately after the reproduction steps above? +What did you see happen immediately after the reproduction steps +above? ## Expected behavior -What would you have expected to happen immediately after the reproduction steps above? +What would you have expected to happen immediately after the +reproduction steps above? ## Additional context Add any other context about the problem here. -If the issue relates to a specific open source Github repo, please link that repo here. +If the issue relates to a specific open source Github repo, please +link that repo here. -If you can reproduce this issue with a public CI system, please link a failing build here. +If you can reproduce this issue with a public CI system, please +link a failing build here. ## Want to fix this yourself? -We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it. +We'd love to have more contributors on this project! If the fix for +this bug is easily explained and very small, free free to create a +pull request for it. + ## Run `go version` and paste its output here ``` diff --git a/.github/ISSUE_TEMPLATE/v2-feature-request.md b/.github/ISSUE_TEMPLATE/v2-feature-request.md index bc527b1..e830446 100644 --- a/.github/ISSUE_TEMPLATE/v2-feature-request.md +++ b/.github/ISSUE_TEMPLATE/v2-feature-request.md @@ -1,7 +1,7 @@ --- name: v2 feature request about: Suggest an improvement for v2 -title: 'v2 feature: ( your feature title goes here )' +title: 'your feature title goes here' labels: 'type/feature, area/v2, status/triage' assignees: '' @@ -10,16 +10,19 @@ assignees: '' ## Checklist * [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases). -* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md) +* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md). * [ ] Did you perform a search about this feature? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching. ## What problem does this solve? A clear and concise description of what problem this feature would solve. For example: -- needing to type out the full flag name takes a long time, so I would like to suggest adding auto-complete -- I use (osx, windows, linux) and would like support for (some existing feature) to be extended to my platform -- the terminal output for a particular error case is confusing, and I think it could be improved +- needing to type out the full flag name takes a long time, so I + would like to suggest adding auto-complete +- I use (osx, windows, linux) and would like support for (some + existing feature) to be extended to my platform +- the terminal output for a particular error case is confusing, and + I think it could be improved ## Solution description @@ -27,4 +30,5 @@ A detailed description of what you want to happen. ## Describe alternatives you've considered -A clear and concise description of any alternative solutions or features you've considered. +A clear and concise description of any alternative solutions or +features you've considered. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4e76725..47348f8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,10 +8,14 @@ _(REQUIRED)_ -- [ ] bug -- [ ] cleanup -- [ ] documentation -- [ ] feature + + +- bug +- cleanup +- documentation +- feature ## What this PR does / why we need it: @@ -28,6 +32,7 @@ _(REQUIRED)_ ## Which issue(s) this PR fixes: _(REQUIRED)_ +