-
Notifications
You must be signed in to change notification settings - Fork 0
fix: handle errors in css.__withStyles getDynamicPatch #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,167 @@ | ||
| # Commit Changes | ||
|
|
||
| Complete workflow: branch → commit → push → PR | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| /commit [options] | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--push` or `-p`: Push to remote after commit | ||
| - `--pr`: Create PR after push | ||
| - `--all` or `-a`: Commit all changes at once | ||
| - `<path>`: Commit only specific path (e.g., `packages/kstyled`, `packages/babel-plugin-kstyled`) | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # Full workflow: commit src changes, push, create PR | ||
| /commit packages/kstyled --pr | ||
|
|
||
| # Commit all and create PR | ||
| /commit --all --pr | ||
|
|
||
| # Just commit specific path | ||
| /commit packages/babel-plugin-kstyled | ||
| ``` | ||
|
|
||
| ## Complete Workflow | ||
|
|
||
| ### 1. Check Branch | ||
|
|
||
| ```bash | ||
| # Check current branch | ||
| git branch --show-current | ||
| ``` | ||
|
|
||
| **If on `main`** → Create a feature branch first: | ||
|
|
||
| ```bash | ||
| git checkout -b feat/<feature-name> | ||
| ``` | ||
|
|
||
| **If NOT on `main`** → Proceed with commits directly. | ||
|
|
||
| **Branch naming conventions:** | ||
|
|
||
| - `feat/<feature-name>` - New features | ||
| - `fix/<bug-description>` - Bug fixes | ||
| - `docs/<doc-update>` - Documentation only | ||
| - `chore/<task>` - Maintenance tasks | ||
|
|
||
| ### 2. Pre-Commit Checks (CRITICAL) | ||
|
|
||
| Before staging any changes, run the following checks: | ||
|
|
||
| ```bash | ||
| # Lint check | ||
| bun run lint | ||
|
|
||
| # Type check | ||
| bun run typecheck | ||
|
|
||
| # Run tests | ||
| bun run test | ||
| ``` | ||
|
|
||
| **IMPORTANT:** Only proceed with commit if ALL checks pass. | ||
|
|
||
| ### 3. Check Current Status | ||
|
|
||
| ```bash | ||
| git status | ||
| git diff --name-only | ||
| ``` | ||
|
|
||
| ### 4. Stage Changes | ||
|
|
||
| **kstyled package:** | ||
|
|
||
| ```bash | ||
| git add packages/kstyled/ | ||
| ``` | ||
|
|
||
| **Babel plugin:** | ||
|
|
||
| ```bash | ||
| git add packages/babel-plugin-kstyled/ | ||
| ``` | ||
|
|
||
| **All changes:** | ||
|
|
||
| ```bash | ||
| git add . | ||
| ``` | ||
|
|
||
| ### 5. Review Staged Changes | ||
|
|
||
| ```bash | ||
| git diff --cached --stat | ||
| git diff --cached --name-only | ||
| ``` | ||
|
|
||
| ### 6. Create Commit | ||
|
|
||
| Follow Angular Conventional Commit format: | ||
|
|
||
| ```bash | ||
| git commit -m "$(cat <<'EOF' | ||
| <type>(<scope>): <description> | ||
|
|
||
| <body - what changed and why> | ||
|
|
||
| Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | ||
| EOF | ||
| )" | ||
| ``` | ||
|
|
||
| **Commit Types:** | Type | Description | |------|-------------| | `feat` | New feature | | `fix` | Bug fix | | `docs` | Documentation only | | `refactor` | Code refactoring | | `chore` | Maintenance tasks | | `test` | Adding/updating tests | | `perf` | Performance improvement | | `style` | Code style (formatting, semicolons, etc.) | | ||
|
|
||
| **Scope Examples:** | ||
|
|
||
| - `css` - css`` tagged template helper | ||
| - `styled` - styled component system | ||
| - `theme` - Theme provider | ||
| - `babel` - Babel plugin changes | ||
| - `types` - TypeScript type definitions | ||
|
|
||
| ### 7. Push to Remote | ||
|
|
||
| ```bash | ||
| git push -u origin <branch-name> | ||
| ``` | ||
|
|
||
| ### 8. Create Pull Request | ||
|
|
||
| ```bash | ||
| gh pr create --title "<type>(<scope>): <description>" --body "$(cat <<'EOF' | ||
| ## Summary | ||
|
|
||
| <1-3 bullet points describing changes> | ||
|
|
||
| ## Changes | ||
|
|
||
| - Change 1 | ||
| - Change 2 | ||
|
|
||
| ## Test plan | ||
|
|
||
| - [ ] `bun run lint` passes | ||
| - [ ] `bun run typecheck` passes | ||
| - [ ] `bun run test` passes | ||
|
|
||
| 🤖 Generated with [Claude Code](https://claude.ai/code) | ||
| EOF | ||
| )" | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Important Notes | ||
|
|
||
| - **ALWAYS** run pre-commit checks before committing | ||
| - **ALWAYS** include `Co-Authored-By` footer for Claude-assisted commits | ||
| - Use `bun` exclusively for all package management |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| # Review PR Comments | ||
|
|
||
| Review and address PR review comments for this repository. | ||
|
|
||
| ## Arguments | ||
|
|
||
| - `$ARGUMENTS` - PR number (e.g., `123`) or PR URL | ||
|
|
||
| ## Project-Specific Build Commands | ||
|
|
||
| Based on changed files, run these checks BEFORE committing: | ||
|
|
||
| | Path | Commands | | ||
| | --- | --- | | ||
| | `packages/kstyled/` | `bun run lint && bun run typecheck && bun run test` | | ||
| | `packages/babel-plugin-kstyled/` | `bun run lint && bun run typecheck && bun run test` | | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Step 1: Get PR Information | ||
|
|
||
| ```bash | ||
| # Get PR review comments | ||
| gh api repos/{owner}/{repo}/pulls/{pr_number}/comments | ||
|
|
||
| # Get PR reviews (approve, request changes, etc.) | ||
| gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews | ||
|
|
||
| # Get changed files | ||
| gh pr view {pr_number} --json files | ||
| ``` | ||
|
|
||
| ### Step 2: Analyze Each Comment | ||
|
|
||
| For each review comment: | ||
|
|
||
| 1. `path` - File path | ||
| 2. `line` or `original_line` - Line number | ||
| 3. `body` - Review content | ||
| 4. `diff_hunk` - Code context | ||
| 5. Determine if code change is needed | ||
|
|
||
| ### Step 3: Apply Fixes | ||
|
|
||
| 1. Read the target file | ||
| 2. Apply changes per reviewer feedback | ||
| 3. Track changes with TodoWrite | ||
| 4. Run project-specific checks | ||
|
|
||
| ### Step 4: Run Checks Before Commit | ||
|
|
||
| ```bash | ||
| bun run lint | ||
| bun run typecheck | ||
| bun run test | ||
| ``` | ||
|
|
||
| ### Step 5: Commit Changes | ||
|
|
||
| ```bash | ||
| git add <changed-files> | ||
| git commit -m "$(cat <<'EOF' | ||
| fix: address PR review comments | ||
|
|
||
| - <summary of change 1> | ||
| - <summary of change 2> | ||
|
|
||
| Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | ||
| EOF | ||
| )" | ||
| ``` | ||
|
|
||
| ### Step 6: Reply to Comments | ||
|
|
||
| Reply to each addressed comment: | ||
|
|
||
| ```bash | ||
| gh api repos/{owner}/{repo}/pulls/{pr_number}/comments/{comment_id}/replies \ | ||
| -X POST -f body="Fixed in abc1234. | ||
|
|
||
| **Changes:** | ||
| - Description of what was changed" | ||
| ``` | ||
|
|
||
| ## Reply Format Rules (CRITICAL) | ||
|
|
||
| When replying to PR comments: | ||
|
|
||
| ### Commit Hash Formatting | ||
|
|
||
| **NEVER wrap commit hashes in backticks or code blocks.** GitHub only auto-links plain text commit hashes. | ||
|
|
||
| | Format | Example | Result | | ||
| | ---------- | ----------------------- | ------------------------ | | ||
| | CORRECT | Fixed in f3b5fec. | Clickable link to commit | | ||
| | WRONG | `Fixed in \`f3b5fec\`.` | Plain text, no link | | ||
|
|
||
| ## Result Report | ||
|
|
||
| After addressing all comments, report: | ||
|
|
||
| - List of modified files | ||
| - Summary of changes per file | ||
| - Commit hash | ||
| - Any comments not addressed and why | ||
|
|
||
| ## Notes | ||
|
|
||
| - If a comment is a question or praise, no code change needed | ||
| - If reviewer intent is unclear, ask for clarification | ||
| - Use `bun` exclusively for all commands | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.