Skip to content

Fix incorrect ref commit ID usage#33331

Merged
wxiaoguang merged 3 commits into
go-gitea:mainfrom
wxiaoguang:fix-ref-usage
Jan 20, 2025
Merged

Fix incorrect ref commit ID usage#33331
wxiaoguang merged 3 commits into
go-gitea:mainfrom
wxiaoguang:fix-ref-usage

Conversation

@wxiaoguang

Copy link
Copy Markdown
Contributor

After the RefName refactoring, the ctx.Repo.CommitID is only set when there is a RepoRefByType middleware.

Many handlers do not use that middleware and they only use "default branch"

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 20, 2025
@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Jan 20, 2025
@wxiaoguang

Copy link
Copy Markdown
Contributor Author

Related pages:

image

image

@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 Jan 20, 2025
Comment thread routers/web/repo/search.go Outdated
@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 Jan 20, 2025
wxiaoguang and others added 2 commits January 20, 2025 15:18
@wxiaoguang wxiaoguang enabled auto-merge (squash) January 20, 2025 07:18
@wxiaoguang wxiaoguang changed the title Fix correct ref commit ID usage Fix incorrect ref commit ID usage Jan 20, 2025
@wxiaoguang wxiaoguang disabled auto-merge January 20, 2025 07:35
@wxiaoguang wxiaoguang enabled auto-merge (squash) January 20, 2025 07:36
@wxiaoguang wxiaoguang merged commit 6cc1067 into go-gitea:main Jan 20, 2025
@GiteaBot GiteaBot added this to the 1.24.0 milestone Jan 20, 2025
@wxiaoguang wxiaoguang deleted the fix-ref-usage branch January 20, 2025 07:44
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 21, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Fix incorrect ref commit ID usage (go-gitea#33331)
  Improve sync fork behavior (go-gitea#33319)
  Refactor response writer & access logger (go-gitea#33323)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants