Skip to content

Commit

Permalink
Add GitHub Actions Workflows To Manage Issues (#1398)
Browse files Browse the repository at this point in the history
* Add new GitHub Actions workflow to manage new and stale issues

Signed-off-by: Ivan Sim <ivan.sim@kasten.io>

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
  • Loading branch information
ihcsim and pavannd1 authored May 3, 2022
1 parent a838c42 commit c3ee585
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
days-before-close: 30
close-issue-label: rotten
close-pr-label: rotten
stale-issue-label: stale
stale-pr-label: stale
exempt-issue-labels: frozen
exempt-pr-labels: frozen
close-issue-message: This issue is closed due to inactivity. Feel free to reopen it, if it's still relevant.
close-pr-message: This PR is closed due to inactivity. Feel free to reopen it, if it's still relevant.
stale-issue-message: This issue is marked as stale due to inactivity. Add a new comment to reactivate it.
stale-pr-message: This PR is marked as stale due to inactivity. Add a new comment to reactivate it.
54 changes: 54 additions & 0 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
issues:
types:
- opened
- reopened
pull_request:
types:
- opened
- reopened
jobs:
issues:
if: github.event_name == 'issues'
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-labels@v1.1.0
with:
labels: "triage"
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-ecosystem/action-create-comment@v1.0.0
if: github.event.action == 'opened'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: |
Thanks for opening this issue :+1:. The team will review it shortly.
If this is a bug report, make sure to include clear instructions how on to reproduce the problem with [minimal reproducible examples](https://stackoverflow.com/help/minimal-reproducible-example), where possible. If this is a security report, please review our security policy as outlined in [SECURITY.md](https://github.com/kanisterio/kanister/blob/master/SECURITY.md).
If you haven't already, please take a moment to review our project's [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document.
- uses: alex-page/github-project-automation-plus@v0.8.1
with:
repo-token: ${{ secrets.GH_TOKEN }} # must use a PAT here
project: Kanister
column: To Be Triaged
pull-requests:
if: github.event_name == 'pull_request'
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-create-comment@v1.0.0
if: github.event.action == 'opened'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: |
Thanks for submitting this pull request :tada:. The team will review it soon and get back to you.
If you haven't already, please take a moment to review our project [contributing guideline](https://github.com/kanisterio/kanister/blob/master/CONTRIBUTING.md) and [Code of Conduct](https://github.com/kanisterio/kanister/blob/master/CODE_OF_CONDUCT.md) document.
- uses: alex-page/github-project-automation-plus@v0.8.1
with:
repo-token: ${{ secrets.GH_TOKEN }}
project: Kanister
column: In Progress

0 comments on commit c3ee585

Please sign in to comment.