Skip to content

Commit

Permalink
reject subscription action
Browse files Browse the repository at this point in the history
  • Loading branch information
elhmn committed Jul 28, 2024
1 parent 3c76c66 commit a58fb7c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/reject_subscriptions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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.GITHUB_TOKEN }}

0 comments on commit a58fb7c

Please sign in to comment.