@verndale/ai-commit 2.2.0 → 2.4.0
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/.env-example +29 -0
- package/README.md +7 -7
- package/bin/cli.js +5 -5
- package/lib/init-env.js +96 -44
- package/package.json +5 -5
- package/.env.example +0 -7
package/.env-example
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copy to .env and/or .env.local in your project root (do not commit secrets).
|
|
2
|
+
|
|
3
|
+
# ------------------------------------------------------------
|
|
4
|
+
# @verndale/ai-commit (pnpm commit / ai-commit run)
|
|
5
|
+
# ------------------------------------------------------------
|
|
6
|
+
# @verndale/ai-commit — OPENAI_API_KEY: OpenAI API key for conventional commit messages (ai-commit run; optional for prepare-commit-msg with AI).
|
|
7
|
+
OPENAI_API_KEY=
|
|
8
|
+
|
|
9
|
+
# Optional — default is gpt-4o-mini
|
|
10
|
+
# COMMIT_AI_MODEL=
|
|
11
|
+
|
|
12
|
+
# @verndale/ai-pr — GH_TOKEN: Set for local CLI runs; CI uses workflow env / secrets. Also reads GITHUB_TOKEN.
|
|
13
|
+
GH_TOKEN=
|
|
14
|
+
|
|
15
|
+
# Optional — PR behavior
|
|
16
|
+
# @verndale/ai-pr — PR_BASE_BRANCH: Base branch to merge into (default main).
|
|
17
|
+
# PR_BASE_BRANCH=main
|
|
18
|
+
# @verndale/ai-pr — PR_DRAFT: If true (default), new PRs are drafts.
|
|
19
|
+
# PR_DRAFT=true
|
|
20
|
+
|
|
21
|
+
# Optional — AI summary + labels (when PR_AI=true)
|
|
22
|
+
# @verndale/ai-pr — PR_AI: Set true to enable AI summary and optional labels/checklist.
|
|
23
|
+
# PR_AI=true
|
|
24
|
+
# @verndale/ai-pr — PR_AI_ENDPOINT: AI API URL when PR_AI is true (e.g. OpenAI Responses endpoint).
|
|
25
|
+
# PR_AI_ENDPOINT=https://api.openai.com/v1/responses
|
|
26
|
+
# @verndale/ai-pr — PR_AI_API_KEY: Bearer token for the AI API when PR_AI is true.
|
|
27
|
+
# PR_AI_API_KEY=
|
|
28
|
+
# @verndale/ai-pr — PR_AI_MODEL: Model id (default string default).
|
|
29
|
+
# PR_AI_MODEL=default
|
package/README.md
CHANGED
|
@@ -18,20 +18,20 @@ The same package works with **npm** or **yarn** (for example `npm install -D @ve
|
|
|
18
18
|
## Quick setup (deterministic order)
|
|
19
19
|
|
|
20
20
|
1. **Install** the dev dependency (see [Install](#install)).
|
|
21
|
-
2. **Init** — From the **git repo root** (where **`package.json`** lives), run **`pnpm exec ai-commit init`**. That merges **`.env`** and **`.env
|
|
21
|
+
2. **Init** — From the **git repo root** (where **`package.json`** lives), run **`pnpm exec ai-commit init`**. That merges **`.env`** and **`.env-example`** (creates **`.env-example`** from the bundled template if it is missing; see [`.env-example`](.env-example) for keys and comments), runs **`npx husky@9 init`** if Husky is not present, adds missing **`commit`** / **`prepare`** / **`husky`** entries to **`package.json`** when the file exists, and writes **`.husky`** hooks. **Install dependencies** afterward if **`package.json`** changed (`pnpm install`, `npm install`, etc.).
|
|
22
22
|
- Not in a git repo? **init** only updates env files and explains that Git/Husky were skipped.
|
|
23
23
|
- Env files only? Use **`pnpm exec ai-commit init --env-only`**.
|
|
24
24
|
- Hooks only (no **`package.json`** changes)? Use **`pnpm exec ai-commit init --husky`**.
|
|
25
25
|
3. **Secrets** — Set **`OPENAI_API_KEY`** in `.env` and/or `.env.local` (`.env.local` overrides `.env` for duplicate keys).
|
|
26
26
|
|
|
27
|
-
Use **`ai-commit init --force`** to replace **`.env`** and **`.env
|
|
27
|
+
Use **`ai-commit init --force`** to replace **`.env`** and **`.env-example`** with the bundled template (destructive) or to overwrite existing Husky hook files. Without **`--force`**, **init** creates **`.env-example`** when missing and otherwise appends missing ai-commit keys (same as **`.env`**). The published template file is **`.env-example`** (hyphen, not **`.env.example`**).
|
|
28
28
|
|
|
29
29
|
## Environment
|
|
30
30
|
|
|
31
31
|
- **`OPENAI_API_KEY`** — Required for `ai-commit run` (and for AI-filled `prepare-commit-msg` when you want the model). Optional `COMMIT_AI_MODEL` (default `gpt-4o-mini`).
|
|
32
32
|
- **Shared env vars** — If another tool already documents **`OPENAI_API_KEY`** or **`COMMIT_AI_MODEL`**, **`ai-commit init`** adds its own `# @verndale/ai-commit — …` line immediately above the assignment when missing; it does not remove or replace existing comment lines.
|
|
33
33
|
- The CLI loads **`.env`** then **`.env.local`** from the current working directory (project root); values in `.env.local` override `.env` for the same key.
|
|
34
|
-
- **Optional tooling:** `PR_*` env vars for [`@verndale/ai-pr`](https://www.npmjs.com/package/@verndale/ai-pr) (`pnpm
|
|
34
|
+
- **Optional tooling:** `PR_*` env vars for [`@verndale/ai-pr`](https://www.npmjs.com/package/@verndale/ai-pr) (`pnpm run pr:create` in this repo) / the **Create or update PR** workflow; `RELEASE_NOTES_AI_*` for [`tools/semantic-release-notes.cjs`](./tools/semantic-release-notes.cjs). Use a GitHub PAT as **`GH_TOKEN`** (or `GITHUB_TOKEN`) when calling the GitHub API outside Actions.
|
|
35
35
|
|
|
36
36
|
## Commit policy (v2)
|
|
37
37
|
|
|
@@ -50,7 +50,7 @@ Use **`ai-commit init --force`** to replace **`.env`** and **`.env.example`** wi
|
|
|
50
50
|
| Command | Purpose |
|
|
51
51
|
| --- | --- |
|
|
52
52
|
| `ai-commit run` | Generate a message from the staged diff and run `git commit`. |
|
|
53
|
-
| `ai-commit init [--force] [--env-only] [--husky] [--workspace]` | Merge env keys, then **`npx husky@9 init`** if needed, merge **`package.json`** when present, write hooks. **`--env-only`** stops after env files. **`--husky`** skips `package.json` (hooks + Husky only); use **`--husky --workspace`** to include **`package.json`** again. **`--force`** replaces `.env` / overwrites hooks. |
|
|
53
|
+
| `ai-commit init [--force] [--env-only] [--husky] [--workspace]` | Merge env keys (including **`.env-example`**), then **`npx husky@9 init`** if needed, merge **`package.json`** when present, write hooks. **`--env-only`** stops after env files. **`--husky`** skips `package.json` (hooks + Husky only); use **`--husky --workspace`** to include **`package.json`** again. **`--force`** replaces `.env` / `.env-example` / overwrites hooks. |
|
|
54
54
|
| `ai-commit prepare-commit-msg <file> [source]` | Git `prepare-commit-msg` hook: fill an empty message; skips `merge` / `squash`. |
|
|
55
55
|
| `ai-commit lint --edit <file>` | Git `commit-msg` hook: run commitlint with this package’s default config. |
|
|
56
56
|
|
|
@@ -118,17 +118,17 @@ corepack enable
|
|
|
118
118
|
pnpm install
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
Copy
|
|
121
|
+
Copy **`.env-example`** to `.env` and/or `.env.local` and set **`OPENAI_API_KEY`**. After staging, **`pnpm commit`** runs this repo’s CLI (`node ./bin/cli.js run`; the published package exposes `ai-commit` in `node_modules/.bin` for dependents). Hooks under `.husky/` call **`pnpm exec ai-commit`** from this checkout.
|
|
122
122
|
|
|
123
123
|
### Repository automation
|
|
124
124
|
|
|
125
125
|
| Workflow | Trigger | Purpose |
|
|
126
126
|
| --- | --- | --- |
|
|
127
127
|
| [`.github/workflows/commitlint.yml`](./.github/workflows/commitlint.yml) | PRs to `main`, pushes to non-`main` branches | Commitlint on PR range or last push commit |
|
|
128
|
-
| [`.github/workflows/pr.yml`](./.github/workflows/pr.yml) | Pushes (not `main`) and `workflow_dispatch` | Install deps, run **`pnpm
|
|
128
|
+
| [`.github/workflows/pr.yml`](./.github/workflows/pr.yml) | Pushes (not `main`) and `workflow_dispatch` | Install deps, run **`pnpm run pr:create`** ([**`@verndale/ai-pr`**](https://www.npmjs.com/package/@verndale/ai-pr)) — set **`PR_HEAD_BRANCH`** / **`PR_BASE_BRANCH`** in CI via env (workflow sets them). Use a PAT secret **`PR_BOT_TOKEN`** if branch protection requires it; otherwise document your org’s policy. |
|
|
129
129
|
| [`.github/workflows/release.yml`](./.github/workflows/release.yml) | Push to **`main`** (including when a PR merges) | **`semantic-release`** — version bump, `CHANGELOG.md`, git tag, npm publish (with provenance), GitHub Release |
|
|
130
130
|
|
|
131
|
-
Optional **`pnpm
|
|
131
|
+
Optional **`pnpm run pr:create`** locally: set **`GH_TOKEN`** (or **`GITHUB_TOKEN`**) and branch overrides **`PR_BASE_BRANCH`** / **`PR_HEAD_BRANCH`** as needed.
|
|
132
132
|
|
|
133
133
|
## Publishing (maintainers)
|
|
134
134
|
|
package/bin/cli.js
CHANGED
|
@@ -42,7 +42,7 @@ Usage:
|
|
|
42
42
|
|
|
43
43
|
Commands:
|
|
44
44
|
run Generate a message from the staged diff and run git commit.
|
|
45
|
-
init Merge env, then Husky + package.json + hooks (from a git repo). \`--env-only\` stops after env files. \`--husky\` skips package.json. \`--force\` replaces \`.env\` / hooks.
|
|
45
|
+
init Merge env, then Husky + package.json + hooks (from a git repo). \`--env-only\` stops after env files. \`--husky\` skips package.json. \`--force\` replaces \`.env\` / \`.env-example\` / hooks.
|
|
46
46
|
prepare-commit-msg Git hook: fill an empty commit message file (merge/squash skipped).
|
|
47
47
|
lint Run commitlint with the package default config (for commit-msg hook).
|
|
48
48
|
|
|
@@ -86,10 +86,10 @@ function cmdInit(argv) {
|
|
|
86
86
|
const cwd = process.cwd();
|
|
87
87
|
/** Full package.json merge: default on, or `--workspace`; off for `--husky` alone (legacy). */
|
|
88
88
|
const mergePackageJson = !husky || workspace;
|
|
89
|
-
const examplePath = path.join(__dirname, "..", ".env
|
|
89
|
+
const examplePath = path.join(__dirname, "..", ".env-example");
|
|
90
90
|
|
|
91
91
|
if (!fs.existsSync(examplePath)) {
|
|
92
|
-
throw new Error("Missing bundled .env
|
|
92
|
+
throw new Error("Missing bundled .env-example (corrupt install?).");
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
const envDest = path.join(cwd, ".env");
|
|
@@ -114,9 +114,9 @@ function cmdInit(argv) {
|
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
const envExampleDest = path.join(cwd, ".env
|
|
117
|
+
const envExampleDest = path.join(cwd, ".env-example");
|
|
118
118
|
const exResult = mergeAiCommitEnvFile(envExampleDest, examplePath, { force });
|
|
119
|
-
const exRel = path.relative(cwd, envExampleDest) || ".env
|
|
119
|
+
const exRel = path.relative(cwd, envExampleDest) || ".env-example";
|
|
120
120
|
switch (exResult.kind) {
|
|
121
121
|
case "replaced":
|
|
122
122
|
process.stdout.write(`Replaced ${exRel} with bundled template (--force).\n`);
|
package/lib/init-env.js
CHANGED
|
@@ -5,13 +5,57 @@ const fs = require("fs");
|
|
|
5
5
|
/** Detect our doc line so we do not duplicate or replace other packages’ comments. */
|
|
6
6
|
const MARKER_PREFIX = "# @verndale/ai-commit — ";
|
|
7
7
|
|
|
8
|
+
const SECTION_DIVIDER = "# ------------------------------------------------------------";
|
|
9
|
+
const SECTION_TITLE = "# @verndale/ai-commit (pnpm commit / ai-commit run)";
|
|
10
|
+
const SECTION_HEADER = [SECTION_DIVIDER, SECTION_TITLE, SECTION_DIVIDER];
|
|
11
|
+
|
|
12
|
+
const SUBSECTION_OPTIONAL_MODEL = "# Optional — default is gpt-4o-mini";
|
|
13
|
+
|
|
8
14
|
const DOC_OPENAI = [
|
|
9
15
|
`${MARKER_PREFIX}OPENAI_API_KEY: OpenAI API key for conventional commit messages (ai-commit run; optional for prepare-commit-msg with AI).`,
|
|
10
16
|
];
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @param {string} text
|
|
20
|
+
* @returns {boolean}
|
|
21
|
+
*/
|
|
22
|
+
function hasAiCommitSectionHeader(text) {
|
|
23
|
+
return (
|
|
24
|
+
text.includes(SECTION_DIVIDER) &&
|
|
25
|
+
text.includes("@verndale/ai-commit (pnpm commit / ai-commit run)")
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* True when COMMIT_AI_MODEL is already documented (long marker, subsection, or legacy block).
|
|
31
|
+
* @param {string[]} lines
|
|
32
|
+
* @returns {boolean}
|
|
33
|
+
*/
|
|
34
|
+
function hasCommitModelNotes(lines) {
|
|
35
|
+
if (hasOurDocForKey(lines, "COMMIT_AI_MODEL")) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
const commitIdx = lines.findIndex(
|
|
39
|
+
(line) =>
|
|
40
|
+
/^\s*COMMIT_AI_MODEL\s*=/.test(line) || /^\s*#\s*COMMIT_AI_MODEL\s*=/.test(line),
|
|
41
|
+
);
|
|
42
|
+
if (commitIdx === -1) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
for (let i = commitIdx - 1; i >= 0 && i >= commitIdx - 12; i--) {
|
|
46
|
+
const t = lines[i].trim();
|
|
47
|
+
if (t === "") {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (t === SUBSECTION_OPTIONAL_MODEL.trim()) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
if (lines[i].includes(`${MARKER_PREFIX}COMMIT_AI_MODEL:`)) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
15
59
|
|
|
16
60
|
/**
|
|
17
61
|
* Keys assigned on non-comment lines (`KEY=value` or `export KEY=value`).
|
|
@@ -38,27 +82,6 @@ function hasOurDocForKey(lines, key) {
|
|
|
38
82
|
return lines.some((line) => line.includes(needle));
|
|
39
83
|
}
|
|
40
84
|
|
|
41
|
-
/**
|
|
42
|
-
* Insert ai-commit doc lines immediately before an assignment line, without changing
|
|
43
|
-
* existing comments above that line (we insert after those lines, before the key line).
|
|
44
|
-
* @param {string[]} lines mutable
|
|
45
|
-
* @param {RegExp} assignmentRegex
|
|
46
|
-
* @param {string[]} docLines
|
|
47
|
-
* @param {string} key for marker check
|
|
48
|
-
* @returns {boolean} whether lines were mutated
|
|
49
|
-
*/
|
|
50
|
-
function injectDocBeforeAssignment(lines, assignmentRegex, docLines, key) {
|
|
51
|
-
if (hasOurDocForKey(lines, key)) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
const idx = lines.findIndex((line) => assignmentRegex.test(line));
|
|
55
|
-
if (idx === -1) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
lines.splice(idx, 0, ...docLines);
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
85
|
/**
|
|
63
86
|
* For keys already present (possibly with another package’s comments), add our doc line(s)
|
|
64
87
|
* above the assignment if missing. Does not remove or edit existing comment lines.
|
|
@@ -69,24 +92,27 @@ function injectAiCommitDocsForExistingKeys(content) {
|
|
|
69
92
|
const lines = content.split(/\r?\n/);
|
|
70
93
|
let changed = false;
|
|
71
94
|
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
95
|
+
if (!hasOurDocForKey(lines, "OPENAI_API_KEY")) {
|
|
96
|
+
const idx = lines.findIndex((line) => /^\s*OPENAI_API_KEY\s*=/.test(line));
|
|
97
|
+
if (idx !== -1) {
|
|
98
|
+
const insert = hasAiCommitSectionHeader(lines.join("\n"))
|
|
99
|
+
? [DOC_OPENAI[0]]
|
|
100
|
+
: [...SECTION_HEADER, DOC_OPENAI[0]];
|
|
101
|
+
lines.splice(idx, 0, ...insert);
|
|
102
|
+
changed = true;
|
|
103
|
+
}
|
|
81
104
|
}
|
|
82
105
|
|
|
83
|
-
if (!
|
|
106
|
+
if (!hasCommitModelNotes(lines)) {
|
|
84
107
|
let idx = lines.findIndex((line) => /^\s*COMMIT_AI_MODEL\s*=/.test(line));
|
|
85
108
|
if (idx === -1) {
|
|
86
109
|
idx = lines.findIndex((line) => /^\s*#\s*COMMIT_AI_MODEL\s*=/.test(line));
|
|
87
110
|
}
|
|
88
111
|
if (idx !== -1) {
|
|
89
|
-
lines.
|
|
112
|
+
const insert = hasAiCommitSectionHeader(lines.join("\n"))
|
|
113
|
+
? [SUBSECTION_OPTIONAL_MODEL]
|
|
114
|
+
: [...SECTION_HEADER, "", SUBSECTION_OPTIONAL_MODEL];
|
|
115
|
+
lines.splice(idx, 0, ...insert);
|
|
90
116
|
changed = true;
|
|
91
117
|
}
|
|
92
118
|
}
|
|
@@ -106,17 +132,43 @@ function buildAiCommitEnvAppend(existing) {
|
|
|
106
132
|
keys.has("COMMIT_AI_MODEL") ||
|
|
107
133
|
/^\s*#\s*COMMIT_AI_MODEL\s*=/m.test(existing) ||
|
|
108
134
|
/^\s*COMMIT_AI_MODEL\s*=/m.test(existing);
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
135
|
+
const needOpenai = !keys.has("OPENAI_API_KEY");
|
|
136
|
+
const needCommit = !keys.has("COMMIT_AI_MODEL") && !hasCommitPlaceholder;
|
|
137
|
+
const hasSection = hasAiCommitSectionHeader(existing);
|
|
138
|
+
|
|
139
|
+
if (!needOpenai && !needCommit) {
|
|
140
|
+
return null;
|
|
112
141
|
}
|
|
113
|
-
|
|
114
|
-
|
|
142
|
+
|
|
143
|
+
if (needOpenai && needCommit) {
|
|
144
|
+
return [
|
|
145
|
+
...SECTION_HEADER,
|
|
146
|
+
DOC_OPENAI[0],
|
|
147
|
+
"OPENAI_API_KEY=",
|
|
148
|
+
"",
|
|
149
|
+
SUBSECTION_OPTIONAL_MODEL,
|
|
150
|
+
"# COMMIT_AI_MODEL=",
|
|
151
|
+
"",
|
|
152
|
+
"",
|
|
153
|
+
].join("\n");
|
|
115
154
|
}
|
|
116
|
-
|
|
117
|
-
|
|
155
|
+
|
|
156
|
+
if (needOpenai) {
|
|
157
|
+
return [...SECTION_HEADER, DOC_OPENAI[0], "OPENAI_API_KEY=", ""].join("\n");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (hasSection) {
|
|
161
|
+
return [SUBSECTION_OPTIONAL_MODEL, "# COMMIT_AI_MODEL=", "", ""].join("\n");
|
|
118
162
|
}
|
|
119
|
-
|
|
163
|
+
|
|
164
|
+
return [
|
|
165
|
+
...SECTION_HEADER,
|
|
166
|
+
"",
|
|
167
|
+
SUBSECTION_OPTIONAL_MODEL,
|
|
168
|
+
"# COMMIT_AI_MODEL=",
|
|
169
|
+
"",
|
|
170
|
+
"",
|
|
171
|
+
].join("\n");
|
|
120
172
|
}
|
|
121
173
|
|
|
122
174
|
/**
|
|
@@ -124,7 +176,7 @@ function buildAiCommitEnvAppend(existing) {
|
|
|
124
176
|
* @param {string} destPath
|
|
125
177
|
* @param {string} bundledPath
|
|
126
178
|
* @param {{ force?: boolean }} [options]
|
|
127
|
-
* @returns {{ kind: 'replaced' | 'wrote' | '
|
|
179
|
+
* @returns {{ kind: 'replaced' | 'wrote' | 'unchanged' }}
|
|
128
180
|
*/
|
|
129
181
|
function mergeAiCommitEnvFile(destPath, bundledPath, options = {}) {
|
|
130
182
|
const { force = false } = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verndale/ai-commit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "AI-assisted conventional commits with bundled commitlint — one install, aligned rules",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Verndale",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
"bin",
|
|
30
30
|
"lib",
|
|
31
|
-
".env
|
|
31
|
+
".env-example",
|
|
32
32
|
"README.md",
|
|
33
33
|
"LICENSE"
|
|
34
34
|
],
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"prepare": "husky",
|
|
44
44
|
"commit": "node ./bin/cli.js run",
|
|
45
45
|
"lint:commit": "commitlint --edit .git/COMMIT_EDITMSG --config lib/commitlint-preset.cjs",
|
|
46
|
-
"open-pr": "ai-pr",
|
|
47
46
|
"release": "semantic-release",
|
|
48
|
-
"prepublishOnly": "node -e \"require('./lib/rules.js'); require('./lib/commitlint-preset.cjs'); require('./lib/init-env.js'); require('./lib/init-workspace.js');\""
|
|
47
|
+
"prepublishOnly": "node -e \"require('./lib/rules.js'); require('./lib/commitlint-preset.cjs'); require('./lib/init-env.js'); require('./lib/init-workspace.js');\"",
|
|
48
|
+
"pr:create": "ai-pr"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@commitlint/cli": "^20.5.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"openai": "^6.33.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@verndale/ai-pr": "^1.
|
|
60
|
+
"@verndale/ai-pr": "^1.1.0",
|
|
61
61
|
"@semantic-release/changelog": "^6.0.3",
|
|
62
62
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
63
63
|
"@semantic-release/git": "^10.0.1",
|
package/.env.example
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Copy to .env and/or .env.local in your project root (do not commit secrets).
|
|
2
|
-
|
|
3
|
-
# @verndale/ai-commit — OPENAI_API_KEY: OpenAI API key for conventional commit messages (ai-commit run; optional for prepare-commit-msg with AI).
|
|
4
|
-
OPENAI_API_KEY=
|
|
5
|
-
|
|
6
|
-
# @verndale/ai-commit — COMMIT_AI_MODEL: OpenAI model for commit messages (optional; default gpt-4o-mini).
|
|
7
|
-
# COMMIT_AI_MODEL=
|