Skip to content

Commit

Permalink
Added step to calculate amount of labels
Browse files Browse the repository at this point in the history
  • Loading branch information
stoftot authored Sep 19, 2024
1 parent 18095bf commit 0b11c2a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/check for lable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ jobs:
echo "PR_LABELS=$PR_LABELS" >> $GITHUB_ENV
echo "Labels fetched: $PR_LABELS"
- name: Calculate number of labels
run: |
LABEL_COUNT=$(echo "$PR_LABELS" | awk -F',' '{print NF}')
echo "LABEL_COUNT=$LABEL_COUNT" >> $GITHUB_ENV
- name: Contains lable
if: ${{ env.LABEL_COUNT == '0' }}
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
echo "The pull request needs a lable."
exit 1 #This fails the action
- name: Check if pull request is up to standart

- name: Check if pull request labels combination is okay

0 comments on commit 0b11c2a

Please sign in to comment.