mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-02 12:07:34 +00:00
bd6241ad9d
Skip upstream deploy/publish/release, org automation, translations and PR previews via a repo guard; allow PRs to release/* base branches.
22 lines
818 B
YAML
22 lines
818 B
YAML
name: Pull Request Base Branch
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, synchronize]
|
|
permissions: {} # No permissions required
|
|
jobs:
|
|
check_base_branch:
|
|
name: Check PR base branch
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
|
|
with:
|
|
script: |
|
|
const baseBranch = context.payload.pull_request.base.ref;
|
|
if (
|
|
!['develop', 'staging'].includes(baseBranch) &&
|
|
!baseBranch.startsWith('feat/') &&
|
|
!baseBranch.startsWith('release/')
|
|
) {
|
|
core.setFailed(`Invalid base branch: ${baseBranch}`);
|
|
}
|