Skip to content

Commit

Permalink
check actual char count in check description linter
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanctech committed Jul 25, 2024
1 parent 4274cbe commit 8aa417f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pr-desc-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
# Extract contents
# Extract contents
what_changed=$(echo "$pr_description" | sed -n -e '/\*What was changed?\*/,/\*/p' | sed '$d' | sed '1d')
why_changed=$(echo "$pr_description" | sed -n -e '/\*Why was it changed?\*/,/\*/p' | sed '$d' | sed '1d')
how_changed=$(echo "$pr_description" | sed -n -e '/\*How was it changed?\*/,/\*/p' | sed '$d' | sed '1d')
testing_done=$(echo "$pr_description" | sed -n -e '/\*What testing was done for the changes?\*/,/\*/p' | sed '$d' | sed '1d')
what_changed=$(echo "$pr_description" | sed -n -e '/\*What was changed?\*/,/\*/p' | wc -c)
why_changed=$(echo "$pr_description" | sed -n -e '/\*Why was it changed?\*/,/\*/p' | wc -c)
how_changed=$(echo "$pr_description" | sed -n -e '/\*How was it changed?\*/,/\*/p' | wc -c)
testing_done=$(echo "$pr_description" | sed -n -e '/\*What testing was done for the changes?\*/,/\*/p' | wc -c)
if [[ ${#what_changed} -lt $MIN_CHARS ]]; then
echo "PR description for what changed section is either missing or too short."
Expand Down

0 comments on commit 8aa417f

Please sign in to comment.