chore(deps): bump org.mockito:mockito-bom from 5.16.1 to 5.19.0 #175
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
| # SPDX-License-Identifier: Apache-2.0 | |
| # © Crown Copyright 2025. This work has been developed by the National Digital Twin Programme and is legally attributed to the Department for Business and Trade (UK) as the governing entity. | |
| name: GitFlow - PR Target Check | |
| on: | |
| pull_request: | |
| types: [ opened, synchronize, reopened, edited ] | |
| jobs: | |
| pr-target-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check merge target | |
| run: | | |
| BASE_BRANCH="${{ github.base_ref }}" | |
| HEAD_BRANCH="${{ github.head_ref }}" | |
| # Allow merging feature, hotfix, or bugfix into develop | |
| if [[ "$HEAD_BRANCH" =~ ^(feature/|hotfix/|bugfix/) && "$BASE_BRANCH" == "develop" ]]; then | |
| echo "✅ Allowed: $HEAD_BRANCH → $BASE_BRANCH" | |
| exit 0 | |
| fi | |
| # Verify Dependabot branches | |
| if [[ "$HEAD_BRANCH" =~ ^(dependabot/) && "$BASE_BRANCH" == "develop" ]]; then | |
| echo "✅ Not GitFlow but allowed: $HEAD_BRANCH → $BASE_BRANCH" | |
| exit 0 | |
| fi | |
| # Allow merging release into main | |
| if [[ "$HEAD_BRANCH" =~ ^release/.*$ && "$BASE_BRANCH" == "main" ]]; then | |
| echo "✅ Allowed: $HEAD_BRANCH → $BASE_BRANCH" | |
| exit 0 | |
| fi | |
| # If none of the above conditions match, block the PR | |
| echo "❌ Error: Invalid PR - '$HEAD_BRANCH' cannot be merged into '$BASE_BRANCH'." | |
| echo "✅ Allowed merges:" | |
| echo " - feature/*, hotfix/*, bugfix/* → develop" | |
| echo " - release/* → main" | |
| exit 1 |