mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-08 03:27:04 +09:00

There are some `on pull_request_target types` in the label checking yml files that were removed but they are actually necessary, so the labeler keeps working after for example: pushing new commits, pressing the update the branch, closing and opening the PR.
25 lines
688 B
YAML
25 lines
688 B
YAML
name: check-no-merge-label
|
|
|
|
permissions:
|
|
pull-requests: read
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, edited, reopened, labeled, unlabeled, synchronize]
|
|
branches:
|
|
- 'release/**'
|
|
|
|
jobs:
|
|
check-labels:
|
|
if: github.repository == 'dotnet/runtime'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check 'NO-MERGE' label
|
|
run: |
|
|
echo "Merging permission is disabled when the 'NO-MERGE' label is applied."
|
|
if [ "${{ contains(github.event.pull_request.labels.*.name, 'NO-MERGE') }}" = "false" ]; then
|
|
exit 0
|
|
else
|
|
echo "::error:: The 'NO-MERGE' label was applied to the PR. Merging is disabled."
|
|
exit 1
|
|
fi
|