Skip to content

Commit b3d8a6a

Browse files
committed
fix(ci): emit ::error to stdout so GitHub Actions surfaces the annotation
GitHub Actions only processes workflow commands (::error, ::warning, etc.) when they appear on stdout. The previous code wrote the ::error line inside a {...} >&2 block, sending it to stderr — the job still exited 1, but the red annotation linking back to the failing PR title never appeared in the Actions UI. Move the ::error to stdout and keep the long-form details on stderr. Caught by Greptile review on the sgp-typescript PR; applied to all 4 repos for consistency since the same pattern existed in each.
1 parent 2c4ff62 commit b3d8a6a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/lint-pr.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ jobs:
2828
exit 0
2929
fi
3030
31+
# The ::error workflow command must be written to stdout for GitHub Actions
32+
# to pick it up as an annotation. The supplementary detail goes to stderr so
33+
# it shows up in the log but not as an annotation.
34+
echo "::error title=Invalid PR title::PR title must follow Conventional Commits format. Got: $PR_TITLE"
3135
{
32-
echo "::error title=Invalid PR title::PR title must follow Conventional Commits format."
3336
echo " Got: $PR_TITLE"
3437
echo " Expected: <type>(<optional-scope>)(!): <subject>"
3538
echo " Types: feat, fix, docs, style, refactor, test, chore, ci, build, perf, revert"

0 commit comments

Comments
 (0)