diff --git a/cube_doctor/__init__.py b/cube_doctor/__init__.py index f9b945ead6901bca73bf8d1ba2f4aea0e4ee397e..5dd83f9a45c8fd2c46991fdca8bfeeb7ecd8d7bc 100644 --- a/cube_doctor/__init__.py +++ b/cube_doctor/__init__.py @@ -396,7 +396,7 @@ class Command: # we already sent the MR if target_branch is not None and target_branch in branches: - logger.info(f'{cube.name} already has a topic {target_branch}, skip') + logger.info(f"{cube.name} already has a topic {target_branch}, skip") continue if self.pre_check(root_files) == "continue": diff --git a/cube_doctor/transforms/regenerate_gitlab_ci.py b/cube_doctor/transforms/regenerate_gitlab_ci.py index e68f2d10cfdac36858dadcd1e2523d4e5ee23cda..bf7fbd3d0f5a53d617dcf1ad58fe94e114c9150e 100644 --- a/cube_doctor/transforms/regenerate_gitlab_ci.py +++ b/cube_doctor/transforms/regenerate_gitlab_ci.py @@ -24,9 +24,9 @@ include: # uncomment and uses to customize/extend the configuration here if needed # (it needs to be at the same level than "- project") # - ".gitlab-ci-extended.yml" - {% else %} + {%- else %} - ".gitlab-ci-extended.yml" - {% endif %} + {%- endif %} stages: - lint diff --git a/tests/data/regenerate_gitlab_ci/in_extended/.gitlab-ci.yml b/tests/data/regenerate_gitlab_ci/in_extended/.gitlab-ci.yml index 6ae341134c1160dc13af4a54519bf29370679c07..09536b6b5fb23458cabb0bf4019fbac37462686e 100644 --- a/tests/data/regenerate_gitlab_ci/in_extended/.gitlab-ci.yml +++ b/tests/data/regenerate_gitlab_ci/in_extended/.gitlab-ci.yml @@ -3,7 +3,6 @@ default: image: python:3.7 include: - - ".gitlab-ci-extended.yml" - project: "open-source/gitlab-ci-templates" ref: "branch/default" file: @@ -16,6 +15,7 @@ include: - "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3' - "templates/create-release-on-heptapod.yml" # this will create a release on heptapod - "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi + - ".gitlab-ci-extended.yml" stages: - lint diff --git a/tests/data/regenerate_gitlab_ci/out/.gitlab-ci.yml b/tests/data/regenerate_gitlab_ci/out/.gitlab-ci.yml index 6552e1e5f8055406127ab3c008bd198704fb3a67..70066160e05d98df6fc7ec1f98c18b417e75fbea 100644 --- a/tests/data/regenerate_gitlab_ci/out/.gitlab-ci.yml +++ b/tests/data/regenerate_gitlab_ci/out/.gitlab-ci.yml @@ -3,9 +3,6 @@ default: image: python:3.7 include: - # uncomment and uses to customize/extend the configuration here if needed - # (it needs to be at the same level than "- project") - # - ".gitlab-ci-extended.yml" - project: "open-source/gitlab-ci-templates" ref: "branch/default" file: @@ -18,6 +15,9 @@ include: - "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3' - "templates/create-release-on-heptapod.yml" # this will create a release on heptapod - "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi + # uncomment and uses to customize/extend the configuration here if needed + # (it needs to be at the same level than "- project") + # - ".gitlab-ci-extended.yml" stages: - lint diff --git a/tests/data/regenerate_gitlab_ci/out_extended/.gitlab-ci.yml b/tests/data/regenerate_gitlab_ci/out_extended/.gitlab-ci.yml index 6ae341134c1160dc13af4a54519bf29370679c07..09536b6b5fb23458cabb0bf4019fbac37462686e 100644 --- a/tests/data/regenerate_gitlab_ci/out_extended/.gitlab-ci.yml +++ b/tests/data/regenerate_gitlab_ci/out_extended/.gitlab-ci.yml @@ -3,7 +3,6 @@ default: image: python:3.7 include: - - ".gitlab-ci-extended.yml" - project: "open-source/gitlab-ci-templates" ref: "branch/default" file: @@ -16,6 +15,7 @@ include: - "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3' - "templates/create-release-on-heptapod.yml" # this will create a release on heptapod - "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi + - ".gitlab-ci-extended.yml" stages: - lint diff --git a/tests/data/regenerate_gitlab_ci/out_manifest_in/.gitlab-ci.yml b/tests/data/regenerate_gitlab_ci/out_manifest_in/.gitlab-ci.yml index 6552e1e5f8055406127ab3c008bd198704fb3a67..70066160e05d98df6fc7ec1f98c18b417e75fbea 100644 --- a/tests/data/regenerate_gitlab_ci/out_manifest_in/.gitlab-ci.yml +++ b/tests/data/regenerate_gitlab_ci/out_manifest_in/.gitlab-ci.yml @@ -3,9 +3,6 @@ default: image: python:3.7 include: - # uncomment and uses to customize/extend the configuration here if needed - # (it needs to be at the same level than "- project") - # - ".gitlab-ci-extended.yml" - project: "open-source/gitlab-ci-templates" ref: "branch/default" file: @@ -18,6 +15,9 @@ include: - "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3' - "templates/create-release-on-heptapod.yml" # this will create a release on heptapod - "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi + # uncomment and uses to customize/extend the configuration here if needed + # (it needs to be at the same level than "- project") + # - ".gitlab-ci-extended.yml" stages: - lint