Some fixes of the prompt of new branches#26257
Merged
Merged
Conversation
lunny
approved these changes
Aug 1, 2023
denyskon
approved these changes
Aug 1, 2023
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Aug 2, 2023
* 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)
yp05327
reviewed
Aug 15, 2023
|
|
||
| showRecentlyPushedNewBranches := true | ||
| if ctx.Repo.Repository.IsMirror || | ||
| !ctx.Repo.Repository.UnitEnabled(ctx, unit_model.TypePullRequests) { |
Contributor
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
And maybe we also need to check the unit permission. 🤔
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #26239
This PR makes some fixes:
commit_timeinstead ofupdated_unix, ascommit_timeis the real time when the branch was pushed