@gitset-dev/cli 2.3.2 → 2.3.3
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/lib/prompts/defaults.js
CHANGED
|
@@ -98,7 +98,13 @@ const release = {
|
|
|
98
98
|
'headings, ordering, and tone closely — treat it as the format to reproduce. ' +
|
|
99
99
|
'Never invent a repository path (e.g. placeholders like "your-project/your-repo" ' +
|
|
100
100
|
'or "user/repo") for a "Full Changelog" or compare link — only include such a link ' +
|
|
101
|
-
'when the real repository is given below, using that exact path; otherwise omit it.'
|
|
101
|
+
'when the real repository is given below, using that exact path; otherwise omit it. ' +
|
|
102
|
+
'Never attribute a change to a person (e.g. "by @username") — a commit author\'s ' +
|
|
103
|
+
'display name (e.g. "Jane Smith") is NOT their GitHub username and must never be ' +
|
|
104
|
+
'guessed into one (e.g. never invent "@jane-smith"). If a commit message already ' +
|
|
105
|
+
'ends in a real PR reference like "(#123)", you may link directly to that PR using ' +
|
|
106
|
+
'the given repository path (e.g. https://github.com/<repo>/pull/123), but state only ' +
|
|
107
|
+
'what changed — no author mention.',
|
|
102
108
|
user: [
|
|
103
109
|
repo && `Repository: ${clip(repo, 200)}`,
|
|
104
110
|
tag && `Release: ${clip(tag, 100)}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitset-dev/cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "Gitset CLI — drafts commits, PRs, issues, READMEs and release notes with your own AI key. Fully local: your code and keys never touch a Gitset server. Draft. Refine. Ship.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
package/src/commands/release.js
CHANGED
|
@@ -33,6 +33,13 @@ function getCurrentBranch() {
|
|
|
33
33
|
return execCommand('git rev-parse --abbrev-ref HEAD') || 'HEAD';
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
function getRepoOwnerName() {
|
|
37
|
+
const remoteUrl = execCommand('git config --get remote.origin.url');
|
|
38
|
+
if (!remoteUrl) return '';
|
|
39
|
+
const match = remoteUrl.match(/[:/]([^/]+)\/([^/.]+)(?:\.git)?$/);
|
|
40
|
+
return match ? `${match[1]}/${match[2]}` : '';
|
|
41
|
+
}
|
|
42
|
+
|
|
36
43
|
function commitsToText(commits) {
|
|
37
44
|
if (!commits || commits.length === 0) return '';
|
|
38
45
|
return commits.map(c => `- ${c.hash || ''} ${c.message || ''} (${c.author || ''})`).join('\n');
|
|
@@ -185,6 +192,7 @@ module.exports = async function commandRelease(options = {}) {
|
|
|
185
192
|
}
|
|
186
193
|
|
|
187
194
|
let currentNotes = '';
|
|
195
|
+
const repo = getRepoOwnerName();
|
|
188
196
|
|
|
189
197
|
const generate = async (instr = '') => {
|
|
190
198
|
log('\nGenerating release notes…', 'cyan');
|
|
@@ -193,6 +201,7 @@ module.exports = async function commandRelease(options = {}) {
|
|
|
193
201
|
tool: 'release',
|
|
194
202
|
ctx: {
|
|
195
203
|
tag: tagName,
|
|
204
|
+
repo,
|
|
196
205
|
commits: commitsToText(commits),
|
|
197
206
|
mode: commits.length === 0 ? 'manual' : 'summary',
|
|
198
207
|
instruction: instr,
|