github-settings-as-code 3.0.0 → 3.0.2

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.
Files changed (69) hide show
  1. package/dist/cmd/repo-settings.d.mts.map +1 -1
  2. package/dist/cmd/repo-settings.mjs +35 -34
  3. package/dist/cmd/repo-settings.mjs.map +1 -1
  4. package/dist/github/actions-settings/api/get-actions-settings.d.mts.map +1 -1
  5. package/dist/github/actions-settings/api/get-actions-settings.mjs +7 -8
  6. package/dist/github/actions-settings/api/get-actions-settings.mjs.map +1 -1
  7. package/dist/github/actions-settings/api/set-actions-settings.mjs +7 -7
  8. package/dist/github/actions-settings/apply.mjs +7 -7
  9. package/dist/github/actions-settings/apply.mjs.map +1 -1
  10. package/dist/github/actions-settings/backup.mjs +2 -2
  11. package/dist/github/actions-settings/constants.d.mts +86 -0
  12. package/dist/github/actions-settings/constants.d.mts.map +1 -1
  13. package/dist/github/actions-settings/constants.mjs +24 -24
  14. package/dist/github/constants.mjs +2 -2
  15. package/dist/github/octokit.mjs +12 -12
  16. package/dist/github/pages/api/get-pages-settings.d.mts.map +1 -1
  17. package/dist/github/pages/api/get-pages-settings.mjs +6 -7
  18. package/dist/github/pages/api/get-pages-settings.mjs.map +1 -1
  19. package/dist/github/pages/api/set-pages-settings.mjs +8 -8
  20. package/dist/github/pages/apply.mjs +12 -12
  21. package/dist/github/pages/apply.mjs.map +1 -1
  22. package/dist/github/pages/backup.mjs +2 -2
  23. package/dist/github/pages/constants.d.mts +20 -0
  24. package/dist/github/pages/constants.d.mts.map +1 -1
  25. package/dist/github/pages/constants.mjs +6 -6
  26. package/dist/github/repository/api/get-repository.mjs +3 -3
  27. package/dist/github/repository/api/get-repository.mjs.map +1 -1
  28. package/dist/github/repository/api/update-repository.d.mts +1 -1
  29. package/dist/github/repository/api/update-repository.d.mts.map +1 -1
  30. package/dist/github/repository/api/update-repository.mjs +6 -3
  31. package/dist/github/repository/api/update-repository.mjs.map +1 -1
  32. package/dist/github/repository/apply.mjs +16 -16
  33. package/dist/github/repository/apply.mjs.map +1 -1
  34. package/dist/github/repository/backup.mjs +1 -1
  35. package/dist/github/repository/constants.d.mts +176 -0
  36. package/dist/github/repository/constants.d.mts.map +1 -1
  37. package/dist/github/repository/constants.mjs +3 -3
  38. package/dist/github/resolve-target-repo.mjs +24 -24
  39. package/dist/github/ruleset/api/create-ruleset.mjs +7 -7
  40. package/dist/github/ruleset/api/get-all-rulesets.mjs +5 -5
  41. package/dist/github/ruleset/api/get-all-rulesets.mjs.map +1 -1
  42. package/dist/github/ruleset/api/get-ruleset.mjs +3 -3
  43. package/dist/github/ruleset/api/get-ruleset.mjs.map +1 -1
  44. package/dist/github/ruleset/api/update-ruleset.mjs +7 -7
  45. package/dist/github/ruleset/apply.mjs +3 -3
  46. package/dist/github/ruleset/backup.mjs +1 -1
  47. package/dist/github/ruleset/constants.d.mts +88 -8
  48. package/dist/github/ruleset/constants.d.mts.map +1 -1
  49. package/dist/github/ruleset/constants.mjs +3 -3
  50. package/dist/github/ruleset/read-rule-set-contents.mjs +2 -2
  51. package/dist/github/variables/api/create-repo-variable.mjs +1 -1
  52. package/dist/github/variables/api/list-repo-variables.mjs +1 -1
  53. package/dist/github/variables/api/update-repo-variable.mjs +1 -1
  54. package/dist/github/variables/apply.d.mts.map +1 -1
  55. package/dist/github/variables/apply.mjs +7 -6
  56. package/dist/github/variables/apply.mjs.map +1 -1
  57. package/package.json +22 -27
  58. package/src/cmd/repo-settings.mts +37 -36
  59. package/src/github/actions-settings/api/get-actions-settings.mts +0 -1
  60. package/src/github/actions-settings/apply.mts +2 -2
  61. package/src/github/pages/api/get-pages-settings.mts +0 -1
  62. package/src/github/pages/apply.mts +2 -2
  63. package/src/github/repository/api/get-repository.mts +2 -2
  64. package/src/github/repository/api/update-repository.mts +6 -1
  65. package/src/github/repository/apply.mts +2 -2
  66. package/src/github/ruleset/api/get-all-rulesets.mts +2 -2
  67. package/src/github/ruleset/api/get-ruleset.mts +2 -2
  68. package/src/github/ruleset/schema.test.mts +164 -0
  69. package/src/github/variables/apply.mts +2 -0
@@ -1,10 +1,10 @@
1
1
  import { GetRulesetResponse } from 'octokit-safe-types';
2
- import { validationErrorsToMessages } from 'ts-fortress';
2
+ import * as t from 'ts-fortress';
3
3
  import { Result } from 'ts-repo-utils';
4
4
  import { octokitHeaders, OWNER, REPO } from '../../constants.mjs';
5
5
  import { octokit } from '../../octokit.mjs';
6
6
  export const getRuleset = async (rulesetId) => {
7
- // https://docs.github.com/ja/rest/repos/rules?apiVersion=2022-11-28#get-a-repository-ruleset
7
+
8
8
  const getRulesetResult = await octokit.request('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}', {
9
9
  owner: OWNER,
10
10
  repo: REPO,
@@ -14,7 +14,7 @@ export const getRuleset = async (rulesetId) => {
14
14
  {
15
15
  const res = GetRulesetResponse.validate(getRulesetResult.data);
16
16
  if (Result.isErr(res)) {
17
- console.warn(validationErrorsToMessages(res.value));
17
+ console.warn(t.validationErrorsToMessages(res.value));
18
18
  }
19
19
  }
20
20
  return GetRulesetResponse.fill(getRulesetResult.data);
@@ -1 +1 @@
1
- {"version":3,"file":"get-ruleset.mjs","sourceRoot":"","sources":["../../../../src/github/ruleset/api/get-ruleset.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,SAAiB,EACY,EAAE;IAC/B,6FAA6F;IAC7F,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,OAAO,CAC5C,iDAAwE,EAC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CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,OAAO,kBAAkB,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
- import { castDeepMutable } from 'ts-data-forge';
1
+
2
2
  import { octokitHeaders, OWNER, REPO } from '../../constants.mjs';
3
3
  import { octokit } from '../../octokit.mjs';
4
4
  export const updateRuleset = async ({ rulesetId, payload: { name, target, enforcement, bypass_actors, conditions, rules }, }) => {
5
- // https://docs.github.com/ja/rest/repos/rules?apiVersion=2022-11-28#update-a-repository-ruleset
5
+
6
6
  await octokit.request('PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}',
7
- // transformer-ignore-next-line convert-to-readonly
7
+
8
8
  {
9
9
  owner: OWNER,
10
10
  repo: REPO,
@@ -13,10 +13,10 @@ export const updateRuleset = async ({ rulesetId, payload: { name, target, enforc
13
13
  name,
14
14
  target,
15
15
  enforcement,
16
- bypass_actors: castDeepMutable(bypass_actors),
17
- conditions: castDeepMutable(conditions),
18
- // eslint-disable-next-line total-functions/no-unsafe-type-assertion
19
- rules: castDeepMutable(rules),
16
+ bypass_actors: bypass_actors,
17
+ conditions: conditions,
18
+
19
+ rules: rules,
20
20
  });
21
21
  };
22
22
  //# sourceMappingURL=update-ruleset.mjs.map
@@ -40,15 +40,15 @@ export const applyRulesets = async () => {
40
40
  },
41
41
  });
42
42
  }
43
- // update local ruleset files
43
+
44
44
  {
45
45
  const rulesetsResult = await getAllRulesets();
46
46
  for (const rule of rulesetsResult) {
47
47
  const content = await getRuleset(rule.id);
48
48
  const str = JSON.stringify(Obj.pick(content, rulesetKeysToPick), undefined, 2);
49
- // eslint-disable-next-line security/detect-non-literal-fs-filename
49
+
50
50
  await fs.writeFile(path.resolve(rulesetsDir, `${rule.name}.json`), str);
51
- // eslint-disable-next-line security/detect-non-literal-fs-filename
51
+
52
52
  await fs.writeFile(path.resolve(rulesetsDir, `./bk/${rule.name}.json`), str);
53
53
  }
54
54
  await formatUncommittedFiles();
@@ -13,7 +13,7 @@ export const backupRulesets = async (fmt = true) => {
13
13
  const rulesetsResult = await getAllRulesets();
14
14
  for (const rule of rulesetsResult) {
15
15
  const content = await getRuleset(rule.id);
16
- // eslint-disable-next-line security/detect-non-literal-fs-filename
16
+
17
17
  await fs.writeFile(path.resolve(backupDir, `${rule.name}.json`), JSON.stringify(Obj.pick(content, rulesetKeysToPick), undefined, 2));
18
18
  }
19
19
  if (fmt) {
@@ -9,7 +9,7 @@ export declare const RulesetPicked: Readonly<{
9
9
  readonly actor_id?: number | null | undefined;
10
10
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
11
11
  } & {
12
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
12
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
13
13
  }>>[] | undefined;
14
14
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
15
15
  readonly node_id?: string | undefined;
@@ -94,6 +94,14 @@ export declare const RulesetPicked: Readonly<{
94
94
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
95
95
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
96
96
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
97
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
98
+ readonly allowed_actors?: readonly Readonly<{
99
+ id: number;
100
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
101
+ }>[] | undefined;
102
+ } & {
103
+ enabled: boolean;
104
+ }>> | undefined;
97
105
  readonly required_reviewers?: readonly Readonly<{
98
106
  file_patterns: readonly string[];
99
107
  minimum_approvals: number;
@@ -242,6 +250,8 @@ export declare const RulesetPicked: Readonly<{
242
250
  type: "required_signatures";
243
251
  }> | Readonly<{
244
252
  type: "non_fast_forward";
253
+ }> | Readonly<{
254
+ type: "license_compliance_scanning";
245
255
  }>)[] | undefined;
246
256
  readonly created_at?: string | undefined;
247
257
  readonly updated_at?: string | undefined;
@@ -258,7 +268,7 @@ export declare const RulesetPicked: Readonly<{
258
268
  readonly actor_id?: number | null | undefined;
259
269
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
260
270
  } & {
261
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
271
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
262
272
  }>>[] | undefined;
263
273
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
264
274
  readonly node_id?: string | undefined;
@@ -343,6 +353,14 @@ export declare const RulesetPicked: Readonly<{
343
353
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
344
354
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
345
355
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
356
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
357
+ readonly allowed_actors?: readonly Readonly<{
358
+ id: number;
359
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
360
+ }>[] | undefined;
361
+ } & {
362
+ enabled: boolean;
363
+ }>> | undefined;
346
364
  readonly required_reviewers?: readonly Readonly<{
347
365
  file_patterns: readonly string[];
348
366
  minimum_approvals: number;
@@ -491,6 +509,8 @@ export declare const RulesetPicked: Readonly<{
491
509
  type: "required_signatures";
492
510
  }> | Readonly<{
493
511
  type: "non_fast_forward";
512
+ }> | Readonly<{
513
+ type: "license_compliance_scanning";
494
514
  }>)[] | undefined;
495
515
  readonly created_at?: string | undefined;
496
516
  readonly updated_at?: string | undefined;
@@ -507,7 +527,7 @@ export declare const RulesetPicked: Readonly<{
507
527
  readonly actor_id?: number | null | undefined;
508
528
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
509
529
  } & {
510
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
530
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
511
531
  }>>[] | undefined;
512
532
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
513
533
  readonly node_id?: string | undefined;
@@ -592,6 +612,14 @@ export declare const RulesetPicked: Readonly<{
592
612
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
593
613
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
594
614
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
615
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
616
+ readonly allowed_actors?: readonly Readonly<{
617
+ id: number;
618
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
619
+ }>[] | undefined;
620
+ } & {
621
+ enabled: boolean;
622
+ }>> | undefined;
595
623
  readonly required_reviewers?: readonly Readonly<{
596
624
  file_patterns: readonly string[];
597
625
  minimum_approvals: number;
@@ -740,6 +768,8 @@ export declare const RulesetPicked: Readonly<{
740
768
  type: "required_signatures";
741
769
  }> | Readonly<{
742
770
  type: "non_fast_forward";
771
+ }> | Readonly<{
772
+ type: "license_compliance_scanning";
743
773
  }>)[] | undefined;
744
774
  readonly created_at?: string | undefined;
745
775
  readonly updated_at?: string | undefined;
@@ -756,7 +786,7 @@ export declare const RulesetPicked: Readonly<{
756
786
  readonly actor_id?: number | null | undefined;
757
787
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
758
788
  } & {
759
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
789
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
760
790
  }>>[] | undefined;
761
791
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
762
792
  readonly node_id?: string | undefined;
@@ -841,6 +871,14 @@ export declare const RulesetPicked: Readonly<{
841
871
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
842
872
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
843
873
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
874
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
875
+ readonly allowed_actors?: readonly Readonly<{
876
+ id: number;
877
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
878
+ }>[] | undefined;
879
+ } & {
880
+ enabled: boolean;
881
+ }>> | undefined;
844
882
  readonly required_reviewers?: readonly Readonly<{
845
883
  file_patterns: readonly string[];
846
884
  minimum_approvals: number;
@@ -989,6 +1027,8 @@ export declare const RulesetPicked: Readonly<{
989
1027
  type: "required_signatures";
990
1028
  }> | Readonly<{
991
1029
  type: "non_fast_forward";
1030
+ }> | Readonly<{
1031
+ type: "license_compliance_scanning";
992
1032
  }>)[] | undefined;
993
1033
  readonly created_at?: string | undefined;
994
1034
  readonly updated_at?: string | undefined;
@@ -1005,7 +1045,7 @@ export declare const RulesetPicked: Readonly<{
1005
1045
  readonly actor_id?: number | null | undefined;
1006
1046
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
1007
1047
  } & {
1008
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
1048
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
1009
1049
  }>>[] | undefined;
1010
1050
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
1011
1051
  readonly node_id?: string | undefined;
@@ -1090,6 +1130,14 @@ export declare const RulesetPicked: Readonly<{
1090
1130
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
1091
1131
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
1092
1132
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
1133
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
1134
+ readonly allowed_actors?: readonly Readonly<{
1135
+ id: number;
1136
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
1137
+ }>[] | undefined;
1138
+ } & {
1139
+ enabled: boolean;
1140
+ }>> | undefined;
1093
1141
  readonly required_reviewers?: readonly Readonly<{
1094
1142
  file_patterns: readonly string[];
1095
1143
  minimum_approvals: number;
@@ -1238,6 +1286,8 @@ export declare const RulesetPicked: Readonly<{
1238
1286
  type: "required_signatures";
1239
1287
  }> | Readonly<{
1240
1288
  type: "non_fast_forward";
1289
+ }> | Readonly<{
1290
+ type: "license_compliance_scanning";
1241
1291
  }>)[] | undefined;
1242
1292
  readonly created_at?: string | undefined;
1243
1293
  readonly updated_at?: string | undefined;
@@ -1254,7 +1304,7 @@ export declare const RulesetPicked: Readonly<{
1254
1304
  readonly actor_id?: number | null | undefined;
1255
1305
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
1256
1306
  } & {
1257
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
1307
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
1258
1308
  }>>[] | undefined;
1259
1309
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
1260
1310
  readonly node_id?: string | undefined;
@@ -1339,6 +1389,14 @@ export declare const RulesetPicked: Readonly<{
1339
1389
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
1340
1390
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
1341
1391
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
1392
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
1393
+ readonly allowed_actors?: readonly Readonly<{
1394
+ id: number;
1395
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
1396
+ }>[] | undefined;
1397
+ } & {
1398
+ enabled: boolean;
1399
+ }>> | undefined;
1342
1400
  readonly required_reviewers?: readonly Readonly<{
1343
1401
  file_patterns: readonly string[];
1344
1402
  minimum_approvals: number;
@@ -1487,6 +1545,8 @@ export declare const RulesetPicked: Readonly<{
1487
1545
  type: "required_signatures";
1488
1546
  }> | Readonly<{
1489
1547
  type: "non_fast_forward";
1548
+ }> | Readonly<{
1549
+ type: "license_compliance_scanning";
1490
1550
  }>)[] | undefined;
1491
1551
  readonly created_at?: string | undefined;
1492
1552
  readonly updated_at?: string | undefined;
@@ -1502,7 +1562,7 @@ export declare const RulesetPicked: Readonly<{
1502
1562
  readonly actor_id?: number | null | undefined;
1503
1563
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
1504
1564
  } & {
1505
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
1565
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
1506
1566
  }>>[] | undefined;
1507
1567
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
1508
1568
  readonly node_id?: string | undefined;
@@ -1587,6 +1647,14 @@ export declare const RulesetPicked: Readonly<{
1587
1647
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
1588
1648
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
1589
1649
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
1650
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
1651
+ readonly allowed_actors?: readonly Readonly<{
1652
+ id: number;
1653
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
1654
+ }>[] | undefined;
1655
+ } & {
1656
+ enabled: boolean;
1657
+ }>> | undefined;
1590
1658
  readonly required_reviewers?: readonly Readonly<{
1591
1659
  file_patterns: readonly string[];
1592
1660
  minimum_approvals: number;
@@ -1735,6 +1803,8 @@ export declare const RulesetPicked: Readonly<{
1735
1803
  type: "required_signatures";
1736
1804
  }> | Readonly<{
1737
1805
  type: "non_fast_forward";
1806
+ }> | Readonly<{
1807
+ type: "license_compliance_scanning";
1738
1808
  }>)[] | undefined;
1739
1809
  readonly created_at?: string | undefined;
1740
1810
  readonly updated_at?: string | undefined;
@@ -1751,7 +1821,7 @@ export declare const RulesetPicked: Readonly<{
1751
1821
  readonly actor_id?: number | null | undefined;
1752
1822
  readonly bypass_mode?: "always" | "exempt" | "pull_request" | undefined;
1753
1823
  } & {
1754
- actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
1824
+ actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "User";
1755
1825
  }>>[] | undefined;
1756
1826
  readonly current_user_can_bypass?: "always" | "exempt" | "never" | "pull_requests_only" | undefined;
1757
1827
  readonly node_id?: string | undefined;
@@ -1836,6 +1906,14 @@ export declare const RulesetPicked: Readonly<{
1836
1906
  }>> | import("ts-type-forge").MergeIntersection<Readonly<{
1837
1907
  readonly parameters?: import("ts-type-forge").MergeIntersection<Readonly<{
1838
1908
  readonly allowed_merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
1909
+ readonly dismissal_restriction?: import("ts-type-forge").MergeIntersection<Readonly<{
1910
+ readonly allowed_actors?: readonly Readonly<{
1911
+ id: number;
1912
+ type: "IntegrationInstallation" | "RepositoryRole" | "Team" | "User";
1913
+ }>[] | undefined;
1914
+ } & {
1915
+ enabled: boolean;
1916
+ }>> | undefined;
1839
1917
  readonly required_reviewers?: readonly Readonly<{
1840
1918
  file_patterns: readonly string[];
1841
1919
  minimum_approvals: number;
@@ -1984,6 +2062,8 @@ export declare const RulesetPicked: Readonly<{
1984
2062
  type: "required_signatures";
1985
2063
  }> | Readonly<{
1986
2064
  type: "non_fast_forward";
2065
+ }> | Readonly<{
2066
+ type: "license_compliance_scanning";
1987
2067
  }>)[] | undefined;
1988
2068
  readonly created_at?: string | undefined;
1989
2069
  readonly updated_at?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../../src/github/ruleset/constants.mts"],"names":[],"mappings":"AAMA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,eAAO,MAAM,iBAAiB,0FAQ2B,CAAC;AAQ1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA+C,CAAC;AAE1E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { RepositoryRuleset, } from 'octokit-safe-types';
2
- import { expectType } from 'ts-data-forge';
2
+
3
3
  import * as t from 'ts-fortress';
4
4
  export const rulesetKeysToPick = [
5
5
  'id',
@@ -10,7 +10,7 @@ export const rulesetKeysToPick = [
10
10
  'conditions',
11
11
  'rules',
12
12
  ];
13
- expectType('=');
14
- expectType('=');
13
+
14
+
15
15
  export const RulesetPicked = t.pick(RepositoryRuleset, rulesetKeysToPick);
16
16
  //# sourceMappingURL=constants.mjs.map
@@ -7,14 +7,14 @@ import { RulesetPicked } from './constants.mjs';
7
7
  export const readRulesetFiles = async () => readFilesIn(rulesetsDir);
8
8
  export const readRulesetBackupFiles = async () => readFilesIn(path.resolve(rulesetsDir, './bk'));
9
9
  const readFilesIn = async (dir) => {
10
- // eslint-disable-next-line security/detect-non-literal-fs-filename
10
+
11
11
  const files = await fs.readdir(dir, {
12
12
  withFileTypes: true,
13
13
  });
14
14
  const rulesetFileContents = await Promise.all(files
15
15
  .filter((d) => d.isFile())
16
16
  .map((d) =>
17
- // eslint-disable-next-line security/detect-non-literal-fs-filename
17
+
18
18
  fs.readFile(path.resolve(dir, d.name), {
19
19
  encoding: 'utf8',
20
20
  })));
@@ -1,7 +1,7 @@
1
1
  import { octokitHeaders, OWNER, REPO } from '../../constants.mjs';
2
2
  import { octokit } from '../../octokit.mjs';
3
3
  export const createRepoVariable = async ({ name, value, }) => {
4
- // https://docs.github.com/ja/rest/actions/variables?apiVersion=2022-11-28#create-a-repository-variable
4
+
5
5
  await octokit.request('POST /repos/{owner}/{repo}/actions/variables', {
6
6
  owner: OWNER,
7
7
  repo: REPO,
@@ -1,7 +1,7 @@
1
1
  import { octokitHeaders, OWNER, REPO } from '../../constants.mjs';
2
2
  import { octokit } from '../../octokit.mjs';
3
3
  export const listRepoVariables = async () => {
4
- // https://docs.github.com/ja/rest/actions/variables?apiVersion=2022-11-28#list-repository-variables
4
+
5
5
  const result = await octokit.request('GET /repos/{owner}/{repo}/actions/variables', {
6
6
  owner: OWNER,
7
7
  repo: REPO,
@@ -1,7 +1,7 @@
1
1
  import { octokitHeaders, OWNER, REPO } from '../../constants.mjs';
2
2
  import { octokit } from '../../octokit.mjs';
3
3
  export const updateRepoVariable = async ({ name, value, }) => {
4
- // https://docs.github.com/en/rest/actions/variables#update-a-repository-variable
4
+
5
5
  await octokit.request('PATCH /repos/{owner}/{repo}/actions/variables/{name}', {
6
6
  owner: OWNER,
7
7
  repo: REPO,
@@ -1 +1 @@
1
- {"version":3,"file":"apply.d.mts","sourceRoot":"","sources":["../../../src/github/variables/apply.mts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AAQvB,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,IAAI,CA6BnD,CAAC"}
1
+ {"version":3,"file":"apply.d.mts","sourceRoot":"","sources":["../../../src/github/variables/apply.mts"],"names":[],"mappings":";AAGA,OAAO,eAAe,CAAC;AAQvB,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,IAAI,CA6BnD,CAAC"}
@@ -1,20 +1,21 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  import 'dotenv/config';
3
4
  import { isDirectlyExecuted } from 'ts-repo-utils';
4
5
  import { createRepoVariable, listRepoVariables, updateRepoVariable, } from './api/index.mjs';
5
6
  export const applyVariables = async () => {
6
7
  const variables = [
7
8
  {
8
- // noshiro-repo-settings-bot (App ID: 4476573)
9
- // Administration を含む強い権限を持つ。設定の backup / apply 専用。
9
+
10
+
10
11
  name: 'REPO_SETTINGS_BOT_CLIENT_ID',
11
12
  value: 'Iv23ctr4Lq9H3wOYRQrD',
12
13
  },
13
14
  {
14
- // noshiro-repo-automation-bot (App ID: 4478721)
15
- // Contents / Pull requests / Issues 権限。PR を作る自動化( pnpm-update )と
16
- // release で共用する。実際に使う権限は各ワークフローの permission-* 入力で
17
- // 絞る。
15
+
16
+
17
+
18
+
18
19
  name: 'REPO_AUTOMATION_BOT_CLIENT_ID',
19
20
  value: 'Iv23lilpiDh0twq2PErv',
20
21
  },
@@ -1 +1 @@
1
- {"version":3,"file":"apply.mjs","sourceRoot":"","sources":["../../../src/github/variables/apply.mts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,IAAmB,EAAE;IACtD,MAAM,SAAS,GAAG;QAChB;YACE,8CAA8C;YAC9C,mDAAmD;YACnD,IAAI,EAAE,6BAA6B;YACnC,KAAK,EAAE,sBAAsB;SAC9B;QACD;YACE,gDAAgD;YAChD,iEAAiE;YACjE,kDAAkD;YAClD,MAAM;YACN,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,sBAAsB;SAC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,IAAI,GAAG,CACjD,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CACrC,CAAC;IAEF,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEhD,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC,CAAC;AAEF,IAAI,kBAAkB,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACxC,MAAM,cAAc,EAAE,CAAC;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-settings-as-code",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "github",
@@ -25,33 +25,34 @@
25
25
  "LICENSE"
26
26
  ],
27
27
  "dependencies": {
28
- "@octokit/core": "^7.0.7",
28
+ "@octokit/core": "^7.0.8",
29
+ "dedent": "^1.7.2",
29
30
  "dotenv": "^17.4.2",
30
- "octokit-safe-types": "^1.2.25",
31
- "ts-data-forge": "^14.2.1",
32
- "ts-repo-utils": "^10.2.0",
33
- "ts-type-forge": "^9.2.1",
34
- "ts-fortress": "^12.0.1"
31
+ "octokit-safe-types": "^1.2.28",
32
+ "ts-data-forge": "^14.6.3",
33
+ "ts-fortress": "^12.1.1",
34
+ "ts-repo-utils": "^10.6.0",
35
+ "ts-type-forge": "^9.2.2"
35
36
  },
36
37
  "devDependencies": {
37
- "@types/node": "26.2.0",
38
- "@vitest/coverage-v8": "4.1.10",
39
- "@vitest/ui": "4.1.10",
40
- "cspell": "10.0.1",
41
- "eslint": "10.8.0",
38
+ "@types/node": "26.4.1",
39
+ "@vitest/coverage-v8": "4.1.11",
40
+ "@vitest/ui": "4.1.11",
41
+ "cspell": "10.1.1",
42
+ "eslint": "10.9.1",
43
+ "eslint-config-typed": "5.11.2",
44
+ "eslint-plugin-ts-data-forge": "0.7.0",
45
+ "eslint-plugin-ts-fortress": "1.2.0",
46
+ "eslint-plugin-ts-type-forge": "0.8.1",
42
47
  "jiti": "2.7.0",
43
48
  "npm-run-all2": "9.0.3",
44
49
  "prettier": "3.9.6",
45
50
  "prettier-plugin-organize-imports": "4.3.0",
46
51
  "prettier-plugin-packagejson": "3.0.2",
47
- "tsx": "4.23.4",
52
+ "tsx": "4.23.12",
48
53
  "typescript": "6.0.3",
49
54
  "typescript-native": "npm:typescript@7.0.2",
50
- "vitest": "4.1.10",
51
- "eslint-plugin-ts-data-forge": "0.4.5",
52
- "eslint-config-typed": "5.8.6",
53
- "eslint-plugin-ts-fortress": "1.0.1",
54
- "eslint-plugin-ts-type-forge": "0.6.3"
55
+ "vitest": "4.1.11"
55
56
  },
56
57
  "engines": {
57
58
  "node": ">=22.22.2",
@@ -69,15 +70,9 @@
69
70
  "build:min": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ./scripts/cmd/build.mts --skip-check",
70
71
  "check:ext": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ./scripts/cmd/check-ext.mts",
71
72
  "check-all": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ./scripts/cmd/check-all.mts",
72
- "codemod": "run-s codemod:uncommitted:as-const fmt codemod:uncommitted:readonly fmt",
73
- "codemod:diff": "run-s codemod:diff:as-const fmt codemod:diff:readonly fmt",
74
- "codemod:diff:as-const": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/append-as-const.mts --diff-from origin/main '{src,scripts,samples}/**/*.mts'",
75
- "codemod:diff:readonly": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/convert-to-readonly.mts --diff-from origin/main '{src,scripts,samples}/**/*.mts'",
76
- "codemod:full": "run-s codemod:full:as-const fmt codemod:full:readonly fmt",
77
- "codemod:full:as-const": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/append-as-const.mts '{src,scripts,samples}/**/*.mts'",
78
- "codemod:full:readonly": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/convert-to-readonly.mts '{src,scripts,samples}/**/*.mts'",
79
- "codemod:uncommitted:as-const": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/append-as-const.mts --uncommitted '{src,scripts,samples}/**/*.mts'",
80
- "codemod:uncommitted:readonly": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/convert-to-readonly.mts --uncommitted '{src,scripts,samples}/**/*.mts'",
73
+ "codemod": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/ts-codemod.mts --uncommitted --transformer append-as-const --transformer convert-to-readonly '{src,scripts,samples}/**/*.mts' && pnpm run fmt",
74
+ "codemod:diff": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/ts-codemod.mts --diff-from origin/main --transformer append-as-const --transformer convert-to-readonly '{src,scripts,samples}/**/*.mts' && pnpm run fmt",
75
+ "codemod:full": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-codemod-cli/src/cmd/ts-codemod.mts --transformer append-as-const --transformer convert-to-readonly '{src,scripts,samples}/**/*.mts' && pnpm run fmt",
81
76
  "cspell": "cspell \"**\" --gitignore --gitignore-root ../../ --no-progress",
82
77
  "doc": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ./scripts/cmd/gen-docs.mts",
83
78
  "fmt": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-repo-utils/src/cmd/format-uncommitted.mts --cwd .",