Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .cursor/rules/create-pr.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
description: Create PR message for merging current branch into target branch (default: origin/develop)
alwaysApply: false
---

# Create PR Workflow

When the user asks to **Create PR** (or "create pull request", "generate PR message"):

## Steps

1. **Determine target branch** – Default is `origin/develop`. If the user specifies a different branch in their message, use that instead.

2. **Get current branch** – Run `git branch --show-current` to get the source branch.

3. **Get commit range** – Compare current branch against target. Run:
```bash
git log origin/develop..HEAD --oneline
```
(Replace `origin/develop` with the target branch if changed.)

4. **Generate PR message** – Create a markdown PR message following the project's PR format (see `pr-message-format.mdc`). Include:
- Title
- Summary of changes
- Key features/improvements
- Included commits
- Merge request line: `source-branch` β†’ `target-branch`

5. **Save to file** – Write the PR message to an MD file, e.g. `PR_MESSAGE.md` or `pr-message.md` in the project root.

## Example output file

```markdown
## πŸš€ feat: Add minimatch override for security

### πŸ“‹ Summary
...

**Merge Request:** `feature/xyz` β†’ `origin/develop`
```
Comment thread
sergak01 marked this conversation as resolved.
37 changes: 37 additions & 0 deletions .cursor/rules/create-release.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
description: Create release tag from latest origin/main with version from package.json (without beta suffix)
alwaysApply: false
---

# Create Release Workflow

When the user asks to **Create release** (or "create tag", "release tag"):

## Steps

1. **Read version from package.json** – Get the `version` field (e.g. `0.5.5-beta.2`).

2. **Strip beta suffix** – Remove `-beta.*`, `-alpha.*`, `-rc.*` etc. Examples:
- `0.5.5-beta.2` β†’ `0.5.5`
- `1.0.0-rc.1` β†’ `1.0.0`
- `2.3.4` β†’ `2.3.4` (unchanged)

3. **Tag name** – Use `v` + stripped version: `v0.5.5`.

4. **Create tag on latest origin/main** – Run:
```bash
git fetch origin main
git tag v<version> origin/main -m "Release v<version>"
```
Example: `git tag v0.5.5 origin/main -m "Release v0.5.5"`

5. **Push tag** (if user wants to publish):
```bash
git push origin v<version>
```

## Notes

- Tag is created from `origin/main`, not from the current branch.
- Do not push the tag unless the user explicitly requests it.
- Confirm the version and tag name with the user before creating/pushing.
Comment thread
sergak01 marked this conversation as resolved.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ template-*/package-lock.json

# Pack files
*-create-pp-dev-*.*.*.tgz
*-create-pp-dev-latest.tgz

# Environment
.env
Expand Down
Loading