generated from JoshuaKGoldberg/create-typescript-app
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
61 lines (59 loc) 路 2.25 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
description: Delete branch protection on main
inputs:
ACCESS_TOKEN:
required: true
name: Protect main
runs:
steps:
- name: Recreate branch protection on main
uses: actions/github-script@v7.0.0
with:
github-token: ${{ inputs.ACCESS_TOKEN }}
# Note: keep this inline script in sync with script/setup.js!
# Todo: it would be nice to not have two sources of truth...
# https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues/145
script: |
github.request(
`PUT /repos/JoshuaKGoldberg/ts-api-utils/branches/main/protection`,
{
allow_deletions: false,
allow_force_pushes: true,
allow_fork_pushes: false,
allow_fork_syncing: true,
block_creations: false,
branch: "main",
enforce_admins: false,
owner: "JoshuaKGoldberg",
repo: "ts-api-utils",
required_conversation_resolution: true,
required_linear_history: false,
required_pull_request_reviews: null,
required_status_checks: {
checks: [
{ context: "build (16.14.0)" },
{ context: "build (18.x)" },
{ context: "compliance" },
{ context: "docs" },
{ context: "knip" },
{ context: "lint" },
{ context: "markdown" },
{ context: "package" },
{ context: "packages" },
{ context: "prettier" },
{ context: "spelling" },
{ context: "test (16.14.0, 4.3.5)" },
{ context: "test (16.14.0, 4.6.4)" },
{ context: "test (16.14.0, 4.9.5)" },
{ context: "test (16.14.0, latest)" },
{ context: "test (18.x, 4.3.5)" },
{ context: "test (18.x, 4.6.4)" },
{ context: "test (18.x, 4.9.5)" },
{ context: "test (18.x, latest)" },
{ context: "type-check" },
],
strict: false,
},
restrictions: null,
}
);
using: composite