forked from PrestaShop/PrestaShop
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (22 loc) · 790 Bytes
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Pull Request Validator
on: pull_request
jobs:
message-check:
name: Block Merge Commits
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ github.token }}
- name: Check is merge PR
id: check-is-merge
run: |
if [[ ${{ toJSON(github.event.pull_request.body) }} =~ \|?[[:space:]]*Category\?[[:space:]]*\|[[:space:]]*ME([[:space:]]|(\\[rn]))+ ]]; then
echo ::set-output name=isMerge::true
fi
- name: Block Merge Commits
if: steps.check-is-merge.outputs.isMerge != 'true'
uses: Morishiri/block-merge-commits-action@v1.0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}