Skip to content

Project Management

Project Management #86

# copied from https://github.com/BoundfoxStudios/fairy-tale-defender/blob/develop/.github/workflows/project-management.yml
name: Project Management
# concurrency:
# group: ${{ github.event.issue.number || github.ref }}
# cancel-in-progress: false
on:
# issue_comment:
# types:
# - created
# - edited
issues:
types:
- labeled
# - opened
# - unlabeled
# - assigned
# - unassigned
pull_request_target:
types: [opened, reopened]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
pull-requests: write
issues: write
jobs:
assign-author:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
steps:
- uses: toshimaru/auto-author-assign@2daaeb2988aef24bf37e636fe733f365c046aba0
comment-on-possible-stale-issues:
# This job uses the stale action to find inactive assigned issues and pull requests,
# and comments on them to remind the assignee to take action.
# If the assignee does not take action, the another action will unassign them.
name: Comment on possible stable issues
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
include-only-assigned: true
exempt-assignees: 'baruchiro'
days-before-stale: 7
days-before-close: -1 # Never close an issue/pr
stale-issue-message: 'Hey! This task was taken over a few days ago, but nothing has happened since then. Maybe the current contributor can comment on this?'
stale-pr-message: 'Hey! This pull request was made a few days ago and still needs changes, but nothing has happened since then. Maybe the current contributor can comment on this?'
stale-issue-label: 'Waiting for contributor'
stale-pr-label: 'Waiting for contributor'
exempt-issue-labels: 'on hold'
exempt-pr-labels: 'on hold'
remove-stale-when-updated: true
- uses: boundfoxstudios/action-unassign-contributor-after-days-of-inactivity@eb02181edb32aa5eeff8e0979871d31399cf63a0
with:
last-activity: 7
labels: 'Waiting for contributor'
exempt-assignees: 'baruchiro'
labels-to-remove: 'Waiting for contributor'
message: 'Due to a long period of inactivity, this task was unassigned automatically.'
send_notification:
name: Send Discord Notification
if: github.event_name == 'issues' && github.event.label.name == 'good first issue'
runs-on: ubuntu-latest
steps:
- name: Notify Discord on Label
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MAAKAF_WEBHOOK}}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
curl -X POST -H "Content-Type: application/json" -d "{\"embeds\": [{\"title\": \"🎉 New Issue Alert!\", \"description\": \"📢 Attention new contributors! This issue has been labeled as a 'good first issue'.\n\nIssue Name: **$ISSUE_TITLE**\nIssue Link: $ISSUE_URL\", \"color\": 16750848}]}" $DISCORD_WEBHOOK