-
-
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
Some fixes of the prompt of new branches #26257
Conversation
* upstream/main: Clarify the logger's MODE config option (go-gitea#26267) speed up TestEventSourceManagerRun (go-gitea#26262) Merge `templates/projects/list.tmpl` and `templates/repo/projects/list.tmpl` together (go-gitea#26265) Allow editing push mirrors after creation (go-gitea#26151) Update Arch linux URL from community to extra (go-gitea#26273) Fix due date rendering the wrong date in issue (go-gitea#26268) Some fixes of the prompt of new branches (go-gitea#26257)
|
||
showRecentlyPushedNewBranches := true | ||
if ctx.Repo.Repository.IsMirror || | ||
!ctx.Repo.Repository.UnitEnabled(ctx, unit_model.TypePullRequests) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this unit check should be baseRepo.UnitEnabled()
not ctx.Repo.UnitEnabled()
.
If the context repo is a fork repo without PR unit, we should also show them as the base repo's PR unit is enabled and we can create PRs.
And for the similar reason, we should also check whether baseRepo is a mirror repo.
Will be fixed in #25812.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe we also need to check the unit permission. 🤔
Related to #26239
This PR makes some fixes:
commit_time
instead ofupdated_unix
, ascommit_time
is the real time when the branch was pushed