Setup reminder bots
authorpaz <redacted>
Wed, 20 Nov 2024 11:10:54 +0000 (12:10 +0100)
committerpaz <redacted>
Wed, 20 Nov 2024 11:10:54 +0000 (12:10 +0100)
* One bot that notifies on manually set reminders
* One bot that comments on PR that is stale for 2 weeks

.github/workflows/bot-create-manual-reminder.yml [new file with mode: 0644]
.github/workflows/bot-manual-reminder.yml [new file with mode: 0644]
.github/workflows/bot-remind-stale-pull-requests.yml [new file with mode: 0644]

diff --git a/.github/workflows/bot-create-manual-reminder.yml b/.github/workflows/bot-create-manual-reminder.yml
new file mode 100644 (file)
index 0000000..01677d9
--- /dev/null
@@ -0,0 +1,17 @@
+name: 'Create reminder from comment'
+
+permissions:
+  issues: write
+  pull-requests: write
+
+on:
+  issue_comment:
+    types: [created, edited]
+
+jobs:
+  reminder:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: 👀 check for reminder
+        uses: agrc/create-reminder-action@v1
diff --git a/.github/workflows/bot-manual-reminder.yml b/.github/workflows/bot-manual-reminder.yml
new file mode 100644 (file)
index 0000000..0f17ae4
--- /dev/null
@@ -0,0 +1,17 @@
+name: 'Notify manually requested reminders'
+
+on:
+  schedule:
+    - cron: '0 * * * *'
+
+permissions:
+  issues: write
+  pull-requests: write
+
+jobs:
+  reminder:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: check reminders and notify
+        uses: agrc/reminder-action@v1
diff --git a/.github/workflows/bot-remind-stale-pull-requests.yml b/.github/workflows/bot-remind-stale-pull-requests.yml
new file mode 100644 (file)
index 0000000..b8846c2
--- /dev/null
@@ -0,0 +1,19 @@
+name: "Send comment to stale PRs"
+on:
+  schedule:
+    # Run everyday at midnight
+    - cron: "0 0 * * *"
+
+jobs:
+  review-reminder:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: sojusan/github-action-reminder@v1
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          reminder_message: "🛎️ This PR has had no activity in two weeks."
+          # Remind after two weeks of inactivity
+          inactivity_deadline_hours: 336
+          default_users_to_notify: |
+            @pabzm
+            @alecpl
git clone https://git.99rst.org/PROJECT