-
Notifications
You must be signed in to change notification settings - Fork 17
77 lines (71 loc) · 3.12 KB
/
project-management.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# 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