Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/impeccable-skills-reviewer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 1 addition & 35 deletions .github/workflows/impeccable-skills-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,7 @@ imports:
min-integrity: approved
- shared/reporting.md
- shared/otlp.md
pre-agent-steps:
- name: Pre-fetch PR diff and review comments
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
EXPR_GITHUB_REPOSITORY: ${{ github.repository }}
PR_DIFF_MAX_LINES: "3000"
run: |
set -euo pipefail
mkdir -p /tmp/gh-aw/agent
# Skip fetch if cache already populated this data (actions/cache restore)
if [ -f /tmp/gh-aw/agent/pr-diff.patch ] && [ -f /tmp/gh-aw/agent/pr-meta.json ] && [ -f /tmp/gh-aw/agent/pr-review-comments.json ]; then
LINES=$(wc -l < /tmp/gh-aw/agent/pr-diff.patch)
COMMENT_COUNT=$(jq 'length' /tmp/gh-aw/agent/pr-review-comments.json)
echo "Cache hit: using pre-fetched PR data (${LINES} diff lines, ${COMMENT_COUNT} review comments)"
else
{ gh pr diff "$PR_NUMBER" --repo $EXPR_GITHUB_REPOSITORY \
--exclude '**/*.lock.yml' \
--exclude '**/generated/**' \
--exclude '**/dist/**' \
--exclude '**/build/**' \
|| true; } | head -n "${PR_DIFF_MAX_LINES}" > /tmp/gh-aw/agent/pr-diff.patch
LINES=$(wc -l < /tmp/gh-aw/agent/pr-diff.patch)
gh pr view "$PR_NUMBER" \
--repo $EXPR_GITHUB_REPOSITORY \
--json number,title,body,headRefName,additions,deletions,changedFiles,files \
> /tmp/gh-aw/agent/pr-meta.json
gh api "repos/$EXPR_GITHUB_REPOSITORY/pulls/$PR_NUMBER/comments" \
--paginate \
--jq '.[] | {id, path, line: (.line // .original_line), body: .body[:200], user: .user.login}' \
2>/dev/null | jq -s '.' > /tmp/gh-aw/agent/pr-review-comments.json \
|| echo '[]' > /tmp/gh-aw/agent/pr-review-comments.json
COMMENT_COUNT=$(jq 'length' /tmp/gh-aw/agent/pr-review-comments.json)
echo "Pre-fetched PR diff (${LINES} lines), metadata, and ${COMMENT_COUNT} existing review comments"
fi
- shared/pr-diff-data-fetch.md
tools:
cli-proxy: true
github:
Expand Down
Loading