From 53f4a4929d7cc561d0a514f5b2463541a1145071 Mon Sep 17 00:00:00 2001 From: Airah Yusuff Date: Sat, 17 Jan 2026 08:46:47 +0000 Subject: [PATCH 1/2] update workflow --- .github/workflows/import_meetup_events.yml | 42 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/workflows/import_meetup_events.yml b/.github/workflows/import_meetup_events.yml index 7582037e..fc6bf1ba 100644 --- a/.github/workflows/import_meetup_events.yml +++ b/.github/workflows/import_meetup_events.yml @@ -42,7 +42,18 @@ jobs: cd tools python meetup_import.py + - name: Confirm only events.yml was modified + run: | + MODIFIED_FILES=$(git diff --name-only) + echo "Modified files: $MODIFIED_FILES" + if echo "$MODIFIED_FILES" | grep -qv "^_data/events.yml$"; then + echo "ERROR: Unexpected files were modified" + exit 1 + fi + echo "Only events.yml was modified as expected" + - name: Create or Update Pull Request + id: create-pr uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GHA_ACTIONS_ALLOW_TOKEN }} @@ -56,5 +67,32 @@ jobs: Please review the changes `_data/events.yml` and ensure that everything is parsed correctly before merging. labels: | - automation - + automation, auto-approve + + - name: Wait for required checks + if: steps.create-pr.outputs.pull-request-number + run: | + gh pr checks ${{ steps.create-pr.outputs.pull-request-number }} --watch + env: + GITHUB_TOKEN: ${{ secrets.GHA_ACTIONS_ALLOW_TOKEN }} + + - name: Auto-approve PR + if: steps.create-pr.outputs.pull-request-number + run: | + echo "Approving PR #${{ steps.create-pr.outputs.pull-request-number }}" + gh pr review ${{ steps.create-pr.outputs.pull-request-number }} --approve + echo "PR approved" + env: + GITHUB_TOKEN: ${{ secrets.GHA_ACTIONS_APPROVAL_TOKEN }} + + - name: Auto-merge PR + if: steps.create-pr.outputs.pull-request-number + run: | + echo "Auto-merge PR #${{ steps.create-pr.outputs.pull-request-number }}" + gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} \ + --auto \ + --squash \ + --delete-branch + echo "Auto-merge completed" + env: + GITHUB_TOKEN: ${{ secrets.GHA_ACTIONS_ALLOW_TOKEN }} From 599da80a640edea8474ac3260a9531056c3c1801 Mon Sep 17 00:00:00 2001 From: Airah Yusuff Date: Sat, 17 Jan 2026 18:32:14 +0000 Subject: [PATCH 2/2] updates --- .github/workflows/import_meetup_events.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/import_meetup_events.yml b/.github/workflows/import_meetup_events.yml index fc6bf1ba..ce701552 100644 --- a/.github/workflows/import_meetup_events.yml +++ b/.github/workflows/import_meetup_events.yml @@ -83,7 +83,7 @@ jobs: gh pr review ${{ steps.create-pr.outputs.pull-request-number }} --approve echo "PR approved" env: - GITHUB_TOKEN: ${{ secrets.GHA_ACTIONS_APPROVAL_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GHA_APPROVAL_TOKEN }} - name: Auto-merge PR if: steps.create-pr.outputs.pull-request-number