Skip to content

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

Merged
lunny merged 1 commit into
go-gitea:release/v1.9from
lunny:lunny/update_pr_headusername_when_transfer_repo
Oct 18, 2019
Merged

fix bug pull request files will be broken if head repo was transfered to another user or orgnization#8571
lunny merged 1 commit into
go-gitea:release/v1.9from
lunny:lunny/update_pr_headusername_when_transfer_repo

Conversation

@lunny

@lunny lunny commented Oct 18, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

@lunny

lunny commented Oct 18, 2019

Copy link
Copy Markdown
Member Author

@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

lafriks commented Oct 18, 2019

Copy link
Copy Markdown
Member

@lunny that could probably be better

@lafriks

lafriks commented Oct 18, 2019

Copy link
Copy Markdown
Member

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

lunny commented Oct 18, 2019

Copy link
Copy Markdown
Member Author

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

@lafriks

lafriks commented Oct 18, 2019

Copy link
Copy Markdown
Member

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

lunny commented Oct 18, 2019

Copy link
Copy Markdown
Member Author

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