Skip to content

fix: commit status reporting#37372

Merged
silverwind merged 7 commits intogo-gitea:mainfrom
bircni:show-popup-message
Apr 22, 2026
Merged

fix: commit status reporting#37372
silverwind merged 7 commits intogo-gitea:mainfrom
bircni:show-popup-message

Conversation

@bircni
Copy link
Copy Markdown
Member

@bircni bircni commented Apr 22, 2026

Fixes the issue that status report always shows waiting to run, when already running

#36906 (comment)

- Simplified context name generation by combining string formatting and trimming into a single line.
- Enhanced error handling for fetching the latest commit status.
- Updated the logic to check for existing commit statuses, ensuring that updates only occur when necessary.
- Refactored the `toCommitStatusDescription` function to return descriptions directly instead of using a variable.
- Added a new integration test to verify that commit status descriptions update correctly during job execution.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 22, 2026
@bircni bircni marked this pull request as ready for review April 22, 2026 19:06
Comment thread tests/integration/actions_job_test.go Outdated
@wxiaoguang wxiaoguang marked this pull request as draft April 22, 2026 19:18
@bircni bircni requested a review from wxiaoguang April 22, 2026 19:23
@bircni bircni marked this pull request as ready for review April 22, 2026 19:39
@bircni bircni requested a review from lunny April 22, 2026 19:39
@bircni
Copy link
Copy Markdown
Member Author

bircni commented Apr 22, 2026

I think this would be good to bring into 1.26 also @lunny

@bircni bircni added the backport/v1.26 This PR should be backported to Gitea 1.26 label Apr 22, 2026
@bircni bircni requested a review from silverwind April 22, 2026 20:13
@silverwind
Copy link
Copy Markdown
Member

Doing some cleanups

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@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 22, 2026
@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 22, 2026

Cleanups done in fbb3561, less code and added 1 test.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 22, 2026
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 22, 2026
@silverwind silverwind enabled auto-merge (squash) April 22, 2026 20:59
@silverwind silverwind merged commit 8e85454 into go-gitea:main Apr 22, 2026
26 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone Apr 22, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 22, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 23, 2026
* main:
  fix: commit status reporting (go-gitea#37372)
  Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356)
  Fix cmd tests by mocking builtin paths (go-gitea#37369)
  chore: upgrade Go version in devcontainer image to 1.26 (go-gitea#37374)
  Fix button layout shift when collapsing file tree in editor (go-gitea#37363)
  Update `Block a user` form (go-gitea#37359)
  Remove IsValidExternalURL/IsAPIURL and use IsValidURL at call sites (go-gitea#37364)
@lunny
Copy link
Copy Markdown
Member

lunny commented Apr 23, 2026

@GiteaBot please backport

@wxiaoguang
Copy link
Copy Markdown
Contributor

You should know that GiteaBot doesn't work this way. You have tried many times, and it has been explained many times.

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 23, 2026

Giteabot is very unreliable. Sometimes it backports immediately, sometimes it doesn't even after many hours. No one knows because there are no public-visible logs. I thought @lunny wanted to rewrite it as an action but apparently it was abandoned or something.

Copilot can also backport but the last few times I tried that, it targeted the wrong branch, but I will try one more time.

@bircni bircni deleted the show-popup-message branch April 23, 2026 07:36
@bircni
Copy link
Copy Markdown
Member Author

bircni commented Apr 23, 2026

@silverwind could you? I am not on my pc rn

@silverwind
Copy link
Copy Markdown
Member

copilot is on it. my problem with earlier attempts was i didn't select the branch here, now I did:

image

Copilot AI added a commit that referenced this pull request Apr 23, 2026
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>
@silverwind
Copy link
Copy Markdown
Member

#37381

@silverwind
Copy link
Copy Markdown
Member

BTW the same fix was done by me also in #37206, which is still looking for review. This change here is more focused, thought.

@wxiaoguang
Copy link
Copy Markdown
Contributor

Giteabot is very unreliable. Sometimes it backports immediately, sometimes it doesn't even after many hours. No one knows because there are no public-visible logs

It is designed that way, you all have been taught many times: it is only triggered when there is a push event on main branch.

You can refactor it to a new approach, but not just keeping reiterating the same questions and complains again and again.

Why you never spend some time on studying the problem but just waste time? GiteaBot/gitea-backporter#143

silverwind added a commit to silverwind/gitea that referenced this pull request Apr 23, 2026
* origin/main: (32 commits)
  fix: commit status reporting (go-gitea#37372)
  Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356)
  Fix cmd tests by mocking builtin paths (go-gitea#37369)
  chore: upgrade Go version in devcontainer image to 1.26 (go-gitea#37374)
  Fix button layout shift when collapsing file tree in editor (go-gitea#37363)
  Update `Block a user` form (go-gitea#37359)
  Remove IsValidExternalURL/IsAPIURL and use IsValidURL at call sites (go-gitea#37364)
  Add URL to `Learn more about blocking a user` (go-gitea#37355)
  fix: use TriggerEvent instead of Event in workflow runs API response for scheduled runs (go-gitea#37288)
  Add event.schedule context for schedule actions task (go-gitea#37320)
  Fix typos (go-gitea#37346)
  Fix an issue where changing an organization’s visibility caused problems when users had forked its repositories. (go-gitea#37324)
  Fail vite build on rolldown warnings via NODE_ENV=test (go-gitea#37270)
  Use modern "git update-index --cacheinfo" syntax to support more file names (go-gitea#37338)
  Fix URL related escaping for oauth2 (go-gitea#37334)
  When the requested arch rpm is missing fall back to noarch (go-gitea#37236)
  Fix `relative-time` error and improve global error handler (go-gitea#37241)
  Enhance styling in actions page (go-gitea#37323)
  fix(oauth): Error on auth sources with spaces (go-gitea#37327)
  Fix actions concurrency groups cross-branch leak (go-gitea#37311)
  ...

# Conflicts:
#	services/actions/commit_status.go
@a1012112796
Copy link
Copy Markdown
Member

looks gitea bot use milestones to detech active gitea main versions. maybe we can add github action to auto manage milestones and backport labels. when new release brach created or new tag created, it can do these things:

  • create milestone for next version and close old milestone
  • create new backport labels and rename the labels which not needed in future.

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 23, 2026

I think giteabot is a dead end for backporting without capability to resolve merge conflicts itself. Just use Copilot or any other AI assitance for simple tasks like backport, even the dumbest models will get these right.

silverwind added a commit to silverwind/gitea that referenced this pull request Apr 23, 2026
* origin/main: (204 commits)
  fix: commit status reporting (go-gitea#37372)
  Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356)
  Fix cmd tests by mocking builtin paths (go-gitea#37369)
  chore: upgrade Go version in devcontainer image to 1.26 (go-gitea#37374)
  Fix button layout shift when collapsing file tree in editor (go-gitea#37363)
  Update `Block a user` form (go-gitea#37359)
  Remove IsValidExternalURL/IsAPIURL and use IsValidURL at call sites (go-gitea#37364)
  Add URL to `Learn more about blocking a user` (go-gitea#37355)
  fix: use TriggerEvent instead of Event in workflow runs API response for scheduled runs (go-gitea#37288)
  Add event.schedule context for schedule actions task (go-gitea#37320)
  Fix typos (go-gitea#37346)
  Fix an issue where changing an organization’s visibility caused problems when users had forked its repositories. (go-gitea#37324)
  Fail vite build on rolldown warnings via NODE_ENV=test (go-gitea#37270)
  Use modern "git update-index --cacheinfo" syntax to support more file names (go-gitea#37338)
  Fix URL related escaping for oauth2 (go-gitea#37334)
  When the requested arch rpm is missing fall back to noarch (go-gitea#37236)
  Fix `relative-time` error and improve global error handler (go-gitea#37241)
  Enhance styling in actions page (go-gitea#37323)
  fix(oauth): Error on auth sources with spaces (go-gitea#37327)
  Fix actions concurrency groups cross-branch leak (go-gitea#37311)
  ...

# Conflicts:
#	web_src/js/index-domready.ts
#	web_src/js/markup/content.ts
#	web_src/js/markup/refissue.ts
silverwind added a commit to silverwind/gitea that referenced this pull request Apr 23, 2026
* origin/main: (204 commits)
  fix: commit status reporting (go-gitea#37372)
  Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356)
  Fix cmd tests by mocking builtin paths (go-gitea#37369)
  chore: upgrade Go version in devcontainer image to 1.26 (go-gitea#37374)
  Fix button layout shift when collapsing file tree in editor (go-gitea#37363)
  Update `Block a user` form (go-gitea#37359)
  Remove IsValidExternalURL/IsAPIURL and use IsValidURL at call sites (go-gitea#37364)
  Add URL to `Learn more about blocking a user` (go-gitea#37355)
  fix: use TriggerEvent instead of Event in workflow runs API response for scheduled runs (go-gitea#37288)
  Add event.schedule context for schedule actions task (go-gitea#37320)
  Fix typos (go-gitea#37346)
  Fix an issue where changing an organization’s visibility caused problems when users had forked its repositories. (go-gitea#37324)
  Fail vite build on rolldown warnings via NODE_ENV=test (go-gitea#37270)
  Use modern "git update-index --cacheinfo" syntax to support more file names (go-gitea#37338)
  Fix URL related escaping for oauth2 (go-gitea#37334)
  When the requested arch rpm is missing fall back to noarch (go-gitea#37236)
  Fix `relative-time` error and improve global error handler (go-gitea#37241)
  Enhance styling in actions page (go-gitea#37323)
  fix(oauth): Error on auth sources with spaces (go-gitea#37327)
  Fix actions concurrency groups cross-branch leak (go-gitea#37311)
  ...

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>

# Conflicts:
#	web_src/js/index-domready.ts
#	web_src/js/markup/content.ts
#	web_src/js/markup/refissue.ts
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Apr 23, 2026
silverwind added a commit that referenced this pull request Apr 23, 2026
Backport #37372 by @bircni

Fixes the issue that status report always shows waiting to run, when
already running

#36906 (comment)

Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
silverwind added a commit to mohammad-rj/gitea that referenced this pull request Apr 24, 2026
* origin/main: (127 commits)
  Refactor pull request view (1) (go-gitea#37380)
  Improve AGENTS.md (go-gitea#37382)
  Remove dead CSS (go-gitea#37376)
  Add pr-review e2e test and speed up e2e tests (go-gitea#37345)
  Drop Fomantic tab, checkbox and form patches (go-gitea#37377)
  fix: dump with default zip type produces uncompressed zip (go-gitea#37401)
  Allow fast-forward-only merge when signed commits are required (go-gitea#37335)
  Introduce `ActionRunAttempt` to represent each execution of a run (go-gitea#37119)
  Move review request functions to a standalone file (go-gitea#37358)
  Fix repo init README EOL (go-gitea#37388)
  Fix org team assignee/reviewer lookups for team member permissions (go-gitea#37365)
  Remove external service dependencies in migration tests (go-gitea#36866)
  Extend issue context popup beyond markdown content (go-gitea#36908)
  fix: commit status reporting (go-gitea#37372)
  Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356)
  Fix cmd tests by mocking builtin paths (go-gitea#37369)
  chore: upgrade Go version in devcontainer image to 1.26 (go-gitea#37374)
  Fix button layout shift when collapsing file tree in editor (go-gitea#37363)
  Update `Block a user` form (go-gitea#37359)
  Remove IsValidExternalURL/IsAPIURL and use IsValidURL at call sites (go-gitea#37364)
  ...

# Conflicts:
#	modules/eventsource/event.go
#	tests/e2e/events.test.ts
silverwind added a commit to silverwind/gitea that referenced this pull request Apr 25, 2026
* origin/main: (51 commits)
  Fix color regressions, add `priority` color (go-gitea#37417)
  [skip ci] Updated translations via Crowdin
  Stabilize e2e logout propagation test (go-gitea#37403)
  refactor: serve site manifest via `/assets/site-manifest.json` endpoint (go-gitea#37405)
  feat(security): set X-Content-Type-Options: nosniff by default (go-gitea#37354)
  Refactor pull request view (1) (go-gitea#37380)
  Improve AGENTS.md (go-gitea#37382)
  Remove dead CSS (go-gitea#37376)
  Add pr-review e2e test and speed up e2e tests (go-gitea#37345)
  Drop Fomantic tab, checkbox and form patches (go-gitea#37377)
  fix: dump with default zip type produces uncompressed zip (go-gitea#37401)
  Allow fast-forward-only merge when signed commits are required (go-gitea#37335)
  Introduce `ActionRunAttempt` to represent each execution of a run (go-gitea#37119)
  Move review request functions to a standalone file (go-gitea#37358)
  Fix repo init README EOL (go-gitea#37388)
  Fix org team assignee/reviewer lookups for team member permissions (go-gitea#37365)
  Remove external service dependencies in migration tests (go-gitea#36866)
  Extend issue context popup beyond markdown content (go-gitea#36908)
  fix: commit status reporting (go-gitea#37372)
  Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/done All backports for this PR have been created backport/v1.26 This PR should be backported to Gitea 1.26 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants