From a9010e4525c89cd84ef38f72c60fd84dc09c9352 Mon Sep 17 00:00:00 2001 From: Xianming Zhong Date: Thu, 18 Jun 2020 00:54:09 +0800 Subject: [PATCH] Add GitHub actions to close invalid issues (#3022) * add close actions * fix with checkout * update issue templates * add reminder * update close message --- .github/ISSUE_TEMPLATE.md | 19 +++++++---- .github/ISSUE_TEMPLATE/---bug-report.md | 17 ++++++---- .github/ISSUE_TEMPLATE/---documentation.md | 11 ++++--- .github/ISSUE_TEMPLATE/---feature-request.md | 33 +++++++++++++++++++ .../---support-or-usage-question.md | 17 ++++++---- .github/ISSUE_TEMPLATE/--feature-request.md | 20 ----------- .github/workflows/close-issues.yml | 17 ++++++++++ 7 files changed, 89 insertions(+), 45 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/---feature-request.md delete mode 100644 .github/ISSUE_TEMPLATE/--feature-request.md create mode 100644 .github/workflows/close-issues.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 7f8e741..a82e473 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,4 @@ - - -#### Instructions + + #### Summary Describe your issue here, including as much detail as necessary. @@ -20,7 +21,11 @@ If you're reporting a bug, include the relevant code and stack traces to debug i If you're requesting a feature, include some context and examples of code using it. -#### Context - -- axios version: *e.g.: v0.16.0* -- Environment: *e.g.: node v6.9.4, chrome 54, windows 7* +#### Environment + - Axios Version [e.g. 0.18.0] + - Adapter [e.g. XHR/HTTP] + - Browser [e.g. Chrome, Safari] + - Browser Version [e.g. 22] + - Node.js Version [e.g. 13.0.1] + - OS: [e.g. iOS 12.1.0, OSX 10.13.4] + - Additional Library Versions [e.g. React 16.7, React Native 0.58.0] diff --git a/.github/ISSUE_TEMPLATE/---bug-report.md b/.github/ISSUE_TEMPLATE/---bug-report.md index a9f1fc9..8af77a3 100644 --- a/.github/ISSUE_TEMPLATE/---bug-report.md +++ b/.github/ISSUE_TEMPLATE/---bug-report.md @@ -2,7 +2,7 @@ name: "\U0001F41E Bug Report" about: Report a reproducible bug title: '' -labels: bug +labels: 'status:possible bug' assignees: '' --- @@ -15,29 +15,32 @@ Please read and follow the instructions before submitting an issue: - Ensure your issue isn't already [reported](https://github.com/axios/axios/issues?utf8=%E2%9C%93&q=is%3Aissue). - If you aren't sure that the issue is caused by Axios or you just need help, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/axios) or [our chat](https://gitter.im/mzabriskie/axios). - If you're reporting a bug, ensure it isn't already fixed in the latest Axios version. +- Don't remove any title of the issue template, or it will be treated as invalid by the bot. ⚠️👆 Feel free to these instructions before submitting the issue 👆⚠️ --> -**Describe the bug** +#### Describe the bug A clear and concise description of what the bug is. **If your problem is not a bug, please file under Support or Usage Question** -**To Reproduce** +#### To Reproduce Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. **If your problem is not reproducible, please file under Support or Usage Question** ```js // Example code here ``` -**Expected behavior** +#### Expected behavior A clear and concise description of what you expected to happen. -**Environment:** +#### Environment - Axios Version [e.g. 0.18.0] - - OS: [e.g. iOS 12.1.0, OSX 10.13.4] + - Adapter [e.g. XHR/HTTP] - Browser [e.g. Chrome, Safari] - Browser Version [e.g. 22] + - Node.js Version [e.g. 13.0.1] + - OS: [e.g. iOS 12.1.0, OSX 10.13.4] - Additional Library Versions [e.g. React 16.7, React Native 0.58.0] -**Additional context/Screenshots** +#### Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain. diff --git a/.github/ISSUE_TEMPLATE/---documentation.md b/.github/ISSUE_TEMPLATE/---documentation.md index 42c2acb..66dcb03 100644 --- a/.github/ISSUE_TEMPLATE/---documentation.md +++ b/.github/ISSUE_TEMPLATE/---documentation.md @@ -2,7 +2,7 @@ name: "\U0001F4DA Documentation" about: Report an error or area that needs clarification title: '' -labels: documentation +labels: 'type:documentation' assignees: '' --- @@ -11,13 +11,16 @@ assignees: '' If you found an area that needs clarification, feel free to open a PR or list the section/content that could be improved below +Don't remove any title of the issue template, or it will be treated as invalid by the bot. + ⚠️👆 Feel free to refer to these instructions before submitting the issue 👆⚠️ --> -**Section/Content To Improve** +#### Section/Content To Improve Quote or link to section -**Suggested Improvement** +#### Suggested Improvement Identify what is confusing or incorrect and what could make it better -**Relevant File(s)**: [e.g. README.md] +#### Relevant File(s) +[e.g. README.md] diff --git a/.github/ISSUE_TEMPLATE/---feature-request.md b/.github/ISSUE_TEMPLATE/---feature-request.md new file mode 100644 index 0000000..fe56760 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---feature-request.md @@ -0,0 +1,33 @@ +--- +name: "✨ Feature Request" +about: Suggest an idea or feature +title: '' +labels: 'type:feature' +assignees: '' + +--- + + + +#### Is your feature request related to a problem? Please describe. +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +#### Describe the solution you'd like +A clear and concise 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. + +#### Additional context +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/---support-or-usage-question.md b/.github/ISSUE_TEMPLATE/---support-or-usage-question.md index bba2dad..e73035f 100644 --- a/.github/ISSUE_TEMPLATE/---support-or-usage-question.md +++ b/.github/ISSUE_TEMPLATE/---support-or-usage-question.md @@ -2,7 +2,7 @@ name: "\U0001F914 Support or Usage Question" about: Get help using Axios title: '' -labels: question +labels: 'type:question' assignees: '' --- @@ -15,29 +15,32 @@ Please read and follow the instructions before submitting an issue: - Ensure your issue isn't already [reported](https://github.com/axios/axios/issues?utf8=%E2%9C%93&q=is%3Aissue). - If you aren't sure that the issue is caused by Axios or you just need help, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/axios) or [our chat](https://gitter.im/mzabriskie/axios). - If you're reporting a bug, ensure it isn't already fixed in the latest Axios version. +- Don't remove any title of the issue template, or it will be treated as invalid by the bot. ⚠️👆 Feel free to these instructions before submitting the issue 👆⚠️ --> -**Describe the issue** +#### Describe the issue A clear and concise description of what the issue is. -**Example Code** +#### Example Code Code snippet to illustrate your question ```js // Example code here ``` -**Expected behavior, if applicable** +#### Expected behavior, if applicable A clear and concise description of what you expected to happen. -**Environment:** +#### Environment - Axios Version [e.g. 0.18.0] - - OS: [e.g. iOS 12.1.0, OSX 10.13.4] + - Adapter [e.g. XHR/HTTP] - Browser [e.g. Chrome, Safari] - Browser Version [e.g. 22] + - Node.js Version [e.g. 13.0.1] + - OS: [e.g. iOS 12.1.0, OSX 10.13.4] - Additional Library Versions [e.g. React 16.7, React Native 0.58.0] -**Additional context/Screenshots** +#### Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain. diff --git a/.github/ISSUE_TEMPLATE/--feature-request.md b/.github/ISSUE_TEMPLATE/--feature-request.md deleted file mode 100644 index ad49bc0..0000000 --- a/.github/ISSUE_TEMPLATE/--feature-request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: "✨ Feature Request" -about: Suggest an idea or feature -title: '' -labels: feature -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise 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. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml new file mode 100644 index 0000000..04bb570 --- /dev/null +++ b/.github/workflows/close-issues.yml @@ -0,0 +1,17 @@ +name: 'Close Invalid Issues' + +on: + issues: + types: [opened] + +jobs: + auto_close_issues: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Automatically close issues that don't follow the issue template + uses: lucasbento/auto-close-issues@v1.0.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-close-message: "Closed by the issue bot. Make sure you have followed the issue template will all required sections/titles. Thanks."