From 273f749f11219a5ea9e2fedd57ff1a70b49e39d8 Mon Sep 17 00:00:00 2001 From: Gauthier Petetin Date: Fri, 29 Sep 2023 15:55:13 +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 492e21e40a3..6e0bf98762a 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