From 5f8ef2f842ee16ef1608feb3627691fb8f5fd7b6 Mon Sep 17 00:00:00 2001 From: Simon Chabot Date: Tue, 3 Aug 2021 15:44:54 +0200 Subject: [PATCH 1/2] style: fix black --- cube_doctor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cube_doctor/__init__.py b/cube_doctor/__init__.py index f9b945e..5dd83f9 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": -- GitLab From 788e567a08f704dac35cd40e38189a85d5bff57e Mon Sep 17 00:00:00 2001 From: Simon Chabot Date: Tue, 3 Aug 2021 15:50:16 +0200 Subject: [PATCH 2/2] fix(gitlab): fix template adding a new line and tests --- cube_doctor/transforms/regenerate_gitlab_ci.py | 4 ++-- tests/data/regenerate_gitlab_ci/in_extended/.gitlab-ci.yml | 2 +- tests/data/regenerate_gitlab_ci/out/.gitlab-ci.yml | 6 +++--- tests/data/regenerate_gitlab_ci/out_extended/.gitlab-ci.yml | 2 +- .../regenerate_gitlab_ci/out_manifest_in/.gitlab-ci.yml | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cube_doctor/transforms/regenerate_gitlab_ci.py b/cube_doctor/transforms/regenerate_gitlab_ci.py index e68f2d1..bf7fbd3 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 6ae3411..09536b6 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 6552e1e..7006616 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 6ae3411..09536b6 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 6552e1e..7006616 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 -- GitLab