Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  merge_automation.py

  Sprache: Python
 

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from taskgraph.parameters import Parameters

from gecko_taskgraph.actions.registry import register_callback_action
from gecko_taskgraph.decision import taskgraph_decision
from gecko_taskgraph.util.attributes import RELEASE_PROMOTION_PROJECTS


def is_release_promotion_available(parameters):
    return parameters["project"in RELEASE_PROMOTION_PROJECTS


@register_callback_action(
    name="merge-automation",
    title="Merge Day Automation",
    symbol="${input.behavior}",
    description="Merge repository branches.",
    permission="merge-automation",
    order=500,
    context=[],
    available=is_release_promotion_available,
    schema=lambda graph_config: {
        "type""object",
        "properties": {
            "force-dry-run": {
                "type""boolean",
                "description""Override other options and do not push changes",
                "default"True,
            },
            "push": {
                "type""boolean",
                "description""Push changes using to_repo and to_branch (mercurial only)",
            },
            "behavior": {
                "type""string",
                "description""The type of release promotion to perform.",
                # this enum should be kept in sync with the merge-automation kind
                "enum": [
                    "bump-main",
                    "bump-esr153",
                    "early-to-late-beta",
                    "main-to-beta",
                    "beta-to-release",
                    "release-to-esr",
                ],
                "default""REPLACE ME",
            },
            "from-repo": {
                "type""string",
                "description""The URI of the source repository",
            },
            "to-repo": {
                "type""string",
                "description""The push URI of the target repository",
            },
            "from-branch": {
                "type""string",
                "description""The fx head of the source, such as central",
            },
            "to-branch": {
                "type""string",
                "description""The fx head of the target, such as beta",
            },
            "from-revision": {
                "type""string",
                "description""The revision on the from_branch to fetch its current version from, tag with `_BASE` tags, and use as the target revision for merge actions.",
            },
            "to-revision": {
                "type""string",
                "description""The revision on the to_branch to fetch its current version from and use to base l10n bumps, version bumps, and replacements on.",
            },
            "fetch-version-from": {
                "type""string",
                "description""Path to file used when querying current version.",
            },
            "merge-automation-id": {
                "type""integer",
                "description""Shipit merge automation ID for marking as merged.",
            },
        },
        "required": ["behavior"],
    },
)
def merge_automation_action(parameters, graph_config, input, task_group_id, task_id):
    # make parameters read-write
    parameters = dict(parameters)

    parameters["target_tasks_method"] = "merge_automation"
    parameters["merge_config"] = {
        "force-dry-run": input.get("force-dry-run"False),
        "behavior": input["behavior"],
    }

    for field in [
        "from-repo",
        "from-branch",
        "from-revision",
        "to-repo",
        "to-branch",
        "to-revision",
        "push",
        "fetch-version-from",
        "merge-automation-id",
    ]:
        if input.get(field):
            parameters["merge_config"][field] = input[field]
    parameters["tasks_for"] = "action"
    parameters["dontbuild"] = False
    # make parameters read-only
    parameters = Parameters(**parameters)

    taskgraph_decision({"root": graph_config.root_dir}, parameters=parameters)

Messung V0.5 in Prozent
C=90 H=96 G=93

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002