@@ -94,15 +94,31 @@ You can use a name other than `PR_Metrics_Access_Token` if you wish, but you
9494will need to keep the name unified across the variable and task definitions. The
9595name `PR_METRICS_ACCESS_TOKEN` cannot be altered.
9696
97- # # Always Close Comment
97+ # # Git History
98+
99+ Depending on the nature of your repo history, it may be necessary to fetch Git
100+ history during checkout. This can be done by updating the `checkout` step :
101+
102+ ` ` ` YAML
103+ - checkout: self
104+ fetchDepth: 0
105+ ` ` `
106+
107+ Alternatively, if using classic pipelines, you can disable 'Shallow fetch' under
108+ the build process phase settings.
98109
99- The `AlwaysCloseComment` option is not available for GitHub PRs as the main size
100- and test comment there cannot be open by default.
110+ In many cases, `fetchDepth` will not be required so it is recommended not to set
111+ this unless the task explicitly requests it. It may also be possible to set this
112+ to a value greater than 0 if you only require a partial history, but it can be
113+ difficult to determine a value that will work consistently, due to the nature of
114+ Git history.
115+
116+ # # Always Close Comment
101117
102- By default in Azure DevOps , the comment is left open if it requires further
103- attention, such as when a smaller PR or increased test coverage is suggested. If
104- this input is set to `true`, the comment will be closed, to prevent it blocking
105- automatic closure of the PR.
118+ By default, the comment is left open if it requires further attention, such as
119+ when a smaller PR or increased test coverage is suggested. If the
120+ ` AlwaysCloseComment ` option is set to `true`, the comment will be closed, to
121+ prevent it blocking automatic closure of the PR.
106122
107123[addingtask] : https://docs.microsoft.com/azure/devops/pipelines/customize-pipeline
108124[workloadidentityfederation] : workload-identity-federation.md
0 commit comments