Skip to content

Commit d5c4c23

Browse files
a
1 parent 964fdf3 commit d5c4c23

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

CLAUDE.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Claude Configuration
12
Please review this pull request and provide comprehensive feedback.
23

34
🚨 **IMPORTANT**: If this is a cherry-pick PR (title contains "Cherry-picked changes from upstream"), you MUST also perform the file-by-file upstream comparison section below after the general review.
@@ -31,11 +32,9 @@ Keep following things in mind:
3132
## Upstream Repository
3233
- **Repository**: stefanzweifel/git-auto-commit-action
3334

34-
## 🚨 MANDATORY: Cherry-pick Verification for Cherry-pick PRs
35+
## Simple File-by-File Comparison
3536

36-
**CRITICAL REQUIREMENT: If PR title contains "Cherry-picked changes from upstream" then you MUST perform this file-by-file comparison section. This is the primary purpose of this review.**
37-
38-
For cherry-pick PRs, you MUST compare each file changed in upstream with our PR and report exact differences:
37+
For each file changed in upstream, compare with our PR and report:
3938

4039
1. **Extract Target Release Version** from PR description
4140
2. **Get ALL upstream files** and their changes
@@ -46,21 +45,13 @@ For cherry-pick PRs, you MUST compare each file changed in upstream with our PR
4645
-**Missing**: We have fewer changes than upstream
4746
-**Not in our PR**: File exists in upstream but not in our PR
4847

49-
### Commands (Only for Cherry-pick PRs)
48+
### Commands
5049
```bash
51-
# First check if this is a cherry-pick PR
52-
gh pr view <PR_NUMBER> --json title | jq -r '.title' | grep "chore: Cherry-picked changes from upstream"
53-
54-
# If it matches, then proceed with cherry-pick analysis:
55-
56-
# Get target version from PR description
57-
TARGET_VERSION=$(gh pr view <PR_NUMBER> --json body | jq -r '.body' | grep "Target Release Version:" | sed 's/.*Target Release Version: *//')
58-
59-
# Get all releases sorted by version and find the previous one before target
60-
PREV_VERSION=$(gh api repos/stefanzweifel/git-auto-commit-action/releases --paginate | jq -r '.[].tag_name' | sort -V | grep -B1 "v${TARGET_VERSION}" | head -1)
50+
# Get target version
51+
gh pr view <PR_NUMBER> --json body | jq -r '.body' | grep "Target Release Version:" | sed 's/.*Target Release Version: *//'
6152

62-
# Get upstream file list and changes between previous and target version
63-
gh api repos/stefanzweifel/git-auto-commit-action/compare/${PREV_VERSION}...v${TARGET_VERSION} | jq '.files[] | {filename: .filename, additions: .additions, deletions: .deletions}'
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}'
6455

6556
# Get our PR file list and changes
6657
gh pr view <PR_NUMBER> --json files | jq '.files[] | {filename: .filename, additions: .additions, deletions: .deletions}'
@@ -72,10 +63,30 @@ gh pr view <PR_NUMBER> --json files | jq '.files[] | {filename: .filename, addit
7263

7364
### All Files Analysis
7465

75-
**[filename]**
76-
- Upstream: +X lines, -Y lines
77-
- Our PR: +A lines, -B lines
78-
- Status: ✅ Same / ➕ Extra / ➖ Missing / ❌ Not in our PR / ⚠️ Extra file
66+
**file1.ext**
67+
- Upstream: +5 lines, -2 lines
68+
- Our PR: +5 lines, -2 lines
69+
- Status: ✅ **Same**
70+
71+
**file2.ext**
72+
- Upstream: +10 lines, -3 lines
73+
- Our PR: +12 lines, -3 lines
74+
- Status: ➕ **Extra** (+2 lines more than upstream)
75+
76+
**file3.ext**
77+
- Upstream: +8 lines, -4 lines
78+
- Our PR: +6 lines, -4 lines
79+
- Status: ➖ **Missing** (-2 lines less than upstream)
80+
81+
**file4.ext**
82+
- Upstream: +15 lines, -1 line
83+
- Our PR: Not present
84+
- Status: ❌ **Not in our PR**
85+
86+
**file5.ext**
87+
- Upstream: Not present
88+
- Our PR: +3 lines, -1 line
89+
- Status: ⚠️ **Extra file** (not in upstream)
7990

8091
### Summary
8192
- **Total upstream files**: X

0 commit comments

Comments
 (0)