Skip to content

Commit 0eba622

Browse files
committed
chore: add ci-pr-helper skill
1 parent 609b159 commit 0eba622

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: ci-pr-helper
3+
description: Run local test/style checks and open GitHub PRs for lance-context. Use when asked to run CI-equivalent checks (uv pytest, ruff/pyright, cargo fmt/clippy/test) and then create a PR with a proper title/body.
4+
---
5+
6+
# CI PR Helper
7+
8+
## Overview
9+
Run project checks locally, then prepare and open a PR with a clear title and summary.
10+
11+
## Workflow
12+
13+
1. Ensure you are on a feature branch (not `main`).
14+
2. Run local checks via the script in `scripts/`.
15+
3. Draft a PR title/body using the template below.
16+
4. If `gh` is available and authenticated, run `gh pr create` with the draft.
17+
18+
## Local checks
19+
20+
Run:
21+
22+
```bash
23+
./.codex/skills/ci-pr-helper/scripts/run_ci_checks.sh
24+
```
25+
26+
If it fails due to missing tools, install `uv`, `cargo`, or Python deps, then rerun.
27+
28+
## PR creation
29+
30+
Draft a conventional title (e.g., `feat:`/`fix:`/`ci:`) and use:
31+
32+
```
33+
## Summary
34+
- ...
35+
36+
## Testing
37+
- uv run pytest
38+
- cargo test --manifest-path rust/lance-context/Cargo.toml
39+
- cargo fmt --manifest-path rust/lance-context/Cargo.toml -- --check
40+
- cargo clippy --manifest-path rust/lance-context/Cargo.toml --all-targets -- -D warnings
41+
- ruff format --check python/
42+
- ruff check python/
43+
- pyright
44+
```
45+
46+
If possible, run:
47+
48+
```bash
49+
gh auth status
50+
gh pr create --title "<title>" --body "<body>"
51+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
root="$(git rev-parse --show-toplevel)"
5+
6+
if ! command -v uv >/dev/null 2>&1; then
7+
echo "uv not found; install uv to run Python checks."
8+
exit 1
9+
fi
10+
11+
if ! command -v cargo >/dev/null 2>&1; then
12+
echo "cargo not found; install Rust to run Rust checks."
13+
exit 1
14+
fi
15+
16+
cd "$root"
17+
18+
cargo fmt --manifest-path rust/lance-context/Cargo.toml -- --check
19+
cargo clippy --manifest-path rust/lance-context/Cargo.toml --all-targets -- -D warnings
20+
cargo test --manifest-path rust/lance-context/Cargo.toml
21+
22+
cd "$root/python"
23+
uv run pytest
24+
uv run ruff format --check python/
25+
uv run ruff check python/
26+
uv run pyright

0 commit comments

Comments
 (0)