From 6e1fe296ff5bc04e8c159dcce2f7a6e7188fb3bb Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Wed, 23 Aug 2023 10:00:59 +0200 Subject: [PATCH] Use the `meta` repository to compute the branch. --- config/shared/git.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/config/shared/git.py b/config/shared/git.py index e395998..637688f 100644 --- a/config/shared/git.py +++ b/config/shared/git.py @@ -1,4 +1,6 @@ from .call import call +from .path import change_dir +import pathlib def get_commit_id(): @@ -9,10 +11,14 @@ def get_commit_id(): def get_branch_name(override, config_type): - """Get the default branch name but prefer override if not empty.""" - return ( - override - or f"config-with-{config_type}-template-{get_commit_id()}") + """Get the default branch name but prefer override if not empty. + + The commit ID is based on the meta repository. + """ + with change_dir(pathlib.Path(__file__).parent): + return ( + override + or f"config-with-{config_type}-template-{get_commit_id()}") def git_branch(branch_name) -> bool: