Skip to content

Commit

Permalink
Update short-titles.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sddilora authored Apr 17, 2024
1 parent 869a371 commit cd0ab69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/short-titles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
title=$(jq -r '.issue.title' "$GITHUB_EVENT_PATH")
title_length=${#title}
if [ "$title_length" -ge 40 ]; then
echo "::error::Title length should be less than 40 characters."
echo "::error::Issue title length should be less than 40 characters."
exit 1
fi
elif [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
title=$(jq -r '.pull_request.title' "$GITHUB_EVENT_PATH")
title_length=${#title}
if [ "$title_length" -ge 40 ]; then
echo "::error::Title length should be less than 40 characters."
echo "::error::Pull request title length should be less than 40 characters."
exit 1
fi
fi
Expand All @@ -43,4 +43,5 @@ jobs:
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.issue.number }} # or ${{ github.event.pull_request.number }}
NUMBER: ${{ github.event.issue.number }} # For issues
# NUMBER: ${{ github.event.pull_request.number }} # For pull requests

0 comments on commit cd0ab69

Please sign in to comment.