Skip to content

Commit

Permalink
Add GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Dec 28, 2020
1 parent 061d997 commit b5a230e
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ about: If something is not working as expected or crashes

#### Issue type:

- :bug: Bug
- :bug: Bug <!--Don't change this issue type!-->

____

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ about: Suggest an idea for this project

#### Issue type:

- :heavy_plus_sign: Feature request
- :heavy_plus_sign: Feature request <!--Don't change this issue type!-->

____

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Performance_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ about: An issue with the performance of this mod, such as abnormal lag.

#### Issue type:

- :snail: Performance issue
- :snail: Performance issue <!--Don't change this issue type!-->

____

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ about: A general question

#### Issue type:

- :question: Question
- :question: Question <!--Don't change this issue type!-->

____

Expand Down
25 changes: 25 additions & 0 deletions .github/issue-commenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
labels:
- name: bug
labeled:
issue:
body: Thanks for reporting!
- name: feature
labeled:
issue:
body: Thanks for the suggestion!
- name: feature-long-term
labeled:
issue:
body: Thanks for the suggestion!
- name: performance
labeled:
issue:
body: Thanks for reporting!
- name: question
labeled:
issue:
body: Someone will answer your question soon. In the meantime, you might be able to get help more quickly on our [Discord server](https://discord.gg/9yDxubB).
- name: invalid-template
labeled:
issue:
body: '@{{ issue.user.login }} Your issue appears to be not following one of the allowed issue templates, which breaks our automation tools. Please update your issue to the proper template.'
17 changes: 17 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
bug:
- '- :bug: Bug'
feature-long-term:
- '- :heavy_plus_sign: Feature request'
performance:
- '- :snail: Performance issue'
question:
- '- :question: Question'

mc-1.12:
- 'Minecraft: 1.12'
mc-1.14:
- 'Minecraft: 1.14'
mc-1.15:
- 'Minecraft: 1.15'
mc-1.16:
- 'Minecraft: 1.16'
24 changes: 24 additions & 0 deletions .github/workflows/close-issues-no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Close issues that received no response"
on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
stale-issue-label: "more-information-needed"
stale-issue-message: 'This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we do not have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.'
days-before-close: 14
days-before-stale: -1
- uses: actions/stale@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
only-labels: "invalid-template"
stale-issue-label: "invalid-template"
stale-issue-message: 'This issue has been automatically closed because it does not follow the issue template. Feel free to recreate this issue'
days-before-close: 7
days-before-stale: -1
14 changes: 14 additions & 0 deletions .github/workflows/issue-label-commenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Comment on issues by label"
on:
issues:
types: [labeled]

jobs:
comment:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: peaceiris/actions-label-commenter@v1
with:
github_token: ${{ secrets.PAT }}
config_file: .github/issue-commenter.yml
42 changes: 42 additions & 0 deletions .github/workflows/issue-label-to-project-board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Add labeled issues to project board"
on:
issues:
types: [labeled]

env:
MY_GITHUB_TOKEN: ${{ secrets.PAT }}

jobs:
assign:
runs-on: ubuntu-latest
steps:
- name: Maintenance Issues
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'bug') ||
contains(github.event.issue.labels.*.name, 'performance') ||
contains(github.event.issue.labels.*.name, 'question')
with:
project: 'https://github.com/orgs/CyclopsMC/projects/1'
column_name: 'To Do'
- name: Feature Optional
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'feature-long-term')
with:
project: 'https://github.com/orgs/CyclopsMC/projects/2'
column_name: 'Options'
- name: Feature Accepted
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'feature')
with:
project: 'https://github.com/orgs/CyclopsMC/projects/2'
column_name: 'Accepted (To Do)'
- name: More Information Needed
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'more-information-needed')
with:
project: 'https://github.com/orgs/CyclopsMC/projects/1'
column_name: 'On hold (awaiting input)'
14 changes: 14 additions & 0 deletions .github/workflows/new-issue-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Label new issues"
on:
issues:
types: [opened, edited]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/[email protected]
with:
repo-token: "${{ secrets.PAT }}"
configuration-path: .github/labeler.yml
enable-versioned-regex: 0

0 comments on commit b5a230e

Please sign in to comment.