Skip to content

Commit b2d018f

Browse files
committed
docs: add CLAUDE.md for Claude Code guidance
1 parent 619f8bf commit b2d018f

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

CLAUDE.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Critical Rules
6+
7+
These rules override all other instructions:
8+
9+
1. **NEVER commit directly to main** - Always create a feature branch and submit a pull request
10+
2. **Conventional commits** - Format: `type(scope): description`
11+
3. **GitHub Issues for TODOs** - Use `gh` CLI to manage issues, no local TODO files. Use conventional commit format for issue titles
12+
4. **Pull Request titles** - Use conventional commit format (same as commits)
13+
5. **Branch naming** - Use format: `type/short-description` (e.g., `feat/new-input`)
14+
6. **Working an issue** - Always create a new branch from an updated main branch
15+
7. **Check branch status before pushing** - Verify the remote tracking branch still exists. If a PR was merged/deleted, create a new branch from main instead
16+
17+
## Project Overview
18+
19+
This is a GitHub Action that publishes JetBrains plugins to the JetBrains Marketplace. It's a TypeScript-based action that uses the JetBrains Plugin Repository API to upload plugin ZIP files.
20+
21+
## Common Commands
22+
23+
```bash
24+
# Install dependencies
25+
npm ci
26+
27+
# Run tests
28+
npm test
29+
30+
# Run tests (CI mode)
31+
npm run ci-test
32+
33+
# Format code
34+
npm run format:write
35+
36+
# Check formatting
37+
npm run format:check
38+
39+
# Build/package the action (outputs to dist/)
40+
npm run package
41+
42+
# Full build pipeline (format, test, coverage, package)
43+
npm run all
44+
```
45+
46+
## Architecture
47+
48+
**Single-file action**: The action entry point is `src/index.ts`, which is bundled to `dist/index.js` using `@vercel/ncc`. The action:
49+
1. Reads inputs via `@actions/core` (marketplace PAT, archive path, plugin ID, channel, etc.)
50+
2. Validates the ZIP file exists
51+
3. Uploads to `https://plugins.jetbrains.com/plugin/uploadPlugin` via multipart form POST
52+
53+
**Action configuration**: `action.yml` defines the action metadata and inputs. The action runs on Node 20.
54+
55+
**Tests**: Located in `__tests__/` directory, using Jest with ts-jest preset.
56+
57+
## Key Files
58+
59+
- `src/index.ts` - Main action logic
60+
- `action.yml` - GitHub Action definition
61+
- `dist/index.js` - Bundled output (committed to repo)

0 commit comments

Comments
 (0)