element-web-Github/.github/workflows/pull_request_base_branch.yaml
renovate[bot] 8bf3ec8376
Update dependency ubuntu to v24 (#28447)
* Update dependency ubuntu to v24

* Update end-to-end-tests.yaml

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-11-13 11:13:02 +00:00

17 lines
593 B
YAML

name: Pull Request Base Branch
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
check_base_branch:
name: Check PR base branch
runs-on: ubuntu-24.04
steps:
- uses: actions/github-script@v7
with:
script: |
const baseBranch = context.payload.pull_request.base.ref;
if (!['develop', 'staging'].includes(baseBranch) && !baseBranch.startsWith('feat/')) {
core.setFailed(`Invalid base branch: ${baseBranch}`);
}