Skip to content

Commit fd87b68

Browse files
AriESQclaude
andcommitted
Fix README terminology and ordering inaccuracies
- Tag protection: use actual GitHub Ruleset rule names (Restrict updates/deletions) instead of made-up terms, show all available rules - SKIP description: cover both "already correct" and "plan limitation" meanings - --from/--local workflows: fix step ordering to match code (branch/tag protection runs after code push, not before) - Remove redundant "Dependabot and secret scanning are configured" step - Fix "silently skipped" claim (settings show as SKIP rows, not silent) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 158f3b2 commit fd87b68

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,20 @@ Fixing all of this manually takes minutes per repo and is easy to forget. `gh-sa
8888

8989
### Tag protection (public repos, or any repo on a paid plan)
9090

91-
| Rule | Value |
92-
|---|---|
93-
| Protected tag patterns | `*` (all tags; configurable) |
94-
| Prevent tag deletion | Yes |
95-
| Prevent tag update (rewriting) | Yes |
96-
| Admin bypass | Yes (consistent with branch protection) |
91+
Tag protection creates a GitHub Ruleset targeting all tags (`*` by default, configurable via `protected_tags`). The following rules are enforced:
92+
93+
| Ruleset rule | Enforced? | Notes |
94+
|---|---|---|
95+
| Restrict creations | No | |
96+
| **Restrict updates** | **Yes** | Prevents rewriting / force-pushing tags |
97+
| **Restrict deletions** | **Yes** | Prevents `git push --delete` of tags |
98+
| Require linear history | No | |
99+
| Require deployments to succeed | No | |
100+
| Require signed commits | No | |
101+
| Require status checks to pass | No | |
102+
| Block force pushes | No | |
97103

98-
Tag protection uses the Rulesets API exclusively — there is no "classic" tag protection equivalent. This only works on public repos or paid GitHub plans (same restriction as branch protection). Free-plan private repos will see this skipped in the plan output.
104+
Repository admins are on the bypass list (consistent with the branch protection `enforce_admins = false` default). Only works on public repos or paid GitHub plans (same restriction as branch protection). Free-plan private repos will see this skipped in the plan output.
99105

100106
### Security
101107

@@ -268,7 +274,7 @@ $ gh-safe-repo create <owner/repo> --dry-run
268274
| `ADD` (green) | New setting being applied |
269275
| `UPDATE` (yellow) | Existing setting being changed (audit mode) |
270276
| `DELETE` (red) | Setting being removed |
271-
| `SKIP` (dim) | Feature unavailable on your plan/visibility combination |
277+
| `SKIP` (dim) | No action needed — already at the desired value, or feature unavailable on your plan/visibility combination |
272278

273279
**JSON output** (`--json`):
274280

@@ -308,7 +314,7 @@ Fix mode:
308314
3. Shows a plan table with `UPDATE` for changed settings and `SKIP` for settings already at the desired value (no-op detection — it never makes API calls that would change nothing)
309315
4. Prompts for confirmation before applying (skip with `--yes`)
310316

311-
Settings that are already correct are silently skipped. Only real changes are shown and applied.
317+
Only real changes are applied — settings already at the desired value are shown as `SKIP` and generate no API calls.
312318

313319
---
314320

@@ -330,9 +336,9 @@ gh-safe-repo create <owner/pub> --from <owner/priv> --public
330336
2. The [pre-flight security scanner](#pre-flight-security-scanner) runs on the local clone
331337
3. You review findings and confirm (or abort)
332338
4. A new repo is created (private by default, or public with `--public`)
333-
5. Safe defaults are applied (branch protection, security scanning, etc.)
339+
5. Actions permissions and security settings are applied (Dependabot, secret scanning, push protection)
334340
6. The full history is mirrored: `git clone --mirror` + `git push --mirror`
335-
7. Dependabot and secret scanning are configured
341+
7. Branch and tag protection are applied (after code push, so the target branch exists)
336342

337343
If the scan reveals a problem and you abort, no code is ever copied to GitHub.
338344

@@ -353,12 +359,12 @@ gh-safe-repo create <owner/repo> --local ~/projects/myapp --public
353359

354360
1. The [pre-flight security scanner](#pre-flight-security-scanner) runs on the local directory directly (no clone needed)
355361
2. You review findings and confirm (or abort)
356-
3. A new repo is created with safe defaults applied
357-
4. Branch protection is applied **before any code is pushed** (when `--public`)
358-
5. Code is pushed:
362+
3. A new repo is created, and actions permissions and security settings are applied
363+
4. Code is pushed:
359364
- If `PATH` is a git repo: the full history is cloned locally and pushed with `push --all --tags` (all branches and tags)
360365
- If `PATH` is a plain directory: files are staged in a fresh repo and pushed as an initial commit
361366
- If `PATH` is an empty directory: nothing is pushed (silently skipped)
367+
5. Branch and tag protection are applied (after code push, so the target branch exists)
362368
6. If `PATH` is a git repo, `origin` is added to the **original** local repo pointing at the new GitHub URL, and the current branch's upstream tracking is configured — so `git push` and `git pull` work immediately without extra setup.
363369

364370
Both `--local` and `--from` work for private and public repos. They are mutually exclusive.

0 commit comments

Comments
 (0)