Skip to content

[auto] - Subscription to the careathon 2024 - [Don't edit this title] #3

[auto] - Subscription to the careathon 2024 - [Don't edit this title]

[auto] - Subscription to the careathon 2024 - [Don't edit this title] #3

name: Process survey's entry
on:
issues:
types: [ opened ]
jobs:
reject_subscriptions:
runs-on: ubuntu-latest
if: contains(github.event.issue.title, '[auto] - ')
steps:
- name: Add comment
run: gh issue comment "$NUMBER" --body "$BODY"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
BODY: >
Registrations are now closed, come back next year.
- name: Closing issue
run: |
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/osscameroon/careathon-2024/issues/$ISSUE_NUMBER \
"state=closed" -f "labels[]=registration_closed"
env:
GH_TOKEN: ${{ secrets.ORG_ADMIN_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}