chore: check the target branch when pr is opened/edited #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check PR Target Branch | |
| on: | |
| pull_request: | |
| types: [opened, edited] | |
| jobs: | |
| check-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if PR targets latest branch | |
| run: | | |
| if [ "${{ github.base_ref }}" != "latest" ]; then | |
| echo "::warning::This PR is targeting '${{ github.base_ref }}' branch instead of 'latest'" | |
| echo "Consider changing the base branch to 'latest' unless this is intentional" | |
| fi |