pi-pr-review 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/pull-request.yml +52 -0
- package/.github/workflows/release-please.yml +69 -0
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +9 -0
- package/README.md +2 -0
- package/RELEASING.md +26 -0
- package/package.json +1 -1
- package/release-please-config.json +23 -0
- package/.pi/npm/.gitignore +0 -2
- package/.pi/settings.json +0 -5
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Pull Request
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- edited
|
|
8
|
+
- synchronize
|
|
9
|
+
- reopened
|
|
10
|
+
- ready_for_review
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
title:
|
|
17
|
+
name: Validate PR title
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 5
|
|
20
|
+
steps:
|
|
21
|
+
- name: Check Conventional Commit format
|
|
22
|
+
env:
|
|
23
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
24
|
+
run: |
|
|
25
|
+
node <<'NODE'
|
|
26
|
+
const title = process.env.PR_TITLE ?? "";
|
|
27
|
+
const conventionalTitle = /^(feat|fix|perf|revert|docs|style|refactor|test|chore)(\([a-z0-9][a-z0-9._/-]*\))?!?: \S.*$/;
|
|
28
|
+
|
|
29
|
+
if (!conventionalTitle.test(title)) {
|
|
30
|
+
console.error(`Invalid PR title: ${title}`);
|
|
31
|
+
console.error("Use: <type>(optional-scope): description");
|
|
32
|
+
console.error("Allowed types: feat, fix, perf, revert, docs, style, refactor, test, chore");
|
|
33
|
+
console.error("Add ! before : for a breaking change, for example feat!: description");
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
NODE
|
|
37
|
+
|
|
38
|
+
test:
|
|
39
|
+
name: Test
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
timeout-minutes: 20
|
|
42
|
+
steps:
|
|
43
|
+
- name: Check out repository
|
|
44
|
+
uses: actions/checkout@v4
|
|
45
|
+
|
|
46
|
+
- name: Set up Bun
|
|
47
|
+
uses: oven-sh/setup-bun@v2
|
|
48
|
+
with:
|
|
49
|
+
bun-version: 1.2.15
|
|
50
|
+
|
|
51
|
+
- name: Run tests
|
|
52
|
+
run: bun test
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: release-please-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: false
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release:
|
|
15
|
+
name: Create release PR or GitHub release
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
timeout-minutes: 10
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
outputs:
|
|
21
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
22
|
+
steps:
|
|
23
|
+
- name: Create nerv-ops installation token
|
|
24
|
+
id: app-token
|
|
25
|
+
uses: actions/create-github-app-token@v2
|
|
26
|
+
with:
|
|
27
|
+
app-id: ${{ vars.NERV_OPS_APP_ID }}
|
|
28
|
+
private-key: ${{ secrets.NERV_OPS_PRIVATE_KEY }}
|
|
29
|
+
|
|
30
|
+
- name: Run Release Please
|
|
31
|
+
id: release
|
|
32
|
+
uses: googleapis/release-please-action@v4
|
|
33
|
+
with:
|
|
34
|
+
config-file: release-please-config.json
|
|
35
|
+
manifest-file: .release-please-manifest.json
|
|
36
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
37
|
+
|
|
38
|
+
publish:
|
|
39
|
+
name: Test and publish to npm
|
|
40
|
+
needs: release
|
|
41
|
+
if: ${{ needs.release.outputs.release_created == 'true' }}
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
timeout-minutes: 20
|
|
44
|
+
permissions:
|
|
45
|
+
contents: read
|
|
46
|
+
id-token: write
|
|
47
|
+
steps:
|
|
48
|
+
- name: Check out release commit
|
|
49
|
+
uses: actions/checkout@v4
|
|
50
|
+
|
|
51
|
+
- name: Set up Node.js
|
|
52
|
+
uses: actions/setup-node@v4
|
|
53
|
+
with:
|
|
54
|
+
node-version: 22
|
|
55
|
+
registry-url: https://registry.npmjs.org
|
|
56
|
+
|
|
57
|
+
- name: Set up Bun
|
|
58
|
+
uses: oven-sh/setup-bun@v2
|
|
59
|
+
with:
|
|
60
|
+
bun-version: 1.2.15
|
|
61
|
+
|
|
62
|
+
- name: Install npm with trusted publishing support
|
|
63
|
+
run: npm install --global npm@11.5.1
|
|
64
|
+
|
|
65
|
+
- name: Test
|
|
66
|
+
run: bun test
|
|
67
|
+
|
|
68
|
+
- name: Publish to npm
|
|
69
|
+
run: npm publish --access public --provenance
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.6.2](https://github.com/10ego/pi-pr-review/compare/v1.6.1...v1.6.2) (2026-07-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **release:** automate versioning and npm publishing ([585e961](https://github.com/10ego/pi-pr-review/commit/585e9616a85153a8edb03ec66acb7b75739706b0))
|
|
9
|
+
* **release:** version every conventional PR ([be175e8](https://github.com/10ego/pi-pr-review/commit/be175e811bca1a0e74bb8e56d5148da80d2207b0))
|
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ pi install -l npm:pi-pr-review
|
|
|
35
35
|
|
|
36
36
|
For local development only, you can point pi at a checkout with `pi install ./pi-pr-review` (add `-l` for project scope).
|
|
37
37
|
|
|
38
|
+
Releases are versioned from conventional squash-merged PR titles and published automatically through npm trusted publishing. See [RELEASING.md](RELEASING.md) for the release and merge policy.
|
|
39
|
+
|
|
38
40
|
### Alternative: use the template without packaging
|
|
39
41
|
|
|
40
42
|
The prompt is a plain template — just copy it into a prompts directory pi already scans:
|
package/RELEASING.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Releasing
|
|
2
|
+
|
|
3
|
+
[Release Please](https://github.com/googleapis/release-please) watches conventional commits merged into `main`. It opens or updates a release PR containing the calculated version change, `CHANGELOG.md`, and release manifest. Merging that release PR creates a GitHub release and, after the test suite passes, publishes `pi-pr-review` to npm with signed provenance.
|
|
4
|
+
|
|
5
|
+
## Semver
|
|
6
|
+
|
|
7
|
+
The squash-merged PR title becomes the commit Release Please evaluates:
|
|
8
|
+
|
|
9
|
+
- `feat: ...` creates a minor release.
|
|
10
|
+
- `feat!: ...`, `fix!: ...`, or a `BREAKING CHANGE:` footer creates a major release.
|
|
11
|
+
- Every other allowed type—`fix:`, `perf:`, `revert:`, `chore:`, `docs:`, `refactor:`, `style:`, and `test:`—creates a patch release.
|
|
12
|
+
|
|
13
|
+
All changes to `main` must go through a pull request and use squash merging. The required `Validate PR title` check enforces the conventional title, and the required `Test` check runs the Bun test suite. Direct pushes, force pushes, branch deletion, and administrator bypass are disabled.
|
|
14
|
+
|
|
15
|
+
## One-time setup
|
|
16
|
+
|
|
17
|
+
1. Install the private [`nerv-ops`](https://github.com/settings/apps/nerv-ops) GitHub App on this repository with **Contents: read and write** and **Pull requests: read and write** permissions.
|
|
18
|
+
2. Add the App ID as the repository Actions variable `NERV_OPS_APP_ID`, and add a generated PEM private key as the repository Actions secret `NERV_OPS_PRIVATE_KEY`.
|
|
19
|
+
3. In the npm settings for [`pi-pr-review`](https://www.npmjs.com/package/pi-pr-review), add a GitHub Actions trusted publisher with:
|
|
20
|
+
- organization/user: `10ego`
|
|
21
|
+
- repository: `pi-pr-review`
|
|
22
|
+
- workflow filename: `release-please.yml`
|
|
23
|
+
- environment: leave blank
|
|
24
|
+
4. Use conventional titles for squash-merged PRs.
|
|
25
|
+
|
|
26
|
+
No npm token is stored in GitHub. The workflow exchanges the App credentials for a short-lived repository installation token and uses npm trusted publishing through GitHub OIDC.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-pr-review",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Parallel AI code review for GitHub pull requests in the Pi coding agent, with model-agnostic tiered subagents, structured findings, optional verification, and safe COMMENT-only publishing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
3
|
+
"bootstrap-sha": "b9b62811aab72269b5f2bbb58d08d37b3c20ecff",
|
|
4
|
+
"packages": {
|
|
5
|
+
".": {
|
|
6
|
+
"release-type": "node",
|
|
7
|
+
"package-name": "pi-pr-review",
|
|
8
|
+
"changelog-path": "CHANGELOG.md",
|
|
9
|
+
"include-component-in-tag": false,
|
|
10
|
+
"changelog-sections": [
|
|
11
|
+
{ "type": "feat", "section": "Features", "hidden": false },
|
|
12
|
+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
|
|
13
|
+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
|
|
14
|
+
{ "type": "revert", "section": "Reverts", "hidden": false },
|
|
15
|
+
{ "type": "docs", "section": "Documentation", "hidden": false },
|
|
16
|
+
{ "type": "style", "section": "Styles", "hidden": false },
|
|
17
|
+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
|
|
18
|
+
{ "type": "test", "section": "Tests", "hidden": false },
|
|
19
|
+
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false }
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
package/.pi/npm/.gitignore
DELETED