Skip to content

Show the last completed ci.yml run in the profile Status column - #229

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/ktsubuild-161-completed-runs
Oct 8, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/ktsubuild-161-completed-runs

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #161

What changed

GitHubApiClient.GetLatestWorkflowRunAsync now adds &status=completed to the workflow-runs query. Before this change, when a repository's newest ci.yml run on main was still queued or in progress at the time the profile README job ran, the API returned that run with conclusion: null, and the Status badge read unknown until the next regeneration. It now shows the result of the most recent run that finished.

This is the change the maintainer approved on the issue. The optional explicit labels for skipped, timed_out and similar are left out.

Tests

GetLatestWorkflowRunAsync_SkipsRunsThatHaveNotCompleted uses a fake gh api that returns an in-progress run when the query has no status=completed, and a completed failure run when it does. The test checks that the client reports the failure.

With the fix reverted, the new test fails. With the fix in place, the full suite passes (765/765).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WyG38ppCkkDDCmkSnea826


Generated by Claude Code

GetLatestWorkflowRunAsync asked for the newest run without a status filter,
so a queued or in-progress run came back with no conclusion and the badge
read "unknown" until the next regeneration. The query now asks only for
completed runs.

Fixes #161

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WyG38ppCkkDDCmkSnea826
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit c8dac8a into main Oct 8, 2026
14 checks passed
@matt-edmondson
matt-edmondson deleted the claude/ktsubuild-161-completed-runs branch October 8, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile README Status badge shows "unknown" for any repo whose latest ci.yml run is still queued or in progress

2 participants