Skip to content

Commit

Permalink
Merge pull request #276 from UKGovernmentBEIS/PC-1045-add-yml-file-to…
Browse files Browse the repository at this point in the history
…-check-for-label-when-PR-targeting-main

PC-1045: add yml file to check for label when PR targeting main
  • Loading branch information
Glenn-Clarke authored Apr 30, 2024
2 parents f69bb29 + af5163e commit 04c0d07
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main-label-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: main_label_check

on:
pull_request:
types: [opened, edited, labeled, unlabeled]

jobs:
label_check:
runs-on: ubuntu-latest
steps:
- name: Fail if no "production release" label is present while targeting main
if: ${{github.event.pull_request.base.ref == 'main' && !contains(github.event.pull_request.labels.*.name, 'production release')}}
uses: actions/github-script@v3
with:
script: |
core.setFailed("Label is missing: add a 'production release' label in order to merge to main")

0 comments on commit 04c0d07

Please sign in to comment.