Skip to content

Commit 5b73da2

Browse files
committed
workflows: lint-changed: add comment to explain +2
1 parent 7f455f3 commit 5b73da2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/lint-changed.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
- name: Count commits between merge base and HEAD
2121
id: count
2222
run: |
23+
# Fetch the number of commits from base up to and including main.
2324
RAW_COUNT="$(gh api "repos/$REPO/compare/${BASE}...main" | jq -r '.total_commits')"
25+
# When fetching we need to fetch the history + base + temp merge commit, thus +2.
2426
ADJUSTED_COUNT=$((RAW_COUNT + 2))
2527
echo "count=$ADJUSTED_COUNT" >> "$GITHUB_OUTPUT"
2628
env:

0 commit comments

Comments
 (0)