-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
New pull request notification will show wrong branch in a special case #32769
Comments
In my trial like this, only the picture 2 is successfully re-produced, and there's nothing like the senario like picture 1. And I reckon that this is just normal. By the way, maybe we can add a button to "Syncronise Forked Repository" like GitHub. |
The feature has been implemented which will be released in v1.23.0 |
Hi @lunny, may I ask if the release will include the fix to this issue? If not, I would like to work on this issue. |
I don't think so. I just answered the off-topic question. You are welcome to send a pull request. |
@changchaishi ps: I have no idea about how to fix it, it is really complex. I'm looking forward to the solution. |
Hi sharing my thoughts here. Maybe it is not as hard as it seems, as in the branches view, we already have logic that tells whether a branch is worth a PR for the base branch. We can transplant this logic from to Simply put, the behavior should be:
Could this be the solution? |
Send a PR with a test for this case is the simple way I think. |
Fixes #32769 by the logic from pr #33192 --------- Co-authored-by: wxiaoguang <[email protected]>
Fixes go-gitea#32769 by the logic from pr go-gitea#33192 --------- Co-authored-by: wxiaoguang <[email protected]> # Conflicts: # services/repository/merge_upstream.go
Description
Sorry, this is a bug come from my PR #25812
Reproduce:
Then you will see:
In repo A, the branch in notification is repo B's main branch, actually the expected branch is repo A's main branch.
In the fork (repo B), it show the repo A's main branch, actually the expected behavior is showing nothing.
Reason:
For newly created empty branch (based on default branch), I want to ignore the notification, so I added this in the SQL query.
And this cause this bug.
In repo A, it will ignore the newly pushed commit because of the condition I mentioned above, and the default branch's latest commit id is changed. So in repo B's main branch, the latest commit id is not same to the repo A's default branch's latest commit id, so it will be picked up as a recently updated branch.
Don't have a good idea about how to fix it now. If someone is interested, it is welcome to create a PR for it.
Gitea Version
latest
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
build
Database
None
The text was updated successfully, but these errors were encountered: