Skip to content

Commit 1625d02

Browse files
Nicolas Brieusselclaude
authored andcommitted
Add prettier setup and expand README with fork guide and local dev bootstrap
- Add prettier (package.json, .prettierrc.yml, .prettierignore) with mise tasks - Format all existing YAML/MD files with prettier - Expand README: two fork alternatives (fork this repo vs start fresh), official safe-settings docs links, accurate permissions table from app.yml at 2.1.17, and local dev bootstrap instructions (mise install, npm install, fmt tasks) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 791a355 commit 1625d02

File tree

15 files changed

+197
-65
lines changed

15 files changed

+197
-65
lines changed

.github/repos/examples/new-service.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# --- Force-create the repo if it doesn't exist yet ---
1212
# Useful for bootstrapping: push this file, safe-settings creates the repo.
1313
repository:
14-
force_create: true # Create the repo if it doesn't exist in the org
14+
force_create: true # Create the repo if it doesn't exist in the org
1515
# template: template-service # Uncomment to initialize from a template repo
1616
description: "Short description shown on GitHub"
1717
homepage: ""
@@ -22,7 +22,6 @@ repository:
2222
# private: true
2323
# visibility: private
2424

25-
2625
# --- Teams ---
2726
# Override team access for this specific repo.
2827
# Useful for: giving a specific team admin on their own service.
@@ -35,7 +34,6 @@ teams:
3534
# - name: payments-team
3635
# permission: push
3736

38-
3937
# --- Collaborators ---
4038
# Add specific GitHub users (outside the org or for special cases).
4139
# Cannot grant admin — enforced by deployment-settings.yml configvalidator.
@@ -45,7 +43,6 @@ teams:
4543
# include:
4644
# - this-repo-only
4745

48-
4946
# --- Branch protection override ---
5047
# Only needed if this repo differs from the suborg default.
5148
# Example: a critical payments service requiring 2 reviews instead of 1.
@@ -66,15 +63,13 @@ teams:
6663
# allow_force_pushes: false
6764
# allow_deletions: false
6865

69-
7066
# --- Additional labels specific to this repo ---
7167
# labels:
7268
# include:
7369
# - name: "payments"
7470
# color: "0075ca"
7571
# description: "Payments-related issue"
7672

77-
7873
# --- Autolinks ---
7974
# Link issue tracker references in commits/PRs automatically.
8075
# autolinks:
@@ -85,7 +80,6 @@ teams:
8580
# url_template: "https://yourcompany.atlassian.net/browse/JIRA-<num>"
8681
# is_alphanumeric: false
8782

88-
8983
# --- Custom properties ---
9084
# Set custom properties for filtering/suborg matching.
9185
# custom_properties:

.github/repos/examples/open-source-lib.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ repository:
3030
enableVulnerabilityAlerts: true
3131
enableAutomatedSecurityFixes: true
3232

33-
3433
# Labels for community contributions
3534
labels:
3635
include:
@@ -53,7 +52,6 @@ labels:
5352
color: "e4e669"
5453
description: "This doesn't seem right"
5554

56-
5755
# Stricter branch protection for public repos:
5856
# require CODEOWNERS review so maintainers control what gets merged.
5957
branches:
@@ -62,7 +60,7 @@ branches:
6260
required_pull_request_reviews:
6361
required_approving_review_count: 1
6462
dismiss_stale_reviews: true
65-
require_code_owner_reviews: true # Maintainers must approve community PRs
63+
require_code_owner_reviews: true # Maintainers must approve community PRs
6664
require_last_push_approval: false
6765
required_status_checks:
6866
strict: true
@@ -74,7 +72,6 @@ branches:
7472
allow_deletions: false
7573
restrictions: null
7674

77-
7875
# Autolinks: link PR descriptions to your internal tracker
7976
# autolinks:
8077
# - key_prefix: "LIN-"

.github/settings.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ repository:
1717
default_branch: main
1818

1919
has_issues: true
20-
has_projects: false # Use a dedicated project management tool (Linear, Jira, etc.)
21-
has_wiki: false # Prefer docs-as-code in the repo itself
20+
has_projects: false # Use a dedicated project management tool (Linear, Jira, etc.)
21+
has_wiki: false # Prefer docs-as-code in the repo itself
2222

2323
allow_squash_merge: true
24-
allow_merge_commit: false # Keep history clean — squash or rebase only
24+
allow_merge_commit: false # Keep history clean — squash or rebase only
2525
allow_rebase_merge: true
2626
allow_auto_merge: false
2727
delete_branch_on_merge: true
@@ -31,7 +31,6 @@ repository:
3131
enableVulnerabilityAlerts: true
3232
enableAutomatedSecurityFixes: true
3333

34-
3534
# --- Labels ---
3635
# Standard label set across all repos. Enables consistent filtering in GitHub,
3736
# Linear, and any automation that reads issue/PR labels.
@@ -105,7 +104,6 @@ labels:
105104
# Never delete labels that start with "release" — managed by the release workflow
106105
- name: "^release"
107106

108-
109107
# --- Branch protection (default branch) ---
110108
# Baseline: 1 review, conversations must be resolved, no force pushes.
111109
# CI check contexts are left empty — each repo's own workflow registers

.github/suborgs/backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ branches:
3434
require_last_push_approval: false
3535

3636
required_status_checks:
37-
strict: true # Branch must be up to date with main before merge
37+
strict: true # Branch must be up to date with main before merge
3838
contexts: []
3939
enforce_admins: false
4040
required_conversation_resolution: true

.github/suborgs/infrastructure.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ branches:
2929
required_pull_request_reviews:
3030
required_approving_review_count: 2
3131
dismiss_stale_reviews: true
32-
require_code_owner_reviews: true # CODEOWNERS file should designate platform team
33-
require_last_push_approval: true # Last commit must be approved by someone else
32+
require_code_owner_reviews: true # CODEOWNERS file should designate platform team
33+
require_last_push_approval: true # Last commit must be approved by someone else
3434

3535
required_status_checks:
3636
strict: true
3737
contexts: []
38-
enforce_admins: false # Set to true if you want even admins to go through PR flow
38+
enforce_admins: false # Set to true if you want even admins to go through PR flow
3939
required_conversation_resolution: true
4040
allow_force_pushes: false
4141
allow_deletions: false

.github/workflows/safe-settings-sync.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ on:
1313
workflow_dispatch:
1414
inputs:
1515
nop:
16-
description: 'Dry-run mode: show diffs without applying (true/false)'
16+
description: "Dry-run mode: show diffs without applying (true/false)"
1717
required: false
18-
default: 'false'
18+
default: "false"
1919

2020
jobs:
2121
sync:
@@ -38,7 +38,7 @@ jobs:
3838
- name: Setup Node.js
3939
uses: actions/setup-node@v4
4040
with:
41-
node-version: '20'
41+
node-version: "20"
4242
cache: npm
4343
cache-dependency-path: ${{ env.SAFE_SETTINGS_CODE_DIR }}/package-lock.json
4444

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

.mise.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[tools]
2+
node = "lts"
3+
4+
[tasks.fmt]
5+
run = "npx prettier --write ."
6+
description = "Format all files with Prettier"
7+
8+
[tasks."fmt:check"]
9+
run = "npx prettier --check ."
10+
description = "Check formatting without writing"

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
package-lock.json

.prettierrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
proseWrap: always
2+
printWidth: 100

0 commit comments

Comments
 (0)