Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 09:54:24 +01:00
forgejo/routers
Gergely Nagy 69fc7cffb4
Rework the recently pushed branches banner conditions
With this change, the "You pushed on branch xyz" banner will only be
displayed if the base repository has pull request enabled (rather than
the viewed one), because the banner's goal is to target the base repo.

If the base repository does not allow pull requests, then the "New pull
request" button would lead to a 404 anyway, and should be disabled.
Without the button, the message itself is rather pointless.

If the repository is not a fork, then, with this change, the message is
never displayed. To send pull requests against itself, the `/branches/`
page will list local branches, and allows opening pull requests from
there.

The idea here is that the banner is mostly useful in the context of a
fork. While the workflow of opening PRs against the same repo is used
often, it rarely needs a notification, and said notification in these
cases is more an annoyance than helpful.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-01-21 00:42:16 +01:00
..
api [GITEA] Adjust name of operation 2024-01-20 22:33:36 +01:00
common Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
install [GITEA] Add password length check on install page 2024-01-15 16:11:57 +00:00
private [CLI] implement forgejo-cli 2024-01-15 13:26:55 +00:00
utils Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
web Rework the recently pushed branches banner conditions 2024-01-21 00:42:16 +01:00
init.go [API] Forgejo API /api/forgejo/v1 2024-01-15 14:48:03 +00:00