projectops 4.99.1 → 4.100.1

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/README.md CHANGED
@@ -30,7 +30,7 @@
30
30
  **Status: actively maintained.** npm `latest` is exactly what is on the `main` branch; work in progress on `develop` is never published. Versions can still ship several times a day. Note that `npx projectops@<version>` pins the installer only (workflow templates always come from the current `main`) ([releases](https://github.com/Cassiiopeia/projectops/releases)).
31
31
 
32
32
  <!-- AUTO-VERSION-SECTION: DO NOT EDIT MANUALLY -->
33
- ## Latest version : v4.99.1 (2026-11-12)
33
+ ## Latest version : v4.100.1 (2026-11-13)
34
34
 
35
35
  [View full version history](CHANGELOG.md)
36
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectops",
3
- "version": "4.99.1",
3
+ "version": "4.100.1",
4
4
  "description": "One npx install for GitHub release automation: semantic versioning, changelogs, release PRs, CI/CD workflows and AI agent skills",
5
5
  "keywords": [
6
6
  "github-actions",
package/src/cli/args.js CHANGED
@@ -36,6 +36,7 @@ export function parseArgs(argv) {
36
36
  aiPrSummary: null, // #566 — AI 변경 요약 워크플로우 포함 여부
37
37
  codeReviewCoderabbit: null, // --coderabbit: CodeRabbit 코드 리뷰 설정(.coderabbit.yaml) 설치 여부 (null=미지정 → 저장값, 없으면 꺼짐)
38
38
  projectsSync: null, // #716 — Projects 보드 동기화 워크플로우 포함 여부 (null=미지정)
39
+ ciMinutesSaver: null, // #1114 — CI 사용 시간 절약 치환 (null=미지정 → 저장값, 없으면 꺼짐)
39
40
  json: false, // --json: 기계가 읽는 출력 (--mode options)
40
41
  removeLegacy: false, // #809 — 구세대 배포 워크플로우(confirm 티어)도 .bak 으로 치운다
41
42
  createDevelopmentBranch: false, // #715 — 비대화형에서 개발 브랜치 생성·push (원격에 쓰므로 명시할 때만)
@@ -187,6 +188,8 @@ export function parseArgs(argv) {
187
188
  case "--no-ai-summary": result.aiPrSummary = false; break;
188
189
  case "--projects-sync": result.projectsSync = true; break;
189
190
  case "--no-projects-sync": result.projectsSync = false; break;
191
+ case "--ci-minutes-saver": result.ciMinutesSaver = true; break;
192
+ case "--no-ci-minutes-saver": result.ciMinutesSaver = false; break;
190
193
  case "--remove-legacy": result.removeLegacy = true; break;
191
194
  case "--create-development-branch": result.createDevelopmentBranch = true; break;
192
195
  case "--json": result.json = true; break;
package/src/cli/help.js CHANGED
@@ -62,6 +62,8 @@ Options
62
62
  This is PR code review only; release notes do not depend on it
63
63
  --projects-sync / --no-projects-sync keep a GitHub Projects board's Status in step with issue labels. Needs the secret
64
64
  _GITHUB_PAT_TOKEN and variable PROJECT_URL. omitted: off for new installs, kept if installed
65
+ --ci-minutes-saver / --no-ci-minutes-saver private repos: CI on PRs only, docs-only changes skipped,
66
+ iOS CI build and secret backup on manual dispatch only. omitted: off
65
67
  --remove-legacy rename retired old-generation workflows to .bak so they stop running next to their replacements.
66
68
  omitted: they stay and are only listed (an old deploy workflow may be your only live deployment)
67
69
  --nexus / --npm-publish (deprecated: use --publish nexus / --publish npm)
@@ -146,6 +148,8 @@ AI agent 나 CI 는 항상 이렇게 실행한다: npx projectops --mode <
146
148
  PR 코드 리뷰 전용이며 릴리스 노트와 무관하다
147
149
  --projects-sync / --no-projects-sync GitHub Projects 보드의 Status 를 이슈 라벨과 맞춘다. secret _GITHUB_PAT_TOKEN 과
148
150
  변수 PROJECT_URL 이 필요. 생략: 신규는 제외, 이미 설치돼 있으면 유지
151
+ --ci-minutes-saver / --no-ci-minutes-saver private repos: CI on PRs only, docs-only changes skipped,
152
+ iOS CI build and secret backup on manual dispatch only. omitted: off
149
153
  --remove-legacy 은퇴한 구세대 워크플로우를 .bak 으로 바꿔 신형과 함께 돌지 않게 한다.
150
154
  생략: 그대로 두고 목록만 안내한다 (옛 배포 워크플로우가 유일한 현역 배포일 수 있다)
151
155
  --nexus / --npm-publish (deprecated — --publish nexus / --publish npm 사용)
@@ -143,7 +143,7 @@ export async function runInteractive(baseCtx, { cwd = process.cwd(), source = {
143
143
  let deployBranchCreated = null; // #493 — 마법사가 직접 생성했는지 (가이드 기록용)
144
144
  let intent = init.intent; // #485 프로젝트 성격
145
145
  // 묻지 않는 값 — 저장값 보존 규칙은 resolve-options.js 에 있다
146
- const { semverAuto, appRelease, closeOnRelease, excludedWorkflows, storeLocales, storeLocalesIos, storeLocalesPlay, projectsSync } = init;
146
+ const { semverAuto, appRelease, closeOnRelease, excludedWorkflows, storeLocales, storeLocalesIos, storeLocalesPlay, projectsSync, deployTriggerBranch, ciMinutesSaver } = init;
147
147
  const semverAutoNewlyOn = initSources.semverAutoNewlyOn;
148
148
  // 레포 문구 언어(#769)·라벨 표기(#776): 기존 레포에는 영문 전환을 한 번만 제안한다(아래).
149
149
  let language = init.language;
@@ -333,6 +333,7 @@ export async function runInteractive(baseCtx, { cwd = process.cwd(), source = {
333
333
  const ctx = createContext({
334
334
  mode, force: true, types, version, versionCode, branch, paths, deployTarget, publishTargets, includeSecretBackup,
335
335
  aiPrSummary, codeReviewCoderabbit, changelogProvider, changelogBaseUrl, deployBranch, intent, semverAuto, appRelease, labelStyle, closeOnRelease, projectsSync, language, excludedWorkflows, storeLocales, storeLocalesIos, storeLocalesPlay,
336
+ deployTriggerBranch, ciMinutesSaver,
336
337
  repoName, templateVersion, resolvers, envValues, envUseDefaults, now, today,
337
338
  // #502 — version 모드가 기존 full 기록을 강등하지 않도록 (full이 우세)
338
339
  recordMode: init.recordMode,
package/src/context.js CHANGED
@@ -27,6 +27,7 @@ export function createContext(overrides = {}) {
27
27
  codeReviewCoderabbit: null,
28
28
  deployBranch: "", // 릴리스 PR head 브랜치 (#456). 빈 값=metadata.development_branch 미출력
29
29
  deployTriggerBranch: "", // 푸시되면 배포가 도는 브랜치 (#1114). 빈 값=기본 브랜치와 같음(워크플로 그대로)
30
+ ciMinutesSaver: false, // CI 사용 시간 절약 치환 (#1114). false=워크플로 그대로
30
31
  intent: null, // 프로젝트 성격 (#485 — app/library/both/none/manual). null=미설정(역추론)
31
32
  semverAuto: null, // semver 자동 승격 (#546). null=미설정 → 신규·기존 모두 true (#814). 명시적 false 만 끈다
32
33
  closeOnRelease: null, // 릴리스 시 완료 이슈 닫기 (#771). null=미설정(신규 true / 기존 레포 키 없음)
@@ -9,12 +9,17 @@
9
9
  // 3) 릴리스 가드: == 'develop' (RELEASE-CHANGELOG automerge head 가드)
10
10
  // 4) step 내부: git fetch origin main (RELEASE-CHANGELOG 커밋 분석)
11
11
  // 5) 배포 트리거(#1114): 배포 워크플로 파일만, main > deployTriggerBranch (아래 DEPLOY_TRIGGER_WORKFLOWS)
12
+ // 6) 배포 스크립트 안 브랜치 검사(#1114): [ "$BRANCH" == "main" ] (REACT-CICD 허용 브랜치 검사)
13
+ // 7) CI 사용 시간 절약(#1114): ciMinutesSaver 일 때 ci-minutes-sub.js (브랜치 치환보다 먼저, 템플릿 원문 기준)
14
+
15
+ import { substituteCiMinutesSaver } from "./ci-minutes-sub.js";
12
16
 
13
17
  // main(기본 브랜치) 계열 치환
14
18
  function subDefault(s, db) {
15
19
  s = s.replace(/^(\s*branches:\s*\[\s*["']?)main(["']?\s*\])/gm, `$1${db}$2`);
16
20
  s = s.replace(/^(\s*-\s*)main(\s*(?:#.*)?)$/gm, `$1${db}$2`);
17
21
  s = s.replace(/\bgit fetch origin main\b/g, `git fetch origin ${db}`);
22
+ s = s.replace(/"\$BRANCH" == "main"/g, `"$BRANCH" == "${db}"`);
18
23
  return s;
19
24
  }
20
25
 
@@ -44,10 +49,11 @@ function subDeployTrigger(s, trigger) {
44
49
  s = s.replace(/^(\s*ref:\s*)main(\s*(?:#.*)?)$/gm, `$1${trigger}$2`);
45
50
  s = s.replace(/\bgit pull origin main\b/g, `git pull origin ${trigger}`);
46
51
  s = s.replace(/refs\/heads\/main\b/g, `refs/heads/${trigger}`);
52
+ s = s.replace(/"\$BRANCH" == "main"/g, `"$BRANCH" == "${trigger}"`);
47
53
  return s;
48
54
  }
49
55
 
50
- // content에 브랜치 설정을 적용한 결과를 반환. branches 미지정/표준값이면 원본 그대로.
56
+ // content에 브랜치 설정(+ CI 사용 시간 절약)을 적용한 결과를 반환. branches 미지정/표준값이면 원본 그대로.
51
57
  // 플레이스홀더 2단 치환: 값 충돌 방지 (예: 기본 브랜치=develop인 레포에서 main→develop 치환 결과가
52
58
  // 곧이어 develop→X 치환에 다시 걸리는 연쇄 오염을 차단).
53
59
  // filename: 배포 트리거 치환(#1114)이 배포 워크플로 파일에만 걸리게 하는 기준. 없으면 배포 트리거 치환은 건너뛴다.
@@ -57,6 +63,7 @@ export function substituteBranches(content, branches = null, filename = "") {
57
63
  const dev = branches.deployBranch || "develop";
58
64
  const trigger = branches.deployTriggerBranch || "";
59
65
  let s = String(content);
66
+ if (branches.ciMinutesSaver) s = substituteCiMinutesSaver(s, filename);
60
67
  const T_DB = "__PJOPS_DEFAULT__";
61
68
  const T_DEV = "__PJOPS_DEPLOY__";
62
69
  const T_TRIGGER = "__PJOPS_TRIGGER__";
@@ -0,0 +1,49 @@
1
+ // CI 사용 시간 절약 치환 (#1114) — version.yml options.ci_minutes_saver: true 일 때만.
2
+ // 비공개 레포는 Actions 분이 과금된다. 같은 커밋에 두 번 도는 CI·문서 변경 CI·macOS 러너(분당 10배)를 줄인다.
3
+ // 꺼져 있으면 호출되지 않는다 (설치 결과 바이트 동일). 패턴을 못 찾으면(사용자 수정본) 그 변환만 건너뛴다.
4
+ // 브랜치 치환보다 먼저 돈다 — 템플릿 원문(develop) 기준으로 패턴을 맞춘다.
5
+
6
+ // PR 에서 문서만 바뀐 경우 CI 생략 (코드 경로를 고르는 paths 는 레포마다 달라 템플릿이 정할 수 없다)
7
+ const DOCS_ONLY_PATHS_IGNORE = ` paths-ignore: ["**/*.md", "docs/**", "LICENSE"] # ci_minutes_saver: docs-only changes skip CI\n`;
8
+
9
+ // on: 아래 push: 이벤트 블록 (자식 줄 4칸 이상). branches 필터만 있는 블록일 때만 지운다
10
+ const PUSH_BLOCK_RE = /^ {2}push:[ \t]*\n((?: {4,}.*\n|[ \t]*\n)*)/m;
11
+
12
+ // 같은 변경에 PR 과 push 로 두 번 도는 CI > push 제거 (PR 만)
13
+ function dropPushTrigger(s) {
14
+ const m = s.match(PUSH_BLOCK_RE);
15
+ if (!m) return s;
16
+ const children = m[1].split("\n").filter((line) => line.trim() && !line.trim().startsWith("#"));
17
+ const isBranchFilterOnly = children.every((line) => /^\s+(branches:|-\s)/.test(line));
18
+ return isBranchFilterOnly ? s.replace(PUSH_BLOCK_RE, "") : s;
19
+ }
20
+
21
+ // 이벤트(pull_request · push) 바로 아래에 문서 경로 제외 추가
22
+ function addDocsPathsIgnore(s, event) {
23
+ const re = new RegExp(`^( {2}${event}:[ \\t]*\\n)`, "m");
24
+ if (!re.test(s) || s.includes("ci_minutes_saver: docs-only")) return s;
25
+ return s.replace(re, `$1${DOCS_ONLY_PATHS_IGNORE}`);
26
+ }
27
+
28
+ // iOS(macOS 러너) 빌드 자동 실행 끔 — 수동 실행 입력 enable_ios 로만 켠다
29
+ function disableIosByDefault(s) {
30
+ // 한 글자 늘어난 만큼 뒤 공백 하나를 먹어 주석 열을 맞춘다
31
+ return s.replace(/^( {2}ENABLE_IOS: )"true" ?/m, `$1"false"`);
32
+ }
33
+
34
+ // 파일 이름(정확 일치) > 적용할 변환 목록. 스토어 배포·댓글 트리거 빌드는 넣지 않는다
35
+ export const CI_MINUTES_SAVER_RULES = new Map([
36
+ ["PROJECT-FLUTTER-CI.yaml", [dropPushTrigger, (s) => addDocsPathsIgnore(s, "pull_request"), disableIosByDefault]],
37
+ ["PROJECT-PYTHON-CI.yaml", [dropPushTrigger, (s) => addDocsPathsIgnore(s, "pull_request")]],
38
+ ["PROJECT-SPRING-NEXUS-CI.yml", [dropPushTrigger, (s) => addDocsPathsIgnore(s, "pull_request")]],
39
+ // PR 트리거가 없어 push 는 남기고 문서 변경만 거른다
40
+ ["PROJECT-REACT-CI.yaml", [(s) => addDocsPathsIgnore(s, "push")]],
41
+ // 푸시와 무관한 작업 > 수동 실행만
42
+ ["PROJECT-COMMON-SECRET-FILE-UPLOAD.yaml", [dropPushTrigger]],
43
+ ]);
44
+
45
+ export function substituteCiMinutesSaver(content, filename = "") {
46
+ const transforms = CI_MINUTES_SAVER_RULES.get(filename);
47
+ if (!transforms) return content;
48
+ return transforms.reduce((s, transform) => transform(s), String(content));
49
+ }
@@ -92,7 +92,7 @@ function classify(srcDir, workflowsDir, envOpts, baseline = null) {
92
92
  // hooks: { decisions?: Map<filename, 'skip'|'backup'|'template'> } — 기존 파일(changed) 충돌 결정.
93
93
  // 반환: {copied, skipped, templateAdded, optionalCopied, copiedFiles[]} — copiedFiles는 실제 복사·교체된 파일명 (#473 요약용)
94
94
  export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
95
- const { types = [], paths = new Map(), deployTarget = "docker-ssh", publishTargets = [], includeSecretBackup = false, aiPrSummary = true, projectsSync = true, repoName = "", resolvers = {}, envValues = new Map(), envUseDefaults = true, branch = "", deployBranch = "", deployTriggerBranch = "" } = context;
95
+ const { types = [], paths = new Map(), deployTarget = "docker-ssh", publishTargets = [], includeSecretBackup = false, aiPrSummary = true, projectsSync = true, repoName = "", resolvers = {}, envValues = new Map(), envUseDefaults = true, branch = "", deployBranch = "", deployTriggerBranch = "", ciMinutesSaver = false } = context;
96
96
  const decisions = hooks.decisions instanceof Map ? hooks.decisions : new Map();
97
97
  const trace = hooks.trace ?? null; // #494 — 실행 트레이스 (null-safe: 미주입이면 전 이벤트 no-op)
98
98
  const workflowsDir = join(targetRoot, PATHS.workflowsDir);
@@ -107,7 +107,7 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
107
107
  const deployValues = new Map(); // Map<type, Map<key,value>> — deploy 블록용 ask 값
108
108
  counters.deployValues = deployValues;
109
109
  // 브랜치 전략 (#477) — 표준(main/develop)이면 치환·가상비교 모두 no-op
110
- const branches = { defaultBranch: branch || "main", deployBranch: deployBranch || "develop", deployTriggerBranch: deployTriggerBranch || "" };
110
+ const branches = { defaultBranch: branch || "main", deployBranch: deployBranch || "develop", deployTriggerBranch: deployTriggerBranch || "", ciMinutesSaver: !!ciMinutesSaver };
111
111
  // values/useDefaults는 치환 경로에서만 의미 (isUnchanged는 내부에서 useDefaults:true 강제 — 가상 비교 무손상)
112
112
  const envOptsFor = (type) => ({ type, projectPath: paths.get(type) || ".", repoName, resolvers, values: envValues, useDefaults: envUseDefaults, branches });
113
113
 
@@ -265,9 +265,9 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
265
265
  }
266
266
  }
267
267
 
268
- // (6) 브랜치 치환 post-pass (#477) — 표준과 다른 브랜치 전략일 때만 복사된 파일에 적용.
268
+ // (6) 브랜치 치환 post-pass (#477) — 표준과 다른 브랜치 전략이거나 CI 사용 시간 절약(#1114)일 때만 복사된 파일에 적용.
269
269
  // isUnchanged 가상 비교에도 같은 branches가 들어가므로 다음 업데이트에서 재복사 churn이 없다.
270
- if (branches.defaultBranch !== "main" || branches.deployBranch !== "develop" || branches.deployTriggerBranch) {
270
+ if (branches.defaultBranch !== "main" || branches.deployBranch !== "develop" || branches.deployTriggerBranch || branches.ciMinutesSaver) {
271
271
  for (const f of counters.copiedFiles) {
272
272
  const p = join(workflowsDir, f);
273
273
  if (!existsSync(p)) continue;
@@ -275,7 +275,7 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
275
275
  const after = substituteBranches(before, branches, f);
276
276
  if (after !== before) {
277
277
  writeFileSync(p, after);
278
- trace?.event("env", "branch-substituted", f, { defaultBranch: branches.defaultBranch, deployBranch: branches.deployBranch, deployTriggerBranch: branches.deployTriggerBranch });
278
+ trace?.event("env", "branch-substituted", f, { defaultBranch: branches.defaultBranch, deployBranch: branches.deployBranch, deployTriggerBranch: branches.deployTriggerBranch, ciMinutesSaver: branches.ciMinutesSaver });
279
279
  }
280
280
  }
281
281
  }
@@ -348,13 +348,13 @@ function applyDecision(decision, srcDir, workflowsDir, filename, counters, trace
348
348
  // 대상 워크플로우 디렉토리에서 changed(충돌) 파일 목록만 뽑는다 — 마법사(commands/interactive.js)가 쓴다.
349
349
  // copyWorkflows 본체와 동일한 classify 기준을 써야 결정 Map이 실제 처리 대상과 1:1로 맞는다.
350
350
  export function listWorkflowConflicts(context, tempDir, targetRoot = ".") {
351
- const { types = [], paths = new Map(), deployTarget = "docker-ssh", repoName = "", resolvers = {}, branch = "", deployBranch = "", deployTriggerBranch = "" } = context;
351
+ const { types = [], paths = new Map(), deployTarget = "docker-ssh", repoName = "", resolvers = {}, branch = "", deployBranch = "", deployTriggerBranch = "", ciMinutesSaver = false } = context;
352
352
  const workflowsDir = join(targetRoot, PATHS.workflowsDir);
353
353
  // 설치 시점 기준점(#557) — 없으면 null이고 classify가 종전 2-way로 폴백한다.
354
354
  const baseline = readBaseline(targetRoot);
355
355
  const projectTypesDir = join(tempDir, PATHS.workflowsDir, PATHS.projectTypesDir);
356
356
  const conflicts = []; // [{ filename, type }] — 엔진 처리 순서와 동일 (common → 타입 순회 → server-deploy)
357
- const branches = { defaultBranch: branch || "main", deployBranch: deployBranch || "develop", deployTriggerBranch: deployTriggerBranch || "" }; // #477 — 엔진과 동일 기준
357
+ const branches = { defaultBranch: branch || "main", deployBranch: deployBranch || "develop", deployTriggerBranch: deployTriggerBranch || "", ciMinutesSaver: !!ciMinutesSaver }; // #477 — 엔진과 동일 기준
358
358
 
359
359
  // common (#560) — 사용자가 손댄 것이 "확인된" 파일만 질문 대상이다.
360
360
  // 기준점이 없어 판정 불가인 파일은 엔진이 .bak을 남기고 덮어쓰므로 질문하지 않는다.
@@ -68,6 +68,9 @@ export const FLAGS = [
68
68
  { flag: "--projects-sync", negation: "--no-projects-sync",
69
69
  description: "Include / exclude the GitHub Projects status sync workflow. Needs a PAT secret and PROJECT_URL variable.",
70
70
  default: "excluded for new installs; kept if already installed", versionYml: "metadata.template.options.projects_sync" },
71
+ { flag: "--ci-minutes-saver", negation: "--no-ci-minutes-saver",
72
+ description: "Cut GitHub Actions minutes for private repos: CI runs on PRs only and skips docs-only changes, the iOS (macOS) CI build runs only on manual dispatch, secret backup runs only on manual dispatch.",
73
+ default: "off", versionYml: "metadata.template.options.ci_minutes_saver" },
71
74
  { flag: "--remove-legacy",
72
75
  description: "Rename retired old-generation workflows to .bak. Without it they are only listed in the summary and in doctor.", default: "off" },
73
76
  { flag: "--force", alias: "-y", aliases: ["-y", "--yes"], description: "Skip every confirmation and use non-interactive defaults. Required for agents and CI.", default: "off" },
@@ -107,6 +110,8 @@ export const VERSION_YML = [
107
110
  { path: "metadata.template.options.language", parserKey: "language", type: "enum", values: [...REPO_LANGUAGES], description: "Issue/PR template and bot message language.", edit: "wizard (--language)" },
108
111
  { path: "metadata.template.options.deploy_trigger_branch", parserKey: "deployTriggerBranch", type: "string", default: "the default branch",
109
112
  description: "Branch whose push runs the deploy workflows (app store, server, package publish).", edit: "wizard (--deploy-trigger-branch)" },
113
+ { path: "metadata.template.options.ci_minutes_saver", parserKey: "ciMinutesSaver", type: "boolean", default: false,
114
+ description: "Install the CI workflows in their Actions-minutes-saving form (PR-only CI, docs-only changes skipped, iOS CI build and secret backup on manual dispatch only).", edit: "wizard (--ci-minutes-saver)" },
110
115
  { path: "metadata.template.options.label_style", parserKey: "labelStyle", type: "enum", values: [...LABEL_STYLES], description: "Status label names.", edit: "wizard (--label-style)" },
111
116
  { path: "metadata.template.options.projects_sync", parserKey: "projectsSync", type: "boolean", description: "Projects status sync workflow installed.", edit: "wizard (--projects-sync)" },
112
117
  { path: "metadata.template.options.app_release", parserKey: "appRelease", type: "boolean",
@@ -245,6 +250,13 @@ export const FLAG_DETAILS = {
245
250
  omitted: "Not installed for new installs; kept if it is already installed.",
246
251
  example: "npx projectops --mode workflows --force --projects-sync",
247
252
  },
253
+ "--ci-minutes-saver": {
254
+ when: "Private repos that pay for GitHub Actions minutes.",
255
+ effect: "Writes metadata.template.options.ci_minutes_saver: true and installs these workflows changed: FLUTTER-CI, PYTHON-CI and SPRING-NEXUS-CI drop the push trigger (PR only) and skip PRs that change only docs (**/*.md, docs/**, LICENSE); FLUTTER-CI also turns the iOS (macOS runner) build off unless run manually with enable_ios; REACT-CI (push only) skips docs-only pushes; SECRET-FILE-UPLOAD runs only on manual dispatch. Later updates keep the setting. --no-ci-minutes-saver removes it.",
256
+ omitted: "Off: the workflows are installed unchanged.",
257
+ example: "npx projectops --mode workflows --force --ci-minutes-saver",
258
+ caution: "Direct pushes to the development branch no longer run CI. If a CI check is a required status check, a docs-only PR waits for it forever; mark it not required or drop the paths-ignore line. An already installed SECRET-FILE-UPLOAD is never rewritten by updates (it holds the repo's server folder), so on an existing repo remove its push trigger by hand.",
259
+ },
248
260
  "--remove-legacy": {
249
261
  when: "After an update printed 'retired workflows are still installed' (or doctor listed them) and the new workflow is working.",
250
262
  effect: "Renames retired old-generation workflows (for example PROJECT-SPRING-SYNOLOGY-*, PROJECT-COMMON-RELEASE-PUBLISH) to *.yaml.bak so they stop running. Delete the .bak to restore.",
@@ -290,6 +302,7 @@ export const KEY_DETAILS = {
290
302
  "metadata.template.options.close_on_release": { when: "Set false to keep finished issues open after a release.", effect: "A release merge closes issues that carry the done label and are referenced by a release commit.", omitted: "true for new installs; off (key missing) for existing installs." },
291
303
  "metadata.template.options.language": { when: "Edit via --language.", effect: "Language of issue/PR templates, bot comments and version.yml comments.", omitted: "en for new installs, ko for existing ones." },
292
304
  "metadata.template.options.deploy_trigger_branch": { when: "Edit via --deploy-trigger-branch.", effect: "Branch whose push runs the deploy workflows; the installed deploy workflows trigger on it instead of the default branch.", omitted: "The default branch." },
305
+ "metadata.template.options.ci_minutes_saver": { when: "Edit via --ci-minutes-saver / --no-ci-minutes-saver.", effect: "Installs the CI workflows in their Actions-minutes-saving form (see --ci-minutes-saver).", omitted: "false: workflows unchanged." },
293
306
  "metadata.template.options.label_style": { when: "Edit via --label-style.", effect: "Status label names (en 'status: todo' or legacy ko).", omitted: "en for new installs, ko for existing ones." },
294
307
  "metadata.template.options.projects_sync": { when: "Edit via --projects-sync.", effect: "Whether the Projects status sync workflow is installed.", omitted: "false for new installs; kept if installed." },
295
308
  "metadata.template.options.app_release": { when: "Set true by hand for repos whose releases go through App Store / Play Store review.", effect: "The deploy skill (pro-changelog-deploy) treats releases as going through store review: release notes get a review warning banner and are checked more strictly, and the release PR always waits for manual approval instead of automerging.", omitted: "Not set. Never enabled automatically.", caution: "Do not set it on repos that do not ship to a store." },
@@ -59,6 +59,8 @@ export function resolveOptions({ flags = {}, existing = null, types = [], cwd =
59
59
  deployBranch: flags.deployBranch || stored.deployBranch || "",
60
60
  // #1114 — 비어 있으면 워크플로를 바꾸지 않고 version.yml 에도 쓰지 않는다 (기존 레포 무변화)
61
61
  deployTriggerBranch: flags.deployTriggerBranch || stored.deployTriggerBranch || "",
62
+ // #1114 — 켤 때만 기록·치환. 꺼져 있으면 설치 결과가 바이트 동일
63
+ ciMinutesSaver: flags.ciMinutesSaver ?? stored.ciMinutesSaver ?? false,
62
64
  // #455 — null 이 흘러 provider:"null" 로 기록되던 버그 방지
63
65
  changelogProvider: migrateProvider(stored.changelogProvider) ?? "commit",
64
66
  changelogBaseUrl: stored.changelogBaseUrl ?? "",
@@ -98,7 +100,7 @@ const TEMPLATE_OPTION_FIELDS = [
98
100
  "intent", "deployTarget", "publishTargets", "includeSecretBackup", "aiPrSummary", "projectsSync",
99
101
  "changelogProvider", "changelogBaseUrl", "codeReviewCoderabbit", "semverAuto", "appRelease",
100
102
  "excludedWorkflows", "storeLocales", "storeLocalesIos", "storeLocalesPlay", "closeOnRelease", "language", "labelStyle",
101
- "deployTriggerBranch",
103
+ "deployTriggerBranch", "ciMinutesSaver",
102
104
  ];
103
105
 
104
106
  /** 실행 context(resolveOptions 값이 펼쳐진 것) > buildVersionYml templateOptions */
@@ -10,6 +10,7 @@ import { REPO_LANGUAGES } from "./repo-language.js";
10
10
  const alt = (values) => values.map((v) => v.replace(/[.*+?^${}()|[\]\\-]/g, "\\$&")).join("|");
11
11
  const LANGUAGE_RE = new RegExp(`^\\s+language:\\s*["']?(${alt(REPO_LANGUAGES)})["']?`);
12
12
  const DEPLOY_TRIGGER_BRANCH_RE = /^\s+deploy_trigger_branch:\s*["']?([A-Za-z0-9._\/-]+)["']?/;
13
+ const CI_MINUTES_SAVER_RE = /^\s+ci_minutes_saver:\s*["']?(true|false)["']?/;
13
14
  const LABEL_STYLE_RE = new RegExp(`^\\s+label_style:\\s*["']?(${alt(LABEL_STYLES)})["']?`);
14
15
 
15
16
  const HEADER_EN = `# ===================================================================
@@ -114,6 +115,7 @@ const COMMENTS = {
114
115
  language: "issue/PR template language (en | ko)",
115
116
  labelStyle: "status label style (en: status: todo / ko: Korean names)",
116
117
  deployTriggerBranch: "branch whose push runs the deploy workflows (missing = the default branch)",
118
+ ciMinutesSaver: "install CI workflows in their Actions-minutes-saving form (missing = off)",
117
119
  appRelease: "whether releases go through App Store / Play Store review",
118
120
  deploy: "deploy settings remembered by the wizard (non-sensitive, safe to edit by hand)",
119
121
  excluded: "workflow files the update must never install (safe to edit by hand)",
@@ -133,6 +135,7 @@ const COMMENTS = {
133
135
  language: "이슈/PR 템플릿 언어 (en | ko)",
134
136
  labelStyle: "상태 라벨 표기 (en: status: todo / ko: 작업전)",
135
137
  deployTriggerBranch: "branch whose push runs the deploy workflows (missing = the default branch)",
138
+ ciMinutesSaver: "install CI workflows in their Actions-minutes-saving form (missing = off)",
136
139
  appRelease: "앱스토어·플레이스토어 심사로 이어지는 배포인가",
137
140
  deploy: "마법사가 기억하는 배포 설정 (비민감 / 직접 수정 가능)",
138
141
  excluded: "업데이트가 절대 설치하지 않을 워크플로우 파일 (직접 수정 가능)",
@@ -167,7 +170,7 @@ export function resolveUpdatedBy(existingContent = "", cwd = ".") {
167
170
  export function parseTemplateOptions(content) {
168
171
  const out = { deploy: null, publish: null, secretBackup: null,
169
172
  changelogProvider: null, changelogBaseUrl: null, codeReviewCoderabbit: null, aiPrSummary: null, projectsSync: null,
170
- deployBranch: null, deployTriggerBranch: null, intent: null, semverAuto: null, appRelease: null, labelStyle: null, closeOnRelease: null, language: null, excludedWorkflows: null, storeLocales: null, storeLocalesIos: null, storeLocalesPlay: null };
173
+ deployBranch: null, deployTriggerBranch: null, ciMinutesSaver: null, intent: null, semverAuto: null, appRelease: null, labelStyle: null, closeOnRelease: null, language: null, excludedWorkflows: null, storeLocales: null, storeLocalesIos: null, storeLocalesPlay: null };
171
174
  // 개발 브랜치는 metadata 직속(#456) — template.options 밖이라 별도로 스캔한다.
172
175
  out.deployBranch = readDevelopmentBranch(content);
173
176
  let legacyNexus = null;
@@ -259,6 +262,12 @@ export function parseTemplateOptions(content) {
259
262
  out.deployTriggerBranch = m[1];
260
263
  continue;
261
264
  }
265
+ // CI 사용 시간 절약(#1114) — 미기재면 꺼짐.
266
+ m = line.match(CI_MINUTES_SAVER_RE);
267
+ if (m) {
268
+ out.ciMinutesSaver = m[1] === "true";
269
+ continue;
270
+ }
262
271
  // Projects 보드 동기화(#716). null(미기재)이면 호출부가 "이미 설치돼 있으면 유지, 아니면 제외"로 해석한다.
263
272
  m = line.match(/^\s+projects_sync:\s*["']?(true|false)["']?/);
264
273
  if (m) {
@@ -447,7 +456,7 @@ const OWNED_TOP = new Set(["version", "version_code", "project_types", "project_
447
456
  // buildVersionYml 이 쓰는 6칸 키와 같아야 한다 — 빠지면 재실행마다 그 키가 두 번 쓰인다 (대조: test/version-yml-preserve.test.js).
448
457
  // nexus · npm_publish · synology 는 옛 키다 — 파서가 신형(publish · secret_backup)으로 바꿔 쓰므로 그대로 두면 이중 기록이 된다.
449
458
  export const OWNED_OPTION_KEYS = new Set(["intent", "deploy", "publish", "secret_backup", "semver_auto", "projects_sync", "close_on_release",
450
- "language", "label_style", "deploy_trigger_branch", "app_release", "excluded_workflows", "store_locales", "store_locales_ios", "store_locales_play",
459
+ "language", "label_style", "deploy_trigger_branch", "ci_minutes_saver", "app_release", "excluded_workflows", "store_locales", "store_locales_ios", "store_locales_play",
451
460
  "code_review", "changelog",
452
461
  "nexus", "npm_publish", "synology"]);
453
462
 
@@ -595,7 +604,7 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
595
604
  if (templateOptions) {
596
605
  const { templateVersion = "unknown", deployTarget = "docker-ssh", publishTargets = [], includeSecretBackup = false, optionsDate = today,
597
606
  changelogProvider = "commit", changelogBaseUrl = "", codeReviewCoderabbit = true, aiPrSummary = true, intent = null, mode = null,
598
- semverAuto = true, appRelease = null, labelStyle = null, deployTriggerBranch = "", closeOnRelease = null, projectsSync = null, language = null, excludedWorkflows = null, storeLocales = null, storeLocalesIos = null, storeLocalesPlay = null } = templateOptions;
607
+ semverAuto = true, appRelease = null, labelStyle = null, deployTriggerBranch = "", ciMinutesSaver = false, closeOnRelease = null, projectsSync = null, language = null, excludedWorkflows = null, storeLocales = null, storeLocalesIos = null, storeLocalesPlay = null } = templateOptions;
599
608
  const publishJson = `[${publishTargets.map((t) => `"${t}"`).join(",")}]`;
600
609
  // intent(프로젝트 성격, #485) — 미지정이면 deploy/publish에서 역추론해 기록 (재통합 시 진입 질문 생략용)
601
610
  const intentVal = intent || inferIntent(deployTarget, publishTargets) || "manual";
@@ -629,6 +638,8 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
629
638
  if (labelStyle) out += ` label_style: ${labelStyle} # ${C.labelStyle}\n`;
630
639
  // 배포 트리거 브랜치(#1114) — 미지정이면 키를 쓰지 않는다(기존 레포 무변화).
631
640
  if (deployTriggerBranch) out += ` deploy_trigger_branch: "${deployTriggerBranch}" # ${C.deployTriggerBranch}\n`;
641
+ // CI 사용 시간 절약(#1114) — 켰을 때만 쓴다(기존 레포 무변화).
642
+ if (ciMinutesSaver) out += ` ci_minutes_saver: true # ${C.ciMinutesSaver}\n`;
632
643
  // 앱 심사 배포 레포 여부(#553) — 미지정이면 키를 쓰지 않는다(기존 레포 무변화).
633
644
  if (appRelease !== null) {
634
645
  out += ` app_release: ${appRelease} # ${C.appRelease}\n`;
package/src/index.js CHANGED
@@ -197,7 +197,7 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
197
197
  flags: {
198
198
  intent: opts.intent, deployTarget: opts.deployTarget, publishTargets: opts.publishTargets,
199
199
  includeSecretBackup: opts.includeSecretBackup, aiPrSummary: opts.aiPrSummary, projectsSync: opts.projectsSync,
200
- deployBranch: opts.deployBranch, deployTriggerBranch: opts.deployTriggerBranch, codeReviewCoderabbit: opts.codeReviewCoderabbit,
200
+ deployBranch: opts.deployBranch, deployTriggerBranch: opts.deployTriggerBranch, ciMinutesSaver: opts.ciMinutesSaver, codeReviewCoderabbit: opts.codeReviewCoderabbit,
201
201
  language: opts.language, labelStyle: opts.labelStyle,
202
202
  },
203
203
  existing, types, cwd,