Skip to content

Commit

Permalink
ci: validate feature PR target (#2831)
Browse files Browse the repository at this point in the history
* validate feature PR target


---------

Signed-off-by: Janek Nouvertné <[email protected]>
  • Loading branch information
provinzkraut authored Dec 3, 2023
1 parent 5b1dec4 commit 7979771
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pr-target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Validate PR target"

on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- main

permissions:
pull-requests: read

jobs:
main:
name: Validate PR target branch
runs-on: ubuntu-latest
steps:
- name: Check PR target
if: ${{ startsWith(github.event.pull_request.title, 'feat') }}
uses: actions/github-script@v3
with:
script: |
core.setFailed('Cannot merge feature type PR into main. Merge into a feature branch or develop')

0 comments on commit 7979771

Please sign in to comment.