Skip to content

Commit 555e77a

Browse files
committed
fix: fetch origin/main before diffing in doc-freshness agent job
The gh-aw agent job checks out only the triggering ref, so 'git log origin/main' failed with exit 128 (unknown revision). Explicitly fetch main into refs/remotes/origin/main first. Temporary push trigger still active.
1 parent ec5aecd commit 555e77a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/doc-freshness.lock.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/doc-freshness.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ steps:
5858
run: |
5959
# Fetch commits since last doc-drift issue (or last 7 days)
6060
SINCE="$SINCE_DATE"
61+
# The agent job checks out only the triggering ref, so ensure origin/main
62+
# is available before diffing against it.
63+
git fetch --no-tags --depth=200 origin +refs/heads/main:refs/remotes/origin/main \
64+
|| git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
6165
git log origin/main --since="$SINCE" --oneline --name-only > /tmp/gh-aw/recent-commits.txt
6266
echo "commit_file=recent-commits.txt" >> "$GITHUB_OUTPUT"
6367
echo "Commits since: $SINCE ($(wc -l < /tmp/gh-aw/recent-commits.txt) lines)"

0 commit comments

Comments
 (0)