@@ -13,8 +13,7 @@ permissions:
1313jobs :
1414 add-trailers-and-merge :
1515 if : |
16- github.event.pull_request.merged == true &&
17- startsWith(github.event.pull_request.base.ref, 'main-pr')
16+ github.event.pull_request.merged == true
1817 runs-on : ubuntu-latest
1918 permissions :
2019 contents : write
2524 with :
2625 egress-policy : audit
2726
27+ name : Exit if PR is not rebaseable
28+ if : ${{ github.event.pull_request.rebaseable != null && github.event.pull_request.rebaseable == false }}
29+ run : exit 1
30+
2831 - name : Check out repo
2932 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3033 with :
3942 private-key : ${{ secrets.URUNC_BOT_PRIVATE_KEY }}
4043
4144 - name : Append git trailers
42- uses : nubificus/git-trailers@e3cefe03237a8a33f12ee41a8194bfb03a4d179b # fix_auto_merge
45+ uses : nubificus/git-trailers@18fd322f3fbfd505b4de728974a4ac1f32f758a7
4346 with :
4447 user_info : .github/contributors.yaml
4548
@@ -48,24 +51,13 @@ jobs:
4851 GH_TOKEN : ${{ steps.generate-token.outputs.token }}
4952 PR_BRANCH : ${{ github.event.pull_request.base.ref }}
5053 run : |
51- PR_NUMBER=${PR_BRANCH#main-pr}
52-
53- # Use GitHub's API to get issues referenced with closing keywords
54- CLOSING_ISSUES=$(gh pr view "$PR_NUMBER" --json closingIssuesReferences \
55- --jq '.closingIssuesReferences[].number' || true)
56-
57- BODY="This PR was automatically created by GitHub Actions to merge changes from $PR_BRANCH into main."
58- if [ -n "$CLOSING_ISSUES" ]; then
59- while IFS= read -r issue; do
60- BODY="$BODY"$'\n'"Closes #$issue"
61- done <<< "$CLOSING_ISSUES"
62- fi
54+ PR_BRANCH=${{ github.event.pull_request.base.ref }}
6355
6456 # Create the pull request
6557 PR_URL=$(gh pr create \
6658 --head "$PR_BRANCH" \
6759 --base main \
6860 --title "Merge External PR: Merge $PR_BRANCH into main" \
69- --body "$BODY ")
61+ --body "This PR was automatically created by GitHub Actions to merge changes from $PR_BRANCH into main. ")
7062
7163 gh pr merge "$PR_URL" --rebase --admin --delete-branch
0 commit comments