@@ -47,52 +47,44 @@ def raise_ci_warnings(self) -> None:
4747 # Gitlab Runners
4848 if environ .get ("GITLAB_CI" ) and n_commits < 50 :
4949 # Default is GIT_DEPTH of 50 for gitlab
50- logger .info (
51- """
50+ logger .info ("""
5251 Running on a gitlab runner might lead to wrong \
5352 git revision dates due to a shallow git fetch depth. \
5453 Make sure to set GIT_DEPTH to 1000 in your .gitlab-ci.yml file. \
5554 (see https://docs.gitlab.com/user/project/repository/monorepos/#use-shallow-clones-in-cicd-processes).
56- """
57- )
55+ """ )
5856
5957 # Github Actions
6058 if environ .get ("GITHUB_ACTIONS" ) and n_commits == 1 :
6159 # Default is fetch-depth of 1 for github actions
62- logger .info (
63- """
60+ logger .info ("""
6461 Running on github actions might lead to wrong \
6562 git revision dates due to a shallow git fetch depth. \
6663 Try setting fetch-depth to 0 in your github action \
6764 (see https://github.com/actions/checkout?tab=readme-ov-file#fetch-all-history-for-all-tags-and-branches).
68- """
69- )
65+ """ )
7066
7167 # Bitbucket pipelines
7268 if environ .get ("CI" ) and n_commits < 50 :
7369 # Default is fetch-depth of 50 for bitbucket pipelines
74- logger .info (
75- """
70+ logger .info ("""
7671 Running on bitbucket pipelines might lead to wrong \
7772 git revision dates due to a shallow git fetch depth. \
7873 Try setting "clone: depth" to "full" in your pipeline \
7974 (see https://support.atlassian.com/bitbucket-cloud/docs/git-clone-behavior/#Depth
8075 and search 'depth').
81- """
82- )
76+ """ )
8377
8478 # Azure Devops Pipeline
8579 # Does not limit fetch-depth by default
8680 if environ .get ("Agent.Source.Git.ShallowFetchDepth" , 10e99 ) < n_commits :
87- logger .info (
88- """
81+ logger .info ("""
8982 Running on Azure pipelines \
9083 with limited fetch-depth might lead to wrong git revision dates \
9184 due to a shallow git fetch depth. \
9285 Remove any Shallow Fetch settings \
9386 (see https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops#shallow-fetch).
94- """
95- )
87+ """ )
9688
9789 def commit_count (self ) -> int :
9890 """Helper function to determine the number of commits in a repository.
0 commit comments