Skip to content

Feat/integerfactoring #635

Feat/integerfactoring

Feat/integerfactoring #635

Workflow file for this run

name: block-pr
on:
pull_request:
types: [opened, synchronize, reopened, edited]
branches:
- main
- develop
jobs:
reject_pr_job:
runs-on: ubuntu-latest
if: (
github.event.pull_request.head.ref != 'develop' &&
github.event.pull_request.base.ref == 'main'
) ||
(
github.event.pull_request.head.ref == 'main' &&
github.event.pull_request.base.ref == 'develop'
)
steps:
- name: Check branch name
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo $GITHUB_HEAD_REF
ACTOR=$(echo "$GITHUB_CONTEXT" | jq -r '.actor')
echo "Actor: $ACTOR"
if [ $GITHUB_HEAD_REF != "develop" ]; then
echo "Pull request not allowed from branch $GITHUB_HEAD_REF. Only pull requests from the develop branch are allowed."
exit 1
fi