# 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)
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.