Skip to content

Commit 6f55c22

Browse files
Feat: Update Meetup Import Automation (#636)
* update workflow * updates
1 parent 9c01272 commit 6f55c22

1 file changed

Lines changed: 40 additions & 2 deletions

File tree

.github/workflows/import_meetup_events.yml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,18 @@ jobs:
4242
cd tools
4343
python meetup_import.py
4444
45+
- name: Confirm only events.yml was modified
46+
run: |
47+
MODIFIED_FILES=$(git diff --name-only)
48+
echo "Modified files: $MODIFIED_FILES"
49+
if echo "$MODIFIED_FILES" | grep -qv "^_data/events.yml$"; then
50+
echo "ERROR: Unexpected files were modified"
51+
exit 1
52+
fi
53+
echo "Only events.yml was modified as expected"
54+
4555
- name: Create or Update Pull Request
56+
id: create-pr
4657
uses: peter-evans/create-pull-request@v7
4758
with:
4859
token: ${{ secrets.GHA_ACTIONS_ALLOW_TOKEN }}
@@ -56,5 +67,32 @@ jobs:
5667
5768
Please review the changes `_data/events.yml` and ensure that everything is parsed correctly before merging.
5869
labels: |
59-
automation
60-
70+
automation, auto-approve
71+
72+
- name: Wait for required checks
73+
if: steps.create-pr.outputs.pull-request-number
74+
run: |
75+
gh pr checks ${{ steps.create-pr.outputs.pull-request-number }} --watch
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GHA_ACTIONS_ALLOW_TOKEN }}
78+
79+
- name: Auto-approve PR
80+
if: steps.create-pr.outputs.pull-request-number
81+
run: |
82+
echo "Approving PR #${{ steps.create-pr.outputs.pull-request-number }}"
83+
gh pr review ${{ steps.create-pr.outputs.pull-request-number }} --approve
84+
echo "PR approved"
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GHA_APPROVAL_TOKEN }}
87+
88+
- name: Auto-merge PR
89+
if: steps.create-pr.outputs.pull-request-number
90+
run: |
91+
echo "Auto-merge PR #${{ steps.create-pr.outputs.pull-request-number }}"
92+
gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} \
93+
--auto \
94+
--squash \
95+
--delete-branch
96+
echo "Auto-merge completed"
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GHA_ACTIONS_ALLOW_TOKEN }}

0 commit comments

Comments
 (0)