Skip to content

Commit

Permalink
fix(action): update fetch-depth parameter to fetch only the last comm…
Browse files Browse the repository at this point in the history
…it, 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.
  • Loading branch information
gauthierpetetin committed Sep 29, 2023
1 parent 5edceb2 commit 1f1d533
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f1d533

Please sign in to comment.