-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
cant Pull request inside a forked repo #6318
Comments
duplicated with #6225 ? |
Hmm, I'm not certain if this is the same. So when you click on PullRequest from a fork it is assumed that you want to merge into the original repository not the fork. Now, there's no way of changing the base repository easily except to change the URL by hand. The UI for compare needs to allow you to select the fork repository branches to merge in, and needs to allow you to suggest other repositories. Similarly we need to allow users to change repository for the pulled branch. |
Exact and I think it's best if the "default" PullRequest suggested need to be the repository where the PullRequest is created. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
Has this issue been resolved? |
The compare diff page needs to be rewritten to allow for easy changes to the base repo and head repo |
Signed-off-by: Ian David Garcia <cinquedia@gmail.com>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
Upgraded to Version 1.15.6, this is still happening. |
we have also the same problem in the latest version :(. Is there any plan to fix it? |
Hm, what's the problem? Could you show some screenshots or logs? Maybe this is the different thing from before? |
Was it working in 1.15.3 for us it work fine, but we did not try upgrading to 1.15.6 for the moment. |
We have a main repository, let's call it "main-repo", and a forked repository of "main-repo" called "forked-repo". Both repositories share "master" and "develop" branches. If you create a new branch on "forked-repo" (let's say "new-branch") and then try to create a PR it shows a 404 page. In the URL you can see that gitea tried to point to "main-repo" instead of "forked-repo". If you change the URL by hand, instead of pointing to "main-repo - new-branch" point to "forked-repo - new-branch" it then works. It wasn´t working either for us on the previous version that we were using (1.12.5). We used others versions (1.9.2, 1.11.1, 1.11.5, 1.12.1, 1.12.5, 1.15.6) but cannot confirm that PRs weren´t working back then because we didn´t use them. |
Can you reproduce that in https://try.gitea.io? If that, please give the repository URL? |
I cannot reproduce the error on https://try.gitea.io. These are the repositories that follow the example I said. When I click the "New pull request button" the URL for the comparison page is different. On our server gitea tries to fetch new-branch from main-repo (which doesn't exist). On try.gitea.io this is the URL: https://try.gitea.io/lopezd/main-repo/compare/master...lopezd_1:new-branch It is still pointing to main-repo, which I understand to be the expected behavior, but instead of fetching new-branch, it fetches master. Edit: I also want to add that in our case the owner of both repositories is the same. |
Reproduced on https://try.gitea.io/. Repository https://try.gitea.io/lopezd/base-repo-fork. If you navigate to branch We modified the link of the New PR button so it uses |
Fix #6318 Co-authored-by: zeripath <art27@cantab.net>
Fix go-gitea#6318 Co-authored-by: zeripath <art27@cantab.net>
I'm really not certain that #21519 and its backport are the solution. The main change in those PRs is drop using the short fork notation - which I don't think are going to be the problem. ExampleIf you have the following repos:
Then the short fork notation What's really going on?There are two problems I could imagine happening - neither of which are clear from the associated issue: Reforked reposIf you have:
Permission Denied to create PRs on
|
Gitea version (or commit ref):91775c1
Operating system: https://try.gitea.io
Can you reproduce the bug at https://try.gitea.io:
Description
If a pull request is open from a forked repo, it will automatically be apply to the source it's forked.
The issue is that we can only see the branch from the source that we've forked and we are unable to easily change the target to apply the pull request.
The only "hack" we can do is change the username or the organisation targeted inside the URL to be able to get the correct usage.
By default I think we need to be able to do pull request inside the repo we work, even if it's a fork.
...
The text was updated successfully, but these errors were encountered: