From fe87973fd2f85cd903091f6a1c54db5b42808f06 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Sat, 8 Mar 2025 05:54:33 +0000 Subject: [PATCH 1/2] reduce checkout.fetchDepth in pipelines --- eng/pipelines/swagger-apiview.yml | 2 +- eng/pipelines/swagger-prettier-check.yml | 3 +++ eng/pipelines/typespec-apiview.yml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/swagger-apiview.yml b/eng/pipelines/swagger-apiview.yml index c6b51a8dcf2c..9008620abae2 100644 --- a/eng/pipelines/swagger-apiview.yml +++ b/eng/pipelines/swagger-apiview.yml @@ -25,7 +25,7 @@ jobs: steps: - checkout: self - fetchDepth: 0 + fetchDepth: 2 - pwsh: | dotnet tool install Azure.Sdk.Tools.SwaggerApiParser ` diff --git a/eng/pipelines/swagger-prettier-check.yml b/eng/pipelines/swagger-prettier-check.yml index cb511378ad8f..1b4122bfa2b8 100644 --- a/eng/pipelines/swagger-prettier-check.yml +++ b/eng/pipelines/swagger-prettier-check.yml @@ -10,6 +10,9 @@ jobs: - template: /eng/pipelines/templates/variables/globals.yml steps: + - checkout: self + fetchDepth: 1 + - template: /eng/pipelines/templates/steps/npm-install.yml - pwsh: | diff --git a/eng/pipelines/typespec-apiview.yml b/eng/pipelines/typespec-apiview.yml index e361d4292280..9111598cd5ec 100644 --- a/eng/pipelines/typespec-apiview.yml +++ b/eng/pipelines/typespec-apiview.yml @@ -21,7 +21,7 @@ jobs: steps: - checkout: self - fetchDepth: 0 + fetchDepth: 2 - template: /eng/pipelines/templates/steps/use-node-version.yml From 8245a237643bd558c9217900d56c8a7e0dd0737b Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 7 Mar 2025 22:19:40 -0800 Subject: [PATCH 2/2] Add comments --- eng/pipelines/swagger-apiview.yml | 1 + eng/pipelines/swagger-prettier-check.yml | 1 + eng/pipelines/typespec-apiview.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/eng/pipelines/swagger-apiview.yml b/eng/pipelines/swagger-apiview.yml index 9008620abae2..f0aae3af5157 100644 --- a/eng/pipelines/swagger-apiview.yml +++ b/eng/pipelines/swagger-apiview.yml @@ -25,6 +25,7 @@ jobs: steps: - checkout: self + # Required to compare head commit with base commit fetchDepth: 2 - pwsh: | diff --git a/eng/pipelines/swagger-prettier-check.yml b/eng/pipelines/swagger-prettier-check.yml index 1b4122bfa2b8..c83a99f06089 100644 --- a/eng/pipelines/swagger-prettier-check.yml +++ b/eng/pipelines/swagger-prettier-check.yml @@ -11,6 +11,7 @@ jobs: steps: - checkout: self + # Only need head commit fetchDepth: 1 - template: /eng/pipelines/templates/steps/npm-install.yml diff --git a/eng/pipelines/typespec-apiview.yml b/eng/pipelines/typespec-apiview.yml index 9111598cd5ec..f53dbe72cda0 100644 --- a/eng/pipelines/typespec-apiview.yml +++ b/eng/pipelines/typespec-apiview.yml @@ -21,6 +21,7 @@ jobs: steps: - checkout: self + # Required to compare head commit with base commit fetchDepth: 2 - template: /eng/pipelines/templates/steps/use-node-version.yml