Coverage for app/venv/lib/python3.14/site-packages/weblate/trans/management/commands/pushgit.py: 0%
14 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
1# Copyright © Michal Čihař <michal@weblate.org>
2#
3# SPDX-License-Identifier: GPL-3.0-or-later
4from __future__ import annotations
6from typing import TYPE_CHECKING
8from weblate.trans.management.commands import WeblateComponentCommand
10if TYPE_CHECKING:
11 from django.core.management.base import CommandParser
14class Command(WeblateComponentCommand):
15 help = "pushes all changes to upstream repository"
16 needs_repo = True
18 def add_arguments(self, parser: CommandParser) -> None:
19 super().add_arguments(parser)
20 parser.add_argument(
21 "--force-commit",
22 action="store_true",
23 dest="force_commit",
24 default=False,
25 help="Forces committing pending changes",
26 )
28 def handle(self, *args, **options) -> None:
29 for component in self.get_components(**options):
30 component.do_push(None, force_commit=options["force_commit"])