Skip to content

Commit

Permalink
added old script back and triger event on reopen as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Esh07 committed Sep 19, 2023
1 parent e0bf7d5 commit 48a4c50
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/auto-pr-merge.yml
@@ -1,18 +1,18 @@
name: Auto-merge PRs
on:
pull_request_target:
types: [opened, synchronize]
types: [opened, synchronize, reopened]
paths:
- 'Contributors.md' # <- only run if only contributors file changed
- "Contributors.md" # <- only run if only contributors file changed

jobs:
auto-merge:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write

steps:
# Check out the repository code
- name: Checkout code
Expand All @@ -31,7 +31,7 @@ jobs:
FILES_CHANGED=$(echo $PR_FILES | tr '\n' ' ')
echo "files_changed=$FILES_CHANGED" >> $GITHUB_ENV
if [[ "${FILES_CHANGED// /}" == "Contributors.md" ]]; then
echo "only_contributors=true" >> $GITHUB_ENV
Expand All @@ -55,7 +55,7 @@ jobs:
echo "one_line_change=false" >> $GITHUB_ENV
fi
# Merge the pull request if it only modifies the Contributors.md file or if it fail to do then drop failure message as post
# Merge the pull request if it only modifies the Contributors.md file or if it fail to do then drop failure message as post
- name: Merge PR
id: merge_pr
if: env.only_contributors == 'true' && env.one_line_change == 'true'
Expand Down Expand Up @@ -213,5 +213,5 @@ jobs:
body: body
});
}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 48a4c50

Please sign in to comment.