Skip to content

Fix incorrect default branch when adopt a repository#30912

Merged
lunny merged 4 commits into
go-gitea:mainfrom
yp05327:fix-30521
May 9, 2024
Merged

Fix incorrect default branch when adopt a repository#30912
lunny merged 4 commits into
go-gitea:mainfrom
yp05327:fix-30521

Conversation

@yp05327
Copy link
Copy Markdown
Contributor

@yp05327 yp05327 commented May 9, 2024

Fix #30521

we should sync branches first, then detect default branch, or git_model.FindBranchNames will always return empty list, and the detection will be wrong.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 9, 2024
@yp05327 yp05327 changed the title Fix incorrect default branche when adopt repository Fix incorrect default branch when adopt a repository May 9, 2024
@yp05327 yp05327 added this to the 1.23.0 milestone May 9, 2024
Comment thread services/repository/adopt.go Outdated
Comment thread services/repository/adopt.go
@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 May 9, 2024
Comment thread services/repository/adopt.go
@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 May 9, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 9, 2024
@lunny lunny enabled auto-merge (squash) May 9, 2024 08:18
@lunny lunny merged commit e94723f into go-gitea:main May 9, 2024
@GiteaBot
Copy link
Copy Markdown
Collaborator

GiteaBot commented May 9, 2024

I was unable to create a backport for 1.22. @yp05327, please send one manually. 🍵

go run ./contrib/backport 30912
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added backport/manual No power to the bots! Create your backport yourself! and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels May 9, 2024
@lunny lunny added the backport/done All backports for this PR have been created label May 10, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 10, 2024
* giteaofficial/main:
  Fix incorrect default branch when adopt a repository (go-gitea#30912)
lunny pushed a commit that referenced this pull request May 10, 2024
Backport #30912

ps: removed useless `u *user_model.User` for `adoptRepository`
@yp05327 yp05327 deleted the fix-30521 branch May 27, 2024 00:49
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! 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.

import from gogs /github.

4 participants