@aristobyte/repo 1.0.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 +93 -0
- package/dist/app.js +1227 -0
- package/dist/apply_one_repo_policy.js +3 -0
- package/dist/cli.js +78 -0
- package/dist/commands/compat.js +251 -0
- package/dist/log.js +53 -0
- package/dist/manage.js +3 -0
- package/dist/runner.js +58 -0
- package/dist/scripts/apply_one_repo_policy.js +3 -0
- package/dist/scripts/apply_org_policy.js +3 -0
- package/dist/scripts/create_repo.js +3 -0
- package/dist/scripts/end/apply_org_config.js +3 -0
- package/dist/scripts/end/create_repo.js +3 -0
- package/dist/scripts/end/init_org_teams.js +3 -0
- package/dist/scripts/end/remove_org_teams.js +3 -0
- package/dist/scripts/ensure_org_teams.js +3 -0
- package/dist/scripts/gh_manage.js +3 -0
- package/dist/scripts/init_discussions_org.js +3 -0
- package/dist/scripts/init_discussions_repo.js +3 -0
- package/dist/scripts/init_teams.js +3 -0
- package/dist/scripts/lib/common.js +1 -0
- package/dist/scripts/remove_teams_org.js +3 -0
- package/dist/scripts/update_actions_policy_org.js +3 -0
- package/dist/scripts/update_actions_policy_repo.js +3 -0
- package/dist/scripts/update_environments_org.js +3 -0
- package/dist/scripts/update_environments_repo.js +3 -0
- package/dist/scripts/update_rulesets_org.js +3 -0
- package/dist/scripts/update_rulesets_repo.js +3 -0
- package/dist/scripts/update_security_policy_org.js +3 -0
- package/dist/scripts/update_security_policy_repo.js +3 -0
- package/dist/scripts/validate_project.js +3 -0
- package/dist/utils/flags.js +25 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# AristoRepo
|
|
2
|
+
|
|
3
|
+
Clean, config-first GitHub org/repo bootstrap toolkit.
|
|
4
|
+
|
|
5
|
+
## CLI (Primary)
|
|
6
|
+
|
|
7
|
+
Use the TypeScript CLI package `aristo-repo` as the main entrypoint.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd aristo-repo
|
|
11
|
+
npm install
|
|
12
|
+
npm run build
|
|
13
|
+
npm link
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Then:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
aristo-repo create <org> <repo>
|
|
20
|
+
aristo-repo apply-org <org>
|
|
21
|
+
aristo-repo init-teams <org>
|
|
22
|
+
aristo-repo remove-teams <org>
|
|
23
|
+
aristo-repo validate
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Build And Publish
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm run check
|
|
30
|
+
npm run build
|
|
31
|
+
npm run publish:dry-run
|
|
32
|
+
npm run publish:npm
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
One-step publish flow:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run release
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Shell scripts (under `./scripts/`):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bash ./scripts/build.sh
|
|
45
|
+
bash ./scripts/bump.sh patch
|
|
46
|
+
bash ./scripts/publish.sh --dry-run
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Detailed CLI docs: `./CLI.md`
|
|
50
|
+
|
|
51
|
+
## Current TS Migration Status
|
|
52
|
+
|
|
53
|
+
The CLI is now TS-native for:
|
|
54
|
+
|
|
55
|
+
- `create` orchestration
|
|
56
|
+
- `apply-org` orchestration
|
|
57
|
+
- `validate` checks
|
|
58
|
+
- Actions policy application (repo + org flows)
|
|
59
|
+
- Security policy application (repo + org flows)
|
|
60
|
+
- Environments policy application (repo + org flows)
|
|
61
|
+
|
|
62
|
+
The repository is now TS-only for operational logic.
|
|
63
|
+
|
|
64
|
+
## Compatibility Commands
|
|
65
|
+
|
|
66
|
+
Use `aristo-repo exec` with legacy command ids for backward compatibility.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
aristo-repo exec scripts/update_rulesets_org.ts --org aristobyte --config ./config/management.json --dry-run
|
|
70
|
+
aristo-repo exec scripts/validate_project.ts
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Source of Truth
|
|
74
|
+
|
|
75
|
+
- Runtime/module toggles: `./config/app.config.json`
|
|
76
|
+
- Repo/rulesets policy: `./config/management.json`, `./config/repo-settings.config.json`, `./config/rulesets.config.json`
|
|
77
|
+
- Teams: `./config/teams.config.json`
|
|
78
|
+
- Actions: `./config/actions.config.json`
|
|
79
|
+
- Security: `./config/security.config.json`
|
|
80
|
+
- Environments: `./config/environments.config.json`
|
|
81
|
+
- Discussions template: `./config/discussions.config.json`
|
|
82
|
+
|
|
83
|
+
## Architecture
|
|
84
|
+
|
|
85
|
+
- `src/*`: primary TS CLI and module logic
|
|
86
|
+
- `src/commands/*`: command/compat dispatch layer
|
|
87
|
+
- `src/utils/*`: shared utility helpers
|
|
88
|
+
- `scripts/`: reserved for Bash scripts (currently empty)
|
|
89
|
+
|
|
90
|
+
## Notes
|
|
91
|
+
|
|
92
|
+
- Internal scripts are reusable building blocks; avoid calling them unless needed.
|
|
93
|
+
- `dry_run` is controlled from `config/app.config.json`.
|