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

migration: pull requests show broken but they dont #13321

Closed
6543 opened this issue Oct 27, 2020 · 3 comments · Fixed by #13331
Closed

migration: pull requests show broken but they dont #13321

6543 opened this issue Oct 27, 2020 · 3 comments · Fixed by #13331
Labels
topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them type/bug

Comments

@6543
Copy link
Member

6543 commented Oct 27, 2020

gitea version: v1.13

gitea_uploader.go has to trigger Merge conflict checking is in progress for each pull after migration.

workaround: close & reopen a pull

@6543 6543 added type/bug topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them labels Oct 27, 2020
@ramasoft-dv
Copy link

ramasoft-dv commented Oct 27, 2020

We do have that issue also and it's quite annoying.
For old PR (before migrating to 1.13), when we Update the branch we have the "Missing fork information ...".

The workaround from @6543 does not work for us. When we close the PR, we cannot reopen it : "This pull request cannot be reopened because the branch was deleted." (of course the branch is not deleted)
The only workaround we found is to merge the PR manually.

@6543
Copy link
Member Author

6543 commented Oct 27, 2020

@ramasoft-dv another workaround should be to push a new commit to the pull (could be an empty one too)

@zeripath
Copy link
Contributor

diff --git a/modules/migrations/gitea_uploader.go b/modules/migrations/gitea_uploader.go
index cd1fd5cb8..466c83275 100644
--- a/modules/migrations/gitea_uploader.go
+++ b/modules/migrations/gitea_uploader.go
@@ -28,6 +28,7 @@ import (
        "code.gitea.io/gitea/modules/storage"
        "code.gitea.io/gitea/modules/structs"
        "code.gitea.io/gitea/modules/timeutil"
+       "code.gitea.io/gitea/services/pull"
 
        gouuid "github.com/google/uuid"
 )
@@ -524,6 +525,7 @@ func (g *GiteaLocalUploader) CreatePullRequests(prs ...*base.PullRequest) error
        }
        for _, pr := range gprs {
                g.issues.Store(pr.Issue.Index, pr.Issue.ID)
+               pull.AddToTaskQueue(pr)
        }
        return nil
 }

zeripath added a commit to zeripath/gitea that referenced this issue Oct 27, 2020
techknowlogick added a commit that referenced this issue Oct 27, 2020
* Add migrated pulls to pull request task queue

Fix #13321

Signed-off-by: Andrew Thornton <[email protected]>

* Improve error reports

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Oct 27, 2020
* Add migrated pulls to pull request task queue

Fix go-gitea#13321

Signed-off-by: Andrew Thornton <[email protected]>

* Improve error reports

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Oct 27, 2020
techknowlogick added a commit that referenced this issue Oct 27, 2020
* Add migrated pulls to pull request task queue

Fix #13321

Signed-off-by: Andrew Thornton <[email protected]>

* Improve error reports

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
techknowlogick pushed a commit that referenced this issue Oct 27, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants