8.6.6. Use merge_issue_annotations.py without involving the central Dashboard Server

Note

It is not recommended to do this but you may want to do this for several reasons, one of them being that you have no means of securely providing administrative Dashboard credentials to the script.

The below snippet shows the general idea. Note, that some extra work may be necessary in order to get the source code fetching for the temporary local Dashboard to work because this is needed for issue connection.

Use merge_issue_annotations.py with a temporary local Dashboard
# Copyright (C) 2025 Axivion GmbH
# Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
# https://www.qt.io


import subprocess
import sys

from axivion.dashboard.dashboard_server import TemporaryDashboardServer
from bauhaus import shared

with TemporaryDashboardServer() as server, server.create_admin_dashboard() as api:
    dashboard = server.get_access_info()
    source_project = api.install_project(sys.argv[1])
    target_project = api.install_project(sys.argv[2])
    subprocess.check_call(
        shared.python_command('merge_issue_annotations')
        + ['--source_project', source_project, '--target_project', target_project],
        env={
            'AXIVION_DASHBOARD_URL': dashboard.get_url(),
            'AXIVION_USERNAME': dashboard.get_auth()[0],
            'AXIVION_PASSWORD': dashboard.get_auth()[1],
        },
    )