1010 backwards-compatibility-check :
1111 name : Breaking Change Detector
1212 runs-on : ubuntu-latest
13+ if : ${{ !contains(github.event.pull_request.body, 'BREAKING_CHANGE_REASON=') }}
1314 steps :
1415 - uses : actions/checkout@v7
1516 with :
@@ -18,24 +19,23 @@ jobs:
1819 uses : shivammathur/setup-php@v2
1920 with :
2021 php-version : " 8.1"
21- - name : " Ensure that branch is up to date with main branch"
22+ - name : " Rebase PR branch onto main branch"
2223 if : github.event.pull_request.user.login != 'release-please[bot]'
2324 run : |
24- if ! git merge-base --is-ancestor origin/main ${{ github.event.pull_request.head.sha }}; then
25- echo "PR branch is out of date with main. Please merge or rebase main into your branch to avoid false BC break detections."
25+ git config user.name "Github Actions"
26+ git config user.email "actions@github.com"
27+ git checkout ${{ github.event.pull_request.head.sha }}
28+ if ! git rebase origin/main; then
29+ echo "Failed to rebase PR branch onto main. There may be conflicts. Please resolve conflicts or rebase manually."
2630 exit 1
2731 fi
2832 - name : " Install dependencies"
2933 run : composer global require "roave/backward-compatibility-check:^8.2"
3034 - name : " Check for BC breaks"
3135 if : github.event.pull_request.user.login != 'release-please[bot]'
32- # Ensure the build still passes by adding BREAKING_CHANGE_REASON=[reason] to the PR description.
33- continue-on-error : ${{ contains(github.event.pull_request.body, 'BREAKING_CHANGE_REASON=') }}
3436 run : |
3537 ~/.composer/vendor/bin/roave-backward-compatibility-check --from=origin/main --format=github-actions
3638 - name : " Check for BC label"
37- # Ensure the build still passes by adding BREAKING_CHANGE_REASON=[reason] to the PR description.
38- continue-on-error : ${{ contains(github.event.pull_request.body, 'BREAKING_CHANGE_REASON=') }}
3939 run : |
4040 if [[ "true" == "${{ contains(github.event.pull_request.title, '!:') }}" ]]; then
4141 echo "Breaking change label found in PR title"
0 commit comments