Skip to content
Open
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
target
.idea
.idea
.kilo/
!.kilo/
.kilo/*
!.kilo/skills/
!.kilo/skills/**
68 changes: 68 additions & 0 deletions .kilo/skills/create-pr/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: create-pr
description: Create GitHub pull requests with the gh CLI using the reductstore/.github PR template, then update CHANGELOG.md with the created PR ID and commit the changelog (do not push). Use when a user asks to open a PR and record its ID in the changelog.
---

# Create Pr

## Overview

Create a PR using the standardized template from reductstore/.github, then record the PR number in CHANGELOG.md and commit the changelog without pushing.

## Workflow

### 1) Preconditions
- Ensure `gh auth status` is logged in and the current branch is the intended PR branch.
- Ensure the working tree is clean (or only the intended changes are present).
- Use context from the current conversation to infer intent, scope, and any constraints.

### 2) Understand changes and rationale
- Compare the current branch against `main` to understand what changed and why (use this to derive the PR title, description, and rationale):
- `git fetch origin main`
- `git log --oneline origin/main..HEAD`
- `git diff --stat origin/main...HEAD`
- `git diff origin/main...HEAD`
- If the branch name starts with an issue number (e.g., `123-...`), use that issue in the rationale and fill the `Closes #` line in the PR template.
- If the branch name does not include an issue number, infer the likely issue from changes and conversation context, or leave `Closes #` empty if unsure.

### 3) Fetch the PR template
Use the helper script to download the latest PR template from reductstore/.github:

```bash
./.kilo/skills/create-pr/scripts/fetch_pr_template.sh /tmp/pr_template.md
```

Fill in the template file with the relevant summary, testing, and rationale derived from the diff and conversation context.

### 4) Create the PR with gh
Use the filled template as the PR body:

```bash
gh pr create --title "<title>" --body-file /tmp/pr_template.md
```

Capture the PR number after creation:

```bash
gh pr view --json number -q .number
```

### 5) Update CHANGELOG.md
- Find the appropriate section (usually the most recent/unreleased section).
- Add a new entry following the existing style in the file.
- Include the PR ID as `#<number>` exactly as prior entries do.

### 6) Commit (no push)
Stage and commit the changelog update only:

```bash
git add CHANGELOG.md
git commit -m "Update changelog for PR #<number>"
```

Do not push.

## Resources

### scripts/
- `fetch_pr_template.sh`: Download the latest PR template from reductstore/.github.
20 changes: 20 additions & 0 deletions .kilo/skills/create-pr/scripts/fetch_pr_template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail

if [[ $# -ne 1 ]]; then
echo "Usage: $0 <output-file>" >&2
exit 1
fi

output_file="$1"

curl -sS -L \
"https://raw.githubusercontent.com/reductstore/.github/main/.github/pull_request_template.md" \
-o "$output_file"

if [[ ! -s "$output_file" ]]; then
echo "Template download failed or empty: $output_file" >&2
exit 1
fi

echo "Template saved to $output_file"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add OAuth2 login command for aliases and direct gateway URLs, [PR-271](https://github.com/reductstore/reduct-cli/pull/271) by @atimin
- Add destination prefixes to replica create, update, and show commands, [PR-247](https://github.com/reductstore/reduct-cli/pull/247) by @ychampion
- Add compression option to replica create, update, and show commands, [PR-261](https://github.com/reductstore/reduct-cli/pull/261) by @vbmade2000
- Improve time parsing for --start and --stop options, [PR-226](https://github.com/reductstore/reduct-cli/pull/226) by @yaslam-dev
Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ toml = "1.0.6"
serde = { version = "1.0.219", features = ["derive"] }
anyhow = "1.0.98"
url = { version = "2.5.4", features = ["serde"] }
tokio = { version = "1.52.3", features = ["rt-multi-thread"] }
tokio = { version = "1.52.3", features = ["io-util", "net", "rt-multi-thread", "time"] }
time-humanize = "0.1.3"
bytesize = "2.3.1"
colored = "3.0.0"
chrono = "0.4.41"
dialoguer = "0.12.0"
futures-util = { version = "0.3.30", features = [] }
http-body-util = "0.1.3"
hyper = { version = "1.10.1", features = ["http1", "server"] }
hyper-util = { version = "0.1.20", features = ["tokio"] }
indicatif = "0.18.3"
async-trait = "0.1.89"
bytes = "1.11.0"
Expand Down
1 change: 1 addition & 0 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub(crate) mod attachment;
pub(crate) mod bucket;
pub(crate) mod cp;
pub(crate) mod lifecycle;
pub(crate) mod login;
pub(crate) mod replica;
pub(crate) mod rm;
pub(crate) mod server;
Expand Down
Loading
Loading