gityo 1.1.4 → 1.1.6
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/dist/index.js +26 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1710,7 +1710,7 @@ function useColor() {
|
|
|
1710
1710
|
if (process$1.env.FORCE_COLOR || process$1.env.CLICOLOR_FORCE !== void 0) return true;
|
|
1711
1711
|
}
|
|
1712
1712
|
new Command();
|
|
1713
|
-
var version$4 = "1.1.
|
|
1713
|
+
var version$4 = "1.1.6";
|
|
1714
1714
|
const keybindingLookup = new Set(["emacs", "vim"]);
|
|
1715
1715
|
function isKeybinding(value) {
|
|
1716
1716
|
return keybindingLookup.has(value);
|
|
@@ -236764,15 +236764,17 @@ function formatCommit(commit, message) {
|
|
|
236764
236764
|
` - Author: ${commit.authorName} <${commit.authorEmail}>`
|
|
236765
236765
|
].join("\n");
|
|
236766
236766
|
}
|
|
236767
|
-
const renderReleaseNotes = createRenderer({
|
|
236768
|
-
width:
|
|
236767
|
+
const renderReleaseNotes = createRenderer(process.stdout.columns ? {
|
|
236768
|
+
width: Math.max(0, process.stdout.columns - 4),
|
|
236769
|
+
listIndent: 2
|
|
236770
|
+
} : {
|
|
236771
|
+
wrap: false,
|
|
236769
236772
|
listIndent: 2
|
|
236770
236773
|
});
|
|
236771
236774
|
async function releaseController(tagArg, options = {}) {
|
|
236772
236775
|
if (options.bump && tagArg !== void 0) throw new Error(`Use either a release tag or --${options.bump}, not both.`);
|
|
236773
236776
|
if (options.yolo && tagArg === void 0 && !options.bump) throw new Error("A release tag or --major, --minor, or --patch is required with --yolo.");
|
|
236774
236777
|
const config$5 = await loadConfig(await getRepoRoot());
|
|
236775
|
-
const languageModel = resolveLanguageModel(resolveModelConfig(config$5.models, options.model ?? config$5.releaseModel ?? config$5.model));
|
|
236776
236778
|
const releases = await listReleases(100);
|
|
236777
236779
|
let tag = tagArg?.trim() ?? "";
|
|
236778
236780
|
if (options.bump) {
|
|
@@ -236800,6 +236802,25 @@ async function releaseController(tagArg, options = {}) {
|
|
|
236800
236802
|
}
|
|
236801
236803
|
const branch = await getDefaultBranch();
|
|
236802
236804
|
if (branch.length === 0) throw new Error("Could not determine the default branch.");
|
|
236805
|
+
if (options.empty) {
|
|
236806
|
+
const headSha$1 = await getBranchHeadSha(branch);
|
|
236807
|
+
if (!options.yolo && !await dist_default({
|
|
236808
|
+
message: `Create release ${source_default.yellow.bold(tag)} on ${source_default.yellow.bold(branch)} without notes?`,
|
|
236809
|
+
default: true,
|
|
236810
|
+
theme: selectionTheme
|
|
236811
|
+
})) {
|
|
236812
|
+
console.log("Release creation cancelled.");
|
|
236813
|
+
return;
|
|
236814
|
+
}
|
|
236815
|
+
if (exists$2) await deleteRelease(tag);
|
|
236816
|
+
await createRelease({
|
|
236817
|
+
tag,
|
|
236818
|
+
target: headSha$1,
|
|
236819
|
+
notes: ""
|
|
236820
|
+
});
|
|
236821
|
+
return;
|
|
236822
|
+
}
|
|
236823
|
+
const languageModel = resolveLanguageModel(resolveModelConfig(config$5.models, options.model ?? config$5.releaseModel ?? config$5.model));
|
|
236803
236824
|
const tagIndex = releases.findIndex((release) => release.tagName === tag);
|
|
236804
236825
|
const previousTag = (tagIndex === -1 ? releases[0] : releases[tagIndex + 1])?.tagName ?? null;
|
|
236805
236826
|
const headSha = await getBranchHeadSha(branch);
|
|
@@ -236934,7 +236955,7 @@ pr.command("merge").description("Create the pull request if needed, then merge i
|
|
|
236934
236955
|
mergeMethod: options.merge ? "merge" : options.rebase ? "rebase" : options.squash ? "squash" : void 0
|
|
236935
236956
|
}));
|
|
236936
236957
|
});
|
|
236937
|
-
app.command("release").description("Create a GitHub release with AI-generated release notes.").argument("[tag]", "Release tag to create (asks when omitted).").option("--model <model>", "Model key from config to use (overrides the configured model).").option("-y, --yolo", "Create the release without asking for confirmation (requires a tag).").option("-f, --force", "Recreate the release without asking if it already exists.").option("--major", "Bump the major version of the latest release.").option("--minor", "Bump the minor version of the latest release.").option("--patch", "Bump the patch version of the latest release.").action((tag, options) => {
|
|
236958
|
+
app.command("release").description("Create a GitHub release with AI-generated release notes.").argument("[tag]", "Release tag to create (asks when omitted).").option("--model <model>", "Model key from config to use (overrides the configured model).").option("-y, --yolo", "Create the release without asking for confirmation (requires a tag).").option("-f, --force", "Recreate the release without asking if it already exists.").option("-e, --empty", "Create the release without any release notes.").option("--major", "Bump the major version of the latest release.").option("--minor", "Bump the minor version of the latest release.").option("--patch", "Bump the patch version of the latest release.").action((tag, options) => {
|
|
236938
236959
|
if ([
|
|
236939
236960
|
options.major,
|
|
236940
236961
|
options.minor,
|