Be/adding hooks #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Label Checker | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
jobs: | |
label-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for Labels | |
uses: actions/github-script@v4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const pr = context.payload.pull_request; | |
if (pr.labels.length === 0) { | |
core.setFailed("PR must have at least one label."); | |
} |