imbajin commented on code in PR #354:
URL:
https://github.com/apache/hugegraph-computer/pull/354#discussion_r3582821272
##########
.github/workflows/rerun-ci.yml:
##########
@@ -94,7 +94,7 @@ jobs:
action="skip"
reason="missing head repository metadata"
else
- latest_head_sha="$(gh api "repos/$HEAD_REPOSITORY/commits" -f
sha="$HEAD_BRANCH" -F per_page=1 --jq '.[0].sha' 2>/dev/null || true)"
+ latest_head_sha="$(gh api --method GET
"repos/$HEAD_REPOSITORY/commits" -f sha="$HEAD_BRANCH" -F per_page=1 --jq
'.[0].sha')"
Review Comment:
⚠️ This removes the failure guard from a command substitution that runs
under `set -euo pipefail`. When the source branch has been deleted or is
inaccessible, this GET returns HTTP 404 with exit code 1, so the step exits
here and never reaches the intended `action="skip"` / `reason="head branch no
longer available"` handling below. Please keep `--method GET`, but capture the
command failure explicitly (for example with an `if ! latest_head_sha="$(...)";
then ... fi`) and convert the expected branch-gone case into a safe skip
without allowing the error response into `$GITHUB_OUTPUT`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]