From 1f1d5335dc02a9f6654b0226015dde408baac44a Mon Sep 17 00:00:00 2001 From: Gauthier Petetin Date: Fri, 29 Sep 2023 15:55:05 +0200 Subject: [PATCH] fix(action): update fetch-depth parameter to fetch only the last commit, rather than the whole commit history We used to fetch the whole commit history which wasn't useful for this github action. This change allows to fetch only the latest commit which makes the workflow more efficient. This improvement is not a game changer, but it's worth doing it as the workflow runs quite often (multiple times for every PR), as it's triggered every time PR labels are updated. --- .github/workflows/check-pr-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr-labels.yml b/.github/workflows/check-pr-labels.yml index cc1cb37dbb53..cfd48e22c8b6 100644 --- a/.github/workflows/check-pr-labels.yml +++ b/.github/workflows/check-pr-labels.yml @@ -20,7 +20,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: - fetch-depth: 0 # This is needed to checkout all branches + fetch-depth: 1 # This retrieves only the latest commit. - name: Set up Node.js uses: actions/setup-node@v3