@lilpacy/setup-github-rules 0.1.2 → 0.2.0

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
@@ -76,12 +76,12 @@ npx @lilpacy/setup-github-rules \
76
76
 
77
77
  ### required approvals を対話で選ぶ
78
78
 
79
- `--required-approvals` を省略すると、実行中に `0` から `6` を選べます。Enter だけ押した場合は `1` です。
79
+ `--required-approvals` を省略すると、実行中に `0` から `6` を選べます。Enter だけ押した場合は `0` です。
80
80
 
81
81
  ```txt
82
82
  Choose the number of required approving reviews.
83
83
  Use 0 for solo repositories where nobody else can approve your PR.
84
- Required approvals [0-6] (default: 1):
84
+ Required approvals [0-6] (default: 0):
85
85
  ```
86
86
 
87
87
  1 人で開発している repository なら、通常は `0` を選ぶのが安全です。
@@ -98,7 +98,7 @@ npx @lilpacy/setup-github-rules --repo lilpacy/repo-a --dry-run
98
98
  |---|---|---|
99
99
  | `--repo OWNER/REPO` | 対象 repository | current git remote から検出 |
100
100
  | `--branch BRANCH` | default branch / protected branch | 対話式で選択 |
101
- | `--required-approvals N` | 必須 approval 数 | `1` |
101
+ | `--required-approvals N` | 必須 approval 数 | `0` |
102
102
  | `--ruleset-name NAME` | ruleset 名 | `Require PR to <branch>` |
103
103
  | `--yes`, `-y` | 最終確認をスキップ | `false` |
104
104
  | `--dry-run` | 変更せず plan だけ表示 | `false` |
@@ -112,7 +112,7 @@ Plan:
112
112
  Current default: main
113
113
  New default: develop
114
114
  Protected branch: develop
115
- Required approvals: 1
115
+ Required approvals: 0
116
116
  Ruleset name: Require PR to develop
117
117
 
118
118
  Apply these changes? [y/N]: y
@@ -58,7 +58,7 @@ Usage:
58
58
  Options:
59
59
  --repo OWNER/REPO Target repository. Defaults to current git remote.
60
60
  --branch BRANCH Default branch to set and protect. Skips branch prompt.
61
- --required-approvals N Required approving reviews. If omitted, prompt with default 1.
61
+ --required-approvals N Required approving reviews. If omitted, prompt with default 0.
62
62
  --ruleset-name NAME Ruleset name. Default: "Require PR to <branch>".
63
63
  --yes, -y Skip final confirmation.
64
64
  --dry-run Print planned operations without changing GitHub.
@@ -180,8 +180,8 @@ export async function selectApprovals(rl, preselectedApprovals) {
180
180
  console.log("Use 0 for solo repositories where nobody else can approve your PR.");
181
181
 
182
182
  while (true) {
183
- const answer = (await rl.question("Required approvals [0-6] (default: 1): ")).trim();
184
- const approvals = answer === "" ? 1 : Number(answer);
183
+ const answer = (await rl.question("Required approvals [0-6] (default: 0): ")).trim();
184
+ const approvals = answer === "" ? 0 : Number(answer);
185
185
  if (isValidApprovalCount(approvals)) return approvals;
186
186
  console.log("Please enter an integer between 0 and 6.");
187
187
  }
@@ -192,7 +192,7 @@ export async function resolveApprovals(rl, {
192
192
  isInteractive
193
193
  }) {
194
194
  if (preselectedApprovals !== null) return preselectedApprovals;
195
- if (!isInteractive) return 1;
195
+ if (!isInteractive) return 0;
196
196
  return selectApprovals(rl, null);
197
197
  }
198
198
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilpacy/setup-github-rules",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "One-shot interactive GitHub repository rules setup using gh CLI. No Terraform state, no generated files.",
5
5
  "type": "module",
6
6
  "bin": {