Skip to content

Feature/add cas to hmi#96

Open
samuelh-f wants to merge 3 commits into
performance-improvementsfrom
feature/add-cas-to-hmi
Open

Feature/add cas to hmi#96
samuelh-f wants to merge 3 commits into
performance-improvementsfrom
feature/add-cas-to-hmi

Conversation

@samuelh-f

Copy link
Copy Markdown

No description provided.

@samuelh-f samuelh-f requested a review from AlvaroSierra June 17, 2026 13:12
@samuelh-f samuelh-f self-assigned this Jun 17, 2026
@samuelh-f samuelh-f requested a review from a team June 17, 2026 13:12
@samuelh-f samuelh-f changed the base branch from main to performance-improvements June 17, 2026 13:13
- name: Check branches
shell: bash
run: |
head_ref="${{ github.head_ref }}"
Comment on lines +12 to +46
runs-on: ubuntu-slim
steps:
- name: Check branches
shell: bash
run: |
head_ref="${{ github.head_ref }}"
base_ref="${{ github.base_ref }}"
is_fork="${{ github.event.pull_request.head.repo.full_name != github.repository }}"

if [[ "$base_ref" == "main" ]]; then
# Allow hotfix/* from anywhere (including forks)
if [[ "$head_ref" == hotfix/* ]]; then
echo "Allowed: hotfix branch ($head_ref) into main (fork=$is_fork)."
exit 0
fi

# Allow dev only when NOT from a fork
if [[ "$head_ref" == "dev" ]]; then
if [[ "$is_fork" == "true" ]]; then
echo "Denied: dev branch PRs into main cannot come from forks."
echo "This PR is from fork repo: ${{ github.event.pull_request.head.repo.full_name }}"
echo "Branch: $head_ref -> $base_ref"
exit 1
fi

echo "Allowed: dev branch ($head_ref) into main from same repo."
exit 0
fi

# Otherwise deny
echo "Denied: Merge requests to main are only allowed from dev (same repo only) or hotfix/* (forks allowed)."
echo "This PR is from: $head_ref -> $base_ref"
echo "Fork PR: $is_fork"
exit 1
fi
@samuelh-f samuelh-f removed the request for review from a team June 17, 2026 13:14
@samuelh-f samuelh-f requested a review from marccthomas June 22, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants