Merge pull request #47682 from vvoland/ci-check-changelog-error
ci/validate-pr: Use `::error::` command to print errors
This commit is contained in:
commit
80572929e1
1 changed files with 3 additions and 3 deletions
6
.github/workflows/validate-pr.yml
vendored
6
.github/workflows/validate-pr.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
||||||
- name: Missing `area/` label
|
- name: Missing `area/` label
|
||||||
if: contains(join(github.event.pull_request.labels.*.name, ','), 'impact/') && !contains(join(github.event.pull_request.labels.*.name, ','), 'area/')
|
if: contains(join(github.event.pull_request.labels.*.name, ','), 'impact/') && !contains(join(github.event.pull_request.labels.*.name, ','), 'area/')
|
||||||
run: |
|
run: |
|
||||||
echo "Every PR with an \`impact/*\` label should also have an \`area/*\` label"
|
echo "::error::Every PR with an 'impact/*' label should also have an 'area/*' label"
|
||||||
exit 1
|
exit 1
|
||||||
- name: OK
|
- name: OK
|
||||||
run: exit 0
|
run: exit 0
|
||||||
|
@ -32,13 +32,13 @@ jobs:
|
||||||
desc=$(echo "$block" | awk NF)
|
desc=$(echo "$block" | awk NF)
|
||||||
|
|
||||||
if [ -z "$desc" ]; then
|
if [ -z "$desc" ]; then
|
||||||
echo "Changelog section is empty. Please provide a description for the changelog."
|
echo "::error::Changelog section is empty. Please provide a description for the changelog."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
len=$(echo -n "$desc" | wc -c)
|
len=$(echo -n "$desc" | wc -c)
|
||||||
if [[ $len -le 6 ]]; then
|
if [[ $len -le 6 ]]; then
|
||||||
echo "Description looks too short: $desc"
|
echo "::error::Description looks too short: $desc"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue