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

fix bug pull request files will be broken if head repo was transfered to another user or orgnization #8571

Conversation

lunny
Copy link
Member

@lunny lunny commented Oct 18, 2019

Fix #8563, but this PR will not fix the broken pull requests because the bug because we cannot add a migration on this release branch. There are two workarounds to fix that.

  • Transfer the head repository to someplace and transfer it back.
  • Update the database to change the head_user_name to the correct one on table pull_request.

This PR is a manually back port from #8564 .

@lunny lunny added the type/bug label Oct 18, 2019
@lunny lunny added this to the 1.9.5 milestone Oct 18, 2019
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 18, 2019
@zeripath
Copy link
Contributor

Would it not be possible to replace every call to headusername with the equivalent looking up from the headrepo id?

@lunny
Copy link
Member Author

lunny commented Oct 18, 2019

@zeripath Did you mean we will not drop that column, but we could do not use that column?

@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 Oct 18, 2019
@lafriks
Copy link
Member

lafriks commented Oct 18, 2019

@lunny that could probably be better

@lafriks
Copy link
Member

lafriks commented Oct 18, 2019

we can leave that column for 1.9 and drop only in 1.10 but fix not to use it already in 1.9

@lunny lunny merged commit d4501ec into go-gitea:release/v1.9 Oct 18, 2019
@lunny lunny deleted the lunny/update_pr_headusername_when_transfer_repo branch October 18, 2019 08:14
@lunny
Copy link
Member Author

lunny commented Oct 18, 2019

@lafriks drop column cannot be in v1.10 I think, only in v1.11 since release v1.10 branched.

@lafriks
Copy link
Member

lafriks commented Oct 18, 2019

It can, as long as no PR is merged that has migration that won't be backported and migrations does not go out of sync for 1.10 and master branches

@lunny
Copy link
Member Author

lunny commented Oct 18, 2019

OK. So please review #8564 at first.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants