Notation du Careathon #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | |
-f "state=closed" -f "labels[]=registration_closed" | |
env: | |
GH_TOKEN: ${{ secrets.ORG_ADMIN_TOKEN }} | |
ISSUE_NUMBER: ${{ github.event.issue.number }} |