Skip to content

Commit

Permalink
Added check to see if the pull request contains a lable
Browse files Browse the repository at this point in the history
  • Loading branch information
stoftot authored Sep 19, 2024
1 parent 6ef24c1 commit 18095bf
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/check for lable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ jobs:
check-lables:
runs-on: ubuntu-latest

steps:
steps:
- name: Get PR labels
id: get_labels
run: |
PR_LABELS="${{ join(github.event.pull_request.labels.*.name, ',') }}"
echo "PR_LABELS=$PR_LABELS" >> $GITHUB_ENV
echo "Labels fetched: $PR_LABELS"
- name: Contains lable
run: |
if [ -z "$PR_LABELS" ]; then # cehcks if PR_LABLES length is zero
echo "The pull request needs a lable."
exit 1 #This fails the action
fi
- name: Check if pull request is up to standart

0 comments on commit 18095bf

Please sign in to comment.