Skip to content

fix: commit status reporting#37381

Closed
Copilot wants to merge 1 commit intorelease/v1.26from
copilot/backport-commit-8e85454
Closed

fix: commit status reporting#37381
Copilot wants to merge 1 commit intorelease/v1.26from
copilot/backport-commit-8e85454

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Backport of 8e85454 onto release/v1.26.

Summary

Fixes the issue where the commit status always shows "Waiting to run" even when the job has already started running.

The root cause: Waiting and Running both map to CommitStatusPending, so the previous deduplication check (v.State == state) would find an existing "Waiting to run" status with state pending and skip creating a new "Has started running" entry.

Fix: Change the deduplication check to compare State, TargetURL, and Description — so transitions between sub-states that share the same commit status state (e.g. Waiting → Running, both pending) still produce a new commit status entry.

Changes

  • services/actions/commit_status.go: Compute targetURL and description before the dedup check; widen dedup condition to include all three fields; extract toCommitStatusDescription helper; remove unused strconv import.
  • services/actions/commit_status_test.go: New test TestCreateCommitStatus_Dedupe verifying correct dedup behaviour across Waiting → Running → Running (no-op) → Success transitions.

Backport of 8e85454

Fixes the issue that status report always shows "waiting to run" when
already running, by comparing state, targetURL, and description (not
just state) in the deduplication check.

Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (claude-sonnet-4-5) <noreply@anthropic.com>

Agent-Logs-Url: https://github.com/go-gitea/gitea/sessions/1b315e9f-698c-4564-9ffa-aac1b9cb1692

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 23, 2026
@GiteaBot GiteaBot added this to the 1.26.1 milestone Apr 23, 2026
Copilot AI requested a review from silverwind April 23, 2026 07:46
@silverwind silverwind marked this pull request as ready for review April 23, 2026 07:46
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 23, 2026
@silverwind silverwind changed the title fix: commit status reporting (backport #37372 to release/v1.26) fix: commit status reporting Apr 23, 2026
@silverwind silverwind closed this Apr 23, 2026
@GiteaBot GiteaBot removed this from the 1.26.1 milestone Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants