Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflow/auto-pr-merge.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/auto-pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto Merge Contributor PRs

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: write
pull-requests: write

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check only Contributors.md was modified
id: check-files
run: |
CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
echo "Changed files: $CHANGED"
if [ "$CHANGED" = "Contributors.md" ]; then
echo "valid=true" >> $GITHUB_OUTPUT
else
echo "valid=false" >> $GITHUB_OUTPUT
echo "PR modifies files other than Contributors.md — skipping auto-merge."
fi

- name: Auto-merge PR
if: steps.check-files.outputs.valid == 'true'
run: gh pr merge --squash "${{ github.event.pull_request.number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}