Fix bug on pull requests when transfer head repository #8564

Merged
lunny merged 4 commits from lunny/drop_pr_headusername into master 2019-10-18 11:13:31 +00:00
Owner

Fix #8563

Fix #8563
guillep2k (Migrated from github.com) approved these changes 2019-10-17 16:19:30 +00:00
guillep2k (Migrated from github.com) left a comment
Author
Owner

Code looks good to me. I'm still not sure what was the actual use of that column.

Code looks good to me. I'm still not sure what was the actual use of that column.
guillep2k (Migrated from github.com) commented 2019-10-17 16:13:37 +00:00
Author
Owner

We could add

		pr.HeadRepo = &repo
		if pr.HeadRepoID == pr.BaseRepoID {
			pr.BaseRepo = pr.HeadRepo
		}
We could add ```suggestion pr.HeadRepo = &repo if pr.HeadRepoID == pr.BaseRepoID { pr.BaseRepo = pr.HeadRepo } ```
guillep2k (Migrated from github.com) commented 2019-10-17 16:18:15 +00:00
Author
Owner

pull.HeadRepo.RepoPath() ?

`pull.HeadRepo.RepoPath()` ?
lunny reviewed 2019-10-18 03:18:54 +00:00
Author
Owner

Done. Not here but in LoadBaseRepo.

Done. Not here but in `LoadBaseRepo`.
lunny reviewed 2019-10-18 03:19:55 +00:00
Author
Owner

@guillep2k No. pull.HeadRepo.RepoPath() will return repo's location on file system. But here we need a headTarget.

@guillep2k No. `pull.HeadRepo.RepoPath()` will return repo's location on file system. But here we need a `headTarget`.
lafriks (Migrated from github.com) approved these changes 2019-10-18 10:30:01 +00:00
This repo is archived. You cannot comment on pull requests.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#8564
No description provided.