feat: add configuration to only push mirror selected branches (#7823)

Adds the ability to selectively choose which branches are pushed to a mirror.

This change adds an additional text box on the repository settings for each push mirror. Existing behavior is preserved when the field is left blank.

When the repository is being pushed, only branches matching the comma separated branch filter are pushed.

Resolves forgejo/forgejo#7242

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7823
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Paul Campbell <pcampbell@kemitix.net>
Co-committed-by: Paul Campbell <pcampbell@kemitix.net>
This commit is contained in:
Paul Campbell 2025-07-12 00:39:35 +02:00 committed by Gusted
commit 9dfdacf54f
16 changed files with 1089 additions and 10 deletions

View file

@ -55,6 +55,8 @@
"repo.form.cannot_create": "All spaces in which you can create repositories have reached the limit of repositories.",
"repo.issue_indexer.title": "Issue Indexer",
"search.milestone_kind": "Search milestones…",
"repo.settings.push_mirror.branch_filter.label": "Branch filter (optional)",
"repo.settings.push_mirror.branch_filter.description": "Branches to be mirrored. Leave blank to mirror all branches. See <a href=\"%[1]s\">%[2]s</a> documentation for syntax. Examples: <code>main, release/*</code>",
"incorrect_root_url": "This Forgejo instance is configured to be served on \"%s\". You are currently viewing Forgejo through a different URL, which may cause parts of the application to break. The canonical URL is controlled by Forgejo admins via the ROOT_URL setting in the app.ini.",
"themes.names.forgejo-auto": "Forgejo (follow system theme)",
"themes.names.forgejo-light": "Forgejo light",