You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Composite action 'Resolve cora-cli version' step crashes with KeyError on API failure #102
The composite action step "Resolve cora-cli version" in .github/actions/cora-review/action.yml crashes with KeyError: 'tag_name' when the GitHub API request to api.github.com/repos/ajianaz/cora-cli/releases/latest fails or returns unexpected data.
curl -sL without -f — silently accepts HTTP error pages (404, 403, 429 rate limit). curl returns the HTML error body, not JSON.
No error handling — if the API response is not JSON (rate limit HTML, network error), json.load() will either throw json.JSONDecodeError or succeed but ["tag_name"] throws KeyError.
No retry — single attempt, no fallback.
Steps to Reproduce
Trigger a PR on any repo using the cora-review composite action
If GitHub API rate limits or returns non-JSON response, the step crashes
Graceful fallback: if API fails, use a hardcoded fallback version or retry
Step should not crash the entire CI pipeline
Suggested Fix
if [ "${{ inputs.cora-version }}"="latest" ];then# Try up to 3 times with 5s delayforiin 1 2 3;do
VERSION=$(curl -sfL --retry 3 --retry-delay 2 --connect-timeout 10 \ https://api.github.com/repos/ajianaz/cora-cli/releases/latest \| python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('tag_name', ''))"2>/dev/null)if [ -n"$VERSION" ];thenbreakfiecho"Attempt $i failed, retrying..."
sleep 5
done# Fallback to a known good version if all retries failif [ -z"$VERSION" ];thenecho"::warning::Failed to resolve latest cora-cli version from GitHub API, using fallback"
VERSION="v0.1.6"# Update this as new releases shipfielse
VERSION="${{ inputs.cora-version }}"fiecho"VERSION=$VERSION">>"$GITHUB_OUTPUT"echo"Resolved cora-cli version: $VERSION"
Severity
High — breaks CI on any repo using the composite action when GitHub API is rate-limited or returns errors.
Environment
Composite action: .github/actions/cora-review/action.yml (used in uteke, cora-cli itself)
Activity
ajianaz commentedon Jun 1, 2026
Closed in v0.1.7 release