Skip to content

Fix incorrect ref commit ID usage #33331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Conversation

wxiaoguang
Copy link
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
@github-actions github-actions bot added the modifies/go Pull requests that update Go code 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
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
@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 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
26 checks passed
@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. modifies/go Pull requests that update Go code 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