mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
ci(commit_checks): explain PR title failure when no comment is posted (#29816)
* ci(commit_checks): render the PR title report in the job summary for forks On PRs from forks, CI cannot post comments directly. When the PR title does not satisfy conventional commits, a CI error refers to a PR comment that did not exist. Fix: Output the content of the comment in case of fork PRs - In the action summary, properly rendered like the real comment - In the job log, as plain text --------- Signed-off-by: Balduin <balduin@auterion.com>
This commit is contained in:
1 parent
dc7b9011cb
commit
4742fdbb2e
2 files changed
+8
-3
No files matched your search
@@ -53,7 +53,12 @@ jobs:
|
||||
- name: Result
|
||||
if: steps.check.outputs.exit_code != '0'
|
||||
run: |
|
||||
echo "::error::PR title does not follow conventional commits format. See the PR comment for details."
|
||||
if [ "$IS_FORK" = "true" ]; then
|
||||
# Output the entire content of the comment on the job log as a substitute for the comment.
|
||||
tee -a "$GITHUB_STEP_SUMMARY" < comment.md
|
||||
else
|
||||
echo "::error::PR title does not follow conventional commits format. See the PR comment for details."
|
||||
fi
|
||||
exit 1
|
||||
|
||||
pr-body:
|
||||
|
||||
Reference in new issue
Block a user