diff --git a/.github/workflows/check-pr-target-branch.yml b/.github/workflows/check-pr-target-branch.yml new file mode 100644 index 0000000000000..8e4807ff288a6 --- /dev/null +++ b/.github/workflows/check-pr-target-branch.yml @@ -0,0 +1,16 @@ +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 \ No newline at end of file