@theholocron/cli 2.0.0-alpha.23 → 2.0.0-alpha.25

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.
@@ -100,6 +100,12 @@ interface Source extends ProviderIdentity {
100
100
  * Triggers a new analysis run; returns the run id.
101
101
  */
102
102
  enableCodeScanning(): Promise<string>;
103
+ /**
104
+ * Disables CodeQL default setup. Required when the repo uses an advanced
105
+ * CodeQL workflow instead — GitHub rejects SARIF from advanced workflows
106
+ * while default setup is active.
107
+ */
108
+ disableDefaultCodeScanning(): Promise<void>;
103
109
  listWorkflowFiles(): Promise<string[]>;
104
110
  readWorkflowFile(name: string): Promise<string | null>;
105
111
  writeWorkflowFile(name: string, contents: string): Promise<void>;
package/dist/cli.mjs CHANGED
@@ -3588,6 +3588,23 @@ const ALEX_CONFIG = JSON.stringify({ allow: [
3588
3588
  "husky",
3589
3589
  "period"
3590
3590
  ] }, null, 2) + "\n";
3591
+ const LABELER_CONFIG = `\
3592
+ # AUTO-GENERATED by holocron — run \`holocron setup\` to regenerate.
3593
+ bug:
3594
+ - '^fix'
3595
+
3596
+ dependencies:
3597
+ - '^chore\\(deps'
3598
+
3599
+ documentation:
3600
+ - '^docs'
3601
+
3602
+ enhancement:
3603
+ - '^feat'
3604
+
3605
+ github_actions:
3606
+ - '^ci'
3607
+ `;
3591
3608
  const DEPENDABOT_CONFIG = `\
3592
3609
  # AUTO-GENERATED by holocron — run \`holocron setup\` to regenerate.
3593
3610
  version: 2
@@ -3765,8 +3782,10 @@ async function runSetup(input) {
3765
3782
  }));
3766
3783
  print(formatStep(steps[steps.length - 1]));
3767
3784
  }
3768
- steps.push(await runStep("source", "enableCodeScanning", dryRun, async () => {
3769
- return await source.enableCodeScanning();
3785
+ const usesAdvancedCodeQL = (config.project.workflows ?? []).map((e) => typeof e === "string" ? e : e.name).includes("codeql");
3786
+ steps.push(await runStep("source", usesAdvancedCodeQL ? "disableDefaultCodeScanning" : "enableCodeScanning", dryRun, async () => {
3787
+ if (usesAdvancedCodeQL) await source.disableDefaultCodeScanning();
3788
+ else return await source.enableCodeScanning();
3770
3789
  }));
3771
3790
  print(formatStep(steps[steps.length - 1]));
3772
3791
  const policy = config.project.repoPolicy;
@@ -3812,6 +3831,13 @@ async function runSetup(input) {
3812
3831
  print(formatStep(steps[steps.length - 1]));
3813
3832
  }
3814
3833
  }
3834
+ if (loader.has("source") && (config.project.workflows ?? []).map((e) => typeof e === "string" ? e : e.name).includes("bookkeeping-pr")) {
3835
+ const source = loader.get("source");
3836
+ steps.push(await runStep("source", "write .github/labeler.yml", dryRun, async () => {
3837
+ await source.writeRepoFile(".github/labeler.yml", LABELER_CONFIG);
3838
+ }));
3839
+ print(formatStep(steps[steps.length - 1]));
3840
+ }
3815
3841
  if (loader.has("source") && config.project.repoPolicy?.preset !== "none") {
3816
3842
  const source = loader.get("source");
3817
3843
  steps.push(await runStep("source", "write .github/dependabot.yml", dryRun, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "2.0.0-alpha.23",
3
+ "version": "2.0.0-alpha.25",
4
4
  "description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
6
6
  "bugs": "https://github.com/theholocron/holocron/issues",