Skip to content
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

Set commit id when ref used explicitly #26447

Merged
merged 3 commits into from
Aug 12, 2023

Conversation

jackHay22
Copy link
Contributor

@jackHay22 jackHay22 commented Aug 10, 2023

In the RepoRefForAPI() context function CommitID is not set if ref is used. It is set correctly for other if/else branches where Commit is set. It doesn't appear that any routes that use RepoRefForAPI() also use CommitID but that may be the case in the future.

Changes

  • Sets ctx.Repo.CommitID when ref is explicitly used for api routes that use RepoRefForAPI()

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 10, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 10, 2023
@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 Aug 11, 2023
@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 Aug 12, 2023
@wxiaoguang wxiaoguang added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 12, 2023
@wxiaoguang wxiaoguang enabled auto-merge (squash) August 12, 2023 06:38
@wxiaoguang wxiaoguang merged commit c5888eb into go-gitea:main Aug 12, 2023
24 checks passed
@GiteaBot GiteaBot added this to the 1.21.0 milestone Aug 12, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 12, 2023
@delvh delvh added type/bug modifies/api This PR adds API routes or modifies them labels Aug 12, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 14, 2023
* upstream/main: (24 commits)
  Update zh-cn documentation (go-gitea#26406)
  Fix NuGet search endpoints (go-gitea#25613)
  Fix tooltip of commit select button (go-gitea#26472)
  fix grab cursor on default column (go-gitea#26476)
  Fix storage path logic especially for relative paths (go-gitea#26441)
  Rename `Sync2` -> `Sync` (go-gitea#26479)
  Add ThreadID parameter for Telegram webhooks (go-gitea#25996)
  Fix stderr usages (go-gitea#26477)
  Use correct pull request commit link instead of a generic commit link (go-gitea#26434)
  Close stdout correctly for "git blame" (go-gitea#26470)
  Refactor tests (go-gitea#26464)
  Remove last newline from config file (go-gitea#26468)
  Add matrix to support (go-gitea#26382)
  Refactor project templates (go-gitea#26448)
  Avoiding accessing undefined mentionValues (go-gitea#26461)
  Tweak actions menu (go-gitea#26278)
  Adjust minio new sequence, now it will check whether bucket exist first and then create one if it doesn't exist (go-gitea#26420)
  Set commit id when ref used explicitly (go-gitea#26447)
  Fix 404 error when remove self from an organization (go-gitea#26362)
  Update index doc (go-gitea#26455)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 10, 2023
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/api This PR adds API routes or modifies them size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants