Skip to content

Commit

Permalink
feat: add reminder and validations
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed Mar 29, 2024
1 parent 47dc408 commit 6d520d7
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/issue_comment.reminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Issue Comment (Reminder)

on:
issue_comment:
types: [created, edited]

jobs:
reminder:
name: 👀 Create reminder
runs-on: ubuntu-latest

steps:
- name: 👀 check for reminder
uses: agrc/create-reminder-action@v1
44 changes: 44 additions & 0 deletions .github/workflows/issue_comment.validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Issue Comment (Validate Addresses)

on:
issue_comment:
types: [created]

permissions:
issues: write

jobs:
validate:
name: ✅ Validate addresses
runs-on: ubuntu-latest
steps:
- name: Add emoji to comment
uses: actions/github-script@v7
with:
script: |
const comment = context.payload.comment;
const body = comment.body;
if (!body.startsWith('/validate addresses')) {
return;
}
github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'eyes'
});
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false
- name: 📥 Download dependencies
run: npm ci
- name: 🏗 Run build command
run: npm run build
- name: 🧪 Test addresses
uses: agrc/validate-address-action@v1
with:
API_KEY: ${{ secrets.API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/schedule.reminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Schedule (Reminder comments)

on:
schedule:
- cron: '0 9-17/2 * * 1-5'
workflow_dispatch:

permissions:
issues: write

jobs:
reminder:
name: ⏰ Punch reminders
runs-on: ubuntu-latest

steps:
- name: 🔔 check reminders and notify
uses: agrc/reminder-action@v1

0 comments on commit 6d520d7

Please sign in to comment.