Skip to content

Commit 5d82d4e

Browse files
a
1 parent d5c4c23 commit 5d82d4e

File tree

2 files changed

+35
-49
lines changed

2 files changed

+35
-49
lines changed

.github/workflows/claude_review.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ jobs:
2828
with:
2929
fetch-depth: 1
3030

31-
- name: Setup GitHub CLI
32-
run: |
33-
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
34-
3531
- name: Run Claude Code Review
3632
# Optional: Filter by PR author
3733
if: contains(join(github.event.pull_request.labels.*.name, ','), 'review required')

CLAUDE.md

Lines changed: 35 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -32,67 +32,57 @@ Keep following things in mind:
3232
## Upstream Repository
3333
- **Repository**: stefanzweifel/git-auto-commit-action
3434

35-
## Simple File-by-File Comparison
35+
## 🚨 MANDATORY: Cherry-Pick Verification
3636

37-
For each file changed in upstream, compare with our PR and report:
37+
**CRITICAL: For cherry-pick PRs, you MUST fetch upstream data and compare file-by-file**
3838

39-
1. **Extract Target Release Version** from PR description
40-
2. **Get ALL upstream files** and their changes
41-
3. **Get ALL our PR files** and their changes
42-
4. **For each file, report**:
43-
-**Same**: Changes match exactly
44-
-**Extra**: We have more changes than upstream
45-
-**Missing**: We have fewer changes than upstream
46-
-**Not in our PR**: File exists in upstream but not in our PR
39+
### Steps to Complete Cherry-Pick Verification:
4740

48-
### Commands
49-
```bash
50-
# Get target version
51-
gh pr view <PR_NUMBER> --json body | jq -r '.body' | grep "Target Release Version:" | sed 's/.*Target Release Version: *//'
41+
1. **Extract Target Version** from PR description (look for "Target Release Version: X.X.X")
5242

53-
# Get upstream file list and changes
54-
gh api repos/stefanzweifel/git-auto-commit-action/compare/v{PREV}...v{TARGET} | jq '.files[] | {filename: .filename, additions: .additions, deletions: .deletions}'
43+
2. **Get Upstream Releases** using WebFetch:
44+
- Fetch: `https://github.com/stefanzweifel/git-auto-commit-action/releases`
45+
- Find the target version and the previous version
5546

56-
# Get our PR file list and changes
57-
gh pr view <PR_NUMBER> --json files | jq '.files[] | {filename: .filename, additions: .additions, deletions: .deletions}'
58-
```
47+
3. **Get Upstream Changes** using WebFetch:
48+
- Fetch: `https://github.com/stefanzweifel/git-auto-commit-action/compare/v{PREV}...v{TARGET}`
49+
- Extract all changed files and their line counts
5950

60-
### Comment Template
61-
```markdown
62-
## File-by-File Comparison: v{TARGET}
51+
4. **Compare with Our PR**:
52+
- Get our PR file changes (already available)
53+
- For each upstream file, report:
54+
-**Same**: Changes match exactly
55+
-**Extra**: We have more changes than upstream
56+
-**Missing**: We have fewer changes than upstream
57+
-**Not in our PR**: File exists in upstream but not in our PR
6358

64-
### All Files Analysis
59+
5. **Provide Summary**: Total files, matches, missing, extra
6560

66-
**file1.ext**
67-
- Upstream: +5 lines, -2 lines
68-
- Our PR: +5 lines, -2 lines
69-
- Status: ✅ **Same**
61+
### Example URLs to Fetch:
62+
- **Releases**: `https://github.com/stefanzweifel/git-auto-commit-action/releases`
63+
- **Compare**: `https://github.com/stefanzweifel/git-auto-commit-action/compare/v6.0.0...v6.0.1`
7064

71-
**file2.ext**
72-
- Upstream: +10 lines, -3 lines
73-
- Our PR: +12 lines, -3 lines
74-
- Status: ➕ **Extra** (+2 lines more than upstream)
65+
### Expected Output Format:
66+
```markdown
67+
## Cherry-Pick Verification: v{TARGET}
7568

76-
**file3.ext**
77-
- Upstream: +8 lines, -4 lines
78-
- Our PR: +6 lines, -4 lines
79-
- Status: ➖ **Missing** (-2 lines less than upstream)
69+
### Upstream Analysis
70+
**Target Version**: v{TARGET}
71+
**Previous Version**: v{PREV}
72+
**Upstream Files Changed**: X files
8073

81-
**file4.ext**
82-
- Upstream: +15 lines, -1 line
83-
- Our PR: Not present
84-
- Status: ❌ **Not in our PR**
74+
### File-by-File Comparison
8575

86-
**file5.ext**
87-
- Upstream: Not present
88-
- Our PR: +3 lines, -1 line
89-
- Status: ⚠️ **Extra file** (not in upstream)
76+
**[filename]**
77+
- Upstream: +X lines, -Y lines
78+
- Our PR: +A lines, -B lines
79+
- Status: ✅ Same / ➕ Extra / ➖ Missing / ❌ Not in our PR
9080

9181
### Summary
9282
- **Total upstream files**: X
9383
- **Same**: X files ✅
94-
- **Extra changes**: X files ➕
95-
- **Missing changes**: X files ➖
9684
- **Missing files**: X files ❌
9785
- **Extra files**: X files ⚠️
86+
87+
### Result: ✅ Complete / ❌ Incomplete cherry-pick
9888
```

0 commit comments

Comments
 (0)