Skip to content

Commit 2c86347

Browse files
committed
ci
1 parent 591ff24 commit 2c86347

File tree

8 files changed

+219
-174
lines changed

8 files changed

+219
-174
lines changed
File renamed without changes.

.claude/commands/translate.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,27 @@ Preserve all Markdown formatting, code blocks, and component tags. Do not transl
33
Filename for <name>.mdx (English) = <name>.cn.mdx (Chinese)
44
The content is in .mdx format, which combines Markdown with JSX components.
55

6-
- Do not translate the provider as 提供者, just keep it as provider.
7-
- Do not translate the entry as 条目, just keep it as entry.
8-
- Do not translate the leaf as 叶子, just keep it as leaf.
9-
- Do not translate the element as 元素, just keep it as element.
6+
# Important Notice
7+
8+
1.DONOT remove any content.
9+
2.You can translate the title markdown ## Plugin Context.
10+
11+
For Example:
12+
<APIItem name="extendApi" type="function">
13+
xxxx content
14+
15+
```ts
16+
(api: (ctx: PlatePluginContext<AnyPluginConfig>) => any) => PlatePlugin<C>;
17+
```
18+
19+
</APIItem>
20+
21+
After translate:
22+
<APIItem name="extendApi" type="function">
23+
xxxx 内容
24+
25+
```ts
26+
(api: (ctx: PlatePluginContext<AnyPluginConfig>) => any) => PlatePlugin<C>;
27+
```
28+
29+
</APIItem>

.cursor/docs-slate.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

.cursor/translate.md

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Claude Changeset
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
pull_request_review:
9+
types: [submitted]
10+
pull_request:
11+
types: [opened]
12+
paths:
13+
- 'packages/**'
14+
15+
jobs:
16+
create-changeset:
17+
# Only respond to @claude changeset mentions from authorized users in PRs
18+
# OR when packages are modified without changesets
19+
if: |
20+
(
21+
(
22+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude changeset') && github.event.issue.pull_request) ||
23+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude changeset')) ||
24+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude changeset'))
25+
) && (
26+
github.actor == 'zbeyens' ||
27+
github.actor == 'felixfeng33'
28+
)
29+
) || (
30+
github.event_name == 'pull_request' &&
31+
(github.actor == 'zbeyens' || github.actor == 'felixfeng33')
32+
)
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: write
36+
pull-requests: write
37+
issues: read
38+
id-token: write
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
45+
- name: Check for package changes without changesets
46+
id: check-changes
47+
if: github.event_name == 'pull_request'
48+
run: |
49+
# Get list of modified package files
50+
PACKAGE_CHANGES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '^packages/')
51+
52+
if [ -n "$PACKAGE_CHANGES" ]; then
53+
# Check if any changeset files were created
54+
CHANGESET_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '^.changeset/')
55+
56+
if [ -z "$CHANGESET_FILES" ]; then
57+
echo "::set-output name=needs_changeset::true"
58+
echo "Found package changes without corresponding changeset files"
59+
else
60+
echo "::set-output name=needs_changeset::false"
61+
echo "Changeset files already exist"
62+
fi
63+
else
64+
echo "::set-output name=needs_changeset::false"
65+
echo "No package changes detected"
66+
fi
67+
68+
- name: Create Changeset
69+
if: |
70+
github.event_name != 'pull_request' ||
71+
(github.event_name == 'pull_request' && steps.check-changes.outputs.needs_changeset == 'true')
72+
uses: grll/claude-code-action@beta
73+
with:
74+
use_oauth: true
75+
claude_access_token: ${{ secrets.CLAUDE_ACCESS_TOKEN }}
76+
claude_refresh_token: ${{ secrets.CLAUDE_REFRESH_TOKEN }}
77+
claude_expires_at: ${{ secrets.CLAUDE_EXPIRES_AT }}
78+
timeout_minutes: '60'
79+
direct_prompt: |
80+
You are tasked with creating changesets for the Plate project. Please follow these guidelines:
81+
82+
**Primary Reference:**
83+
- Follow the Changeset Guide (.claude/commands/changeset.md) for structure, naming, and writing style
84+
85+
**Changeset Standards:**
86+
- Use descriptive file naming: `[package]-[change-type].md`
87+
- Include proper YAML frontmatter with affected packages and change types
88+
- Write clear, concise descriptions using past tense verbs
89+
- Focus on public API changes and user impact only
90+
- Provide migration guidance for breaking changes
91+
- Use code blocks to show "Before" and "After" examples
92+
- Create separate changeset files for each distinct change type (major/minor/patch)
93+
94+
**Change Type Guidelines:**
95+
- **major**: Breaking changes requiring user code updates
96+
- **minor**: New features that are backward-compatible
97+
- **patch**: Bug fixes and minor backward-compatible changes
98+
99+
**Writing Style:**
100+
- Start bullet points with past tense verbs (Renamed, Added, Fixed, Removed)
101+
- Be direct and action-oriented like Radix UI changelog style
102+
- Use bold text for package names, plugin names, and important properties
103+
- Keep descriptions concise and focused on user impact
104+
- Provide clear migration steps for breaking changes
105+
106+
**File Organization:**
107+
- Create changeset files in `.changeset/` directory
108+
- Use descriptive names that indicate package and change type
109+
- One file per distinct change to enable proper SemVer bumping
110+
111+
Please analyze the changes in this PR and create appropriate changeset files following the guide.

.github/workflows/claude-docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Claude Docs
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
pull_request_review:
9+
types: [submitted]
10+
11+
jobs:
12+
update-docs:
13+
# Only respond to @claude docs mentions from authorized users in PRs
14+
if: |
15+
(
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude docs') && github.event.issue.pull_request) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude docs')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude docs'))
19+
) && (
20+
github.actor == 'zbeyens' ||
21+
github.actor == 'felixfeng33'
22+
)
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
issues: read
28+
id-token: write
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 1
34+
35+
- name: Update Documentation
36+
uses: grll/claude-code-action@beta
37+
with:
38+
use_oauth: true
39+
claude_access_token: ${{ secrets.CLAUDE_ACCESS_TOKEN }}
40+
claude_refresh_token: ${{ secrets.CLAUDE_REFRESH_TOKEN }}
41+
claude_expires_at: ${{ secrets.CLAUDE_EXPIRES_AT }}
42+
timeout_minutes: '60'
43+
direct_prompt: |
44+
You are tasked with updating Plate documentation. Please follow these guidelines:
45+
46+
**Primary References:**
47+
- Follow the Plugin Documentation Guide (.claude/commands/docs-plugin.md) for structure and style if documenting a plugin. Otherwise, just use a similar style.
48+
- Use the Translation Command (.claude/commands/translate.md) for any localization needs
49+
50+
**Documentation Standards:**
51+
- Maintain "shadcn-like straight to the point" writing style
52+
- Keep documentation headless - don't assume users are using Plate UI directly
53+
- Follow the standard section order: Kit Usage → Manual Usage → Plugins → API → Transforms
54+
- Preserve existing API formatting (don't change <APIOptions> to <APIParameters>)
55+
- Link to Plate UI components as examples with proper documentation links
56+
- Focus on actual plugin capabilities confirmed from source code
57+
58+
**Specific Tasks:**
59+
1. Analyze any changed plugin files to identify documentation updates needed
60+
2. Update corresponding documentation files in docs/(plugins)/ directories
61+
3. Ensure all code examples use current syntax and patterns
62+
4. Add or update Chinese translations (.cn.mdx files) following translate.md guidelines
63+
5. Update changelog.mdx if registry components were modified
64+
6. Maintain consistency with existing documentation style
65+
66+
**Writing Style:** Easy to read for the average English developer. Avoid multiple paragraphs in a row.
67+
68+
**File Organization:**
69+
- Plugin docs: docs/(plugins)/(category)/plugin-name.mdx
70+
- Chinese versions: docs/(plugins)/(category)/plugin-name.cn.mdx
71+
- Component docs: update docs/components/changelog.mdx only if apps/www/src/registry components got changes
72+
73+
Please review the changes in this PR/issue and update the relevant documentation accordingly.

.github/workflows/claude-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ jobs:
6464
6565
Provide detailed feedback and suggestions for improvement.
6666
67-
Writing style: easy to read (average english user), and to the point.
67+
Writing style: easy to read for the average English developer. Avoid multiple paragraphs in a row.

0 commit comments

Comments
 (0)