gityo 1.1.5 → 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.
Files changed (2) hide show
  1. package/dist/index.js +21 -3
  2. 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.5";
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);
@@ -236775,7 +236775,6 @@ async function releaseController(tagArg, options = {}) {
236775
236775
  if (options.bump && tagArg !== void 0) throw new Error(`Use either a release tag or --${options.bump}, not both.`);
236776
236776
  if (options.yolo && tagArg === void 0 && !options.bump) throw new Error("A release tag or --major, --minor, or --patch is required with --yolo.");
236777
236777
  const config$5 = await loadConfig(await getRepoRoot());
236778
- const languageModel = resolveLanguageModel(resolveModelConfig(config$5.models, options.model ?? config$5.releaseModel ?? config$5.model));
236779
236778
  const releases = await listReleases(100);
236780
236779
  let tag = tagArg?.trim() ?? "";
236781
236780
  if (options.bump) {
@@ -236803,6 +236802,25 @@ async function releaseController(tagArg, options = {}) {
236803
236802
  }
236804
236803
  const branch = await getDefaultBranch();
236805
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));
236806
236824
  const tagIndex = releases.findIndex((release) => release.tagName === tag);
236807
236825
  const previousTag = (tagIndex === -1 ? releases[0] : releases[tagIndex + 1])?.tagName ?? null;
236808
236826
  const headSha = await getBranchHeadSha(branch);
@@ -236937,7 +236955,7 @@ pr.command("merge").description("Create the pull request if needed, then merge i
236937
236955
  mergeMethod: options.merge ? "merge" : options.rebase ? "rebase" : options.squash ? "squash" : void 0
236938
236956
  }));
236939
236957
  });
236940
- 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) => {
236941
236959
  if ([
236942
236960
  options.major,
236943
236961
  options.minor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gityo",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/NazmusSayad/gityo.git"