@catladder/cli 0.0.0-next-d13ff46d → 0.0.0-next-8cc9134a

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/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "0.0.0-next-d13ff46d",
56
+ "version": "0.0.0-next-8cc9134a",
57
57
  "scripts": {
58
58
  "lint": "eslint \"src/**/*.ts\"",
59
59
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
@@ -11,6 +11,7 @@ import { writeFile } from "fs/promises";
11
11
  import { CHANGESET_CHECK_MARKER, runChangesetCheck } from "./changesetCheck";
12
12
  import { readPendingChangesets } from "./changesetsReleaseJob";
13
13
  import { ensureReleaseHistory, getLastReleaseTag, git } from "./releaseGit";
14
+ import { appendStepSummary } from "./stepSummary";
14
15
 
15
16
  export const CHANGESET_REPORT_FILE = "changeset-report.md";
16
17
 
@@ -193,7 +194,22 @@ export const changesetCheckJob = async () => {
193
194
  return;
194
195
  }
195
196
  if (!result.addsChangeset) {
196
- // exit 1 turns the (allow_failure) job yellow so reviewers notice
197
+ if (onGithub()) {
198
+ // github has no "warning" job state: exiting non-zero would show
199
+ // the job as failed (a red ❌ and "exit code 1"), which reads like
200
+ // something broke. A warning annotation plus the step summary and
201
+ // the sticky PR comment carry the signal instead.
202
+ console.log(
203
+ "::warning title=No changeset::this pull request adds no changeset — " +
204
+ "if the change is user-facing, add one so it appears in the next release's changelog",
205
+ );
206
+ appendStepSummary(
207
+ result.markdown.replace(`${CHANGESET_CHECK_MARKER}\n`, ""),
208
+ );
209
+ return;
210
+ }
211
+ // gitlab: exit 1 turns the (allow_failure) job yellow so reviewers
212
+ // notice
197
213
  process.exitCode = 1;
198
214
  }
199
215
  };