Skip to content

Commit 256143e

Browse files
1 parent 4f3e786 commit 256143e

File tree

1 file changed

+1
-60
lines changed

1 file changed

+1
-60
lines changed

.github/workflows/contributors.yml

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,7 @@ jobs:
66
with:
77
fetch-depth: 0
88
- uses: ./.github/actions/prepare
9-
- uses: JoshuaKGoldberg/[email protected]
10-
- name: Delete branch protection on main
11-
uses: actions/[email protected]
12-
with:
13-
github-token: ${{ secrets.ACCESS_TOKEN }}
14-
script: |
15-
try {
16-
await github.request(
17-
`DELETE /repos/JoshuaKGoldberg/template-typescript-node-package/branches/main/protection`,
18-
);
19-
} catch (error) {
20-
if (!error.message?.includes?.("Branch not protected")) {
21-
throw error;
22-
}
23-
}
24-
- uses: stefanzweifel/git-auto-commit-action@v4
25-
with:
26-
commit_message: Fill in all-contributors
27-
- if: always()
28-
name: Recreate branch protection on main
29-
uses: actions/[email protected]
30-
with:
31-
github-token: ${{ secrets.ACCESS_TOKEN }}
32-
# Note: keep this inline script in sync with script/setup.js!
33-
# Todo: it would be nice to not have two sources of truth...
34-
# https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues/145
35-
script: |
36-
github.request(
37-
`PUT /repos/JoshuaKGoldberg/template-typescript-node-package/branches/main/protection`,
38-
{
39-
allow_deletions: false,
40-
allow_force_pushes: true,
41-
allow_fork_pushes: false,
42-
allow_fork_syncing: true,
43-
block_creations: false,
44-
branch: "main",
45-
enforce_admins: false,
46-
owner: "JoshuaKGoldberg",
47-
repo: "template-typescript-node-package",
48-
required_conversation_resolution: true,
49-
required_linear_history: false,
50-
required_pull_request_reviews: null,
51-
required_status_checks: {
52-
checks: [
53-
{ context: "build" },
54-
{ context: "compliance" },
55-
{ context: "knip" },
56-
{ context: "lint" },
57-
{ context: "markdown" },
58-
{ context: "package" },
59-
{ context: "packages" },
60-
{ context: "prettier" },
61-
{ context: "spelling" },
62-
{ context: "test" },
63-
],
64-
strict: false,
65-
},
66-
restrictions: null,
67-
}
68-
);
9+
- uses: JoshuaKGoldberg/[email protected]
6910

7011
name: Contributors
7112

0 commit comments

Comments
 (0)