@@ -355,7 +355,7 @@ jobs:
355355 run : yarn cli build playground ${{ matrix.client.language }}
356356
357357 - name : Run Java 'algoliasearch' public API validation
358- if : ${{ github.base_ref == 'main' && matrix.client.language == 'java' && matrix.client.isMainVersion && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-bc]') }}
358+ if : ${{ github.base_ref == 'main' && matrix.client.language == 'java' && matrix.client.isMainVersion }}
359359 run : |
360360 cd ${{ matrix.client.path }}
361361 exit_code=0
@@ -367,7 +367,9 @@ jobs:
367367 cat $FILE
368368 fi
369369
370- exit $exit_code
370+ if [[ $exit_code -ne 0 ]]; then
371+ echo "hasBreakingChanges=true" >> $GITHUB_OUTPUT
372+ fi
371373
372374 - name : Remove previous CTS output
373375 run : rm -rf ${{ matrix.client.testsToDelete }} || true
@@ -586,12 +588,24 @@ jobs:
586588 GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
587589 PR_NUMBER : ${{ github.event.number }}
588590
591+ - name : Check for breaking changes
592+ id : breakingChanges
593+ if : ${{ needs.client_gen.outputs.hasBreakingChanges == 'true' }}
594+ run : |
595+ {
596+ echo 'BREAKING_CHANGES_SECTION<<EOF'
597+ echo "# 💥 Breaking changes detected !!""
598+ echo "either this PR or a previous PR not released yet introduced breaking changes, be careful when merging."
599+ echo 'EOF'
600+ } >> "$GITHUB_OUTPUT"
601+
589602 - name : update generation comment
590603 uses : marocchino/sticky-pull-request-comment@v2
591604 if : ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT == '' }}
592605 with :
593606 GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
594607 message : |
608+ ${{ steps.breakingChanges.outputs.BENCHMARK_SECTION }}
595609 ### No code generated
596610
597611 _If you believe code should've been generated, please, [report the issue](https://github.com/algolia/api-clients-automation/issues/new?assignees=&labels=bug%2Ctriage&projects=&template=Bug_report.yml&title=%5Bbug%5D%3A+)._
@@ -604,6 +618,7 @@ jobs:
604618 with :
605619 GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
606620 message : |
621+ ${{ steps.breakingChanges.outputs.BENCHMARK_SECTION }}
607622 ### ✔️ Code generated!
608623
609624 | Name | Link |
0 commit comments