Skip to content

Commit

Permalink
Add GitHub actions to close invalid issues (#3022)
Browse files Browse the repository at this point in the history
* add close actions

* fix with checkout

* update issue templates

* add reminder

* update close message
  • Loading branch information
chinesedfan committed Jun 17, 2020
1 parent 36f0ad2 commit a9010e4
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 45 deletions.
19 changes: 12 additions & 7 deletions .github/ISSUE_TEMPLATE.md
@@ -1,6 +1,4 @@
<!-- Click "Preview" for a more readable version -->

#### Instructions
<!-- Click "Preview" for a more readable version --
Please read and follow the instructions before submitting an issue:
Expand All @@ -9,9 +7,12 @@ Please read and follow the instructions before submitting an issue:
- 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.
- If you need a new feature there's a chance it's already implemented in a [library](https://github.com/axios/axios/blob/master/ECOSYSTEM.md) or you can implement it using [interceptors](https://github.com/axios/axios#interceptors).
- Don't remove any title of the issue template, or it will be treated as invalid by the bot.
**⚠️👆 Delete the instructions before submitting the issue 👆⚠️**
-->

#### Summary

Describe your issue here, including as much detail as necessary.
Expand All @@ -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]
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Expand Up @@ -2,7 +2,7 @@
name: "\U0001F41E Bug Report"
about: Report a reproducible bug
title: ''
labels: bug
labels: 'status:possible bug'
assignees: ''

---
Expand All @@ -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.
11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/---documentation.md
Expand Up @@ -2,7 +2,7 @@
name: "\U0001F4DA Documentation"
about: Report an error or area that needs clarification
title: ''
labels: documentation
labels: 'type:documentation'
assignees: ''

---
Expand All @@ -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]
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/---feature-request.md
@@ -0,0 +1,33 @@
---
name: "✨ Feature Request"
about: Suggest an idea or feature
title: ''
labels: 'type:feature'
assignees: ''

---

<!-- Click "Preview" for a more readable version --
Please read and follow the instructions before submitting an issue:
- Read all our documentation, especially the [README](https://github.com/axios/axios/blob/master/README.md). It may contain information that helps you solve your 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 👆⚠️
-->

#### 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.
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/---support-or-usage-question.md
Expand Up @@ -2,7 +2,7 @@
name: "\U0001F914 Support or Usage Question"
about: Get help using Axios
title: ''
labels: question
labels: 'type:question'
assignees: ''

---
Expand All @@ -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.
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/--feature-request.md

This file was deleted.

17 changes: 17 additions & 0 deletions .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."

0 comments on commit a9010e4

Please sign in to comment.