Skip to content

Commit d215c75

Browse files
authored
feat: add maintainer docs (#12)
closes #5
1 parent e126207 commit d215c75

8 files changed

+3131
-2958
lines changed

docs/contributing/maintainers.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Maintainers Guide
2+
3+
## How do I Join the Maintainers Team?
4+
5+
1. Sign up for [opensauced.pizza](https://opensauced.pizza)
6+
1. Join [discord](https://discord.gg/gZMKK5q).
7+
1. Prove your pizza worth!
8+
9+
## Requirements
10+
11+
For the purpose of this tutorial, our target demo repository will be called `open-sauced/npx-check-engines`.
12+
13+
The steps described here mirror [open-sauced/check-engines](https://github.com/open-sauced/check-engines).
14+
15+
The octoherd scripts assume you have exported a programatic token similar to:
16+
17+
```shell
18+
export GH_TOKEN="ghp_Q8TZZT9ypgqw3EeABoCWPcwZBHpjZJ9hI42n"
19+
```
20+
21+
## Creating a new repo
22+
23+
Don't spend too much time thinking of a name or a catchy description, just set license to MIT and rocket jump!
24+
25+
![create a new repository](../../static/img/contributing-maintainers-create-repository.png)
26+
27+
## Syncing settings with opensauced.pizza
28+
29+
Squashing pull requests is the minimum requirement but the other options are quite useful at various stages of development.
30+
31+
![minimum merge settings](../../static/img/contributing-maintainers-merge-settings.png)
32+
33+
Copy most of the relevant settings with:
34+
35+
```shell
36+
npx octoherd-script-sync-repo-settings \
37+
--template "open-sauced/open-sauced" \
38+
-T $GH_TOKEN \
39+
-R "open-sauced/check-engines"
40+
```
41+
42+
Otherwise you can disable "Projects" and "Wikis" for the selected repository as we are handling them on a larger scale.
43+
44+
## Syncing labels with opensauced.pizza
45+
46+
The default labels have some missing emojis. Copy the rest with:
47+
48+
```shell
49+
npx octoherd-script-copy-labels \
50+
--template "open-sauced/open-sauced" \
51+
-T $GH_TOKEN \
52+
-R "open-sauced/check-engines"
53+
```
54+
55+
Then go back to your repository and delete:
56+
- documentation
57+
- 👀 needs-triage (green background one)
58+
- other potential duplicates if the above race condition is different
59+
60+
## Syncing branch protections with opensauced.pizza
61+
62+
This topic is more complex but in a sense tap the main branch and enable
63+
everything except "Restrict who can dismiss pull request reviews" and "Restrict who can push to matching branches" in the first section.
64+
65+
![maximum merge protections](../../static/img/contributing-maintainers-merge-protections.png)
66+
67+
The "Rules applied to everyone including administrators" is more on an unused override.
68+
69+
Most of the time this process is super manual but in the limited cases where we need this run:
70+
71+
```shell
72+
npx @octoherd/script-sync-branch-protections \
73+
--template "open-sauced/open-sauced" \
74+
-T $GH_TOKEN \
75+
-R "open-sauced/check-engines"
76+
```
77+
78+
## Setting up workflows
79+
80+
Most collaborative projects require [compliance flows](https://github.com/open-sauced/open-sauced/blob/main/.github/workflows/compliance.yml) powered by [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) and [actions/first-interaction](https://github.com/actions/first-interaction).
81+
82+
Pull requests require [triage](https://github.com/open-sauced/open-sauced/blob/main/.github/workflows/triage.yml) powered by [bdougie/take-action](https://github.com/bdougie/take-action).
83+
84+
Most `node` projects will require [release automation](https://github.com/open-sauced/open-sauced/blob/main/.github/workflows/release.yml) powered by [@open-sauced/semantic-release-conventional-config](https://github.com/open-sauced/semantic-release-conventional-config).
85+
86+
Other [development workflows](https://github.com/open-sauced/open-sauced/tree/main/.github/workflows) are less common and opinionated towards decentralised collaboration. Use these as example backbones for your new repository.
87+
88+
## Setting up environments and secrets
89+
90+
As you may have noticed in the previous step or in the actions visualisations, the release workflows enable named environments.
91+
92+
These have to be manually set up, along with their secrets and branch protections.
93+
94+
![create environment](../../static/img/contributing-maintainers-env.png)
95+
96+
If using `npm` or `ghcr` it is likely you will add a couple variables here.

npm-shrinkwrap.json

Lines changed: 3028 additions & 2952 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@
1616
"semantic-release": "semantic-release"
1717
},
1818
"dependencies": {
19-
"@docusaurus/core": "2.0.0-beta.4",
20-
"@docusaurus/preset-classic": "2.0.0-beta.4",
21-
"@docusaurus/theme-search-algolia": "^2.0.0-beta.4",
19+
"@docusaurus/core": "2.0.0-beta.5",
20+
"@docusaurus/preset-classic": "2.0.0-beta.5",
21+
"@docusaurus/theme-search-algolia": "^2.0.0-beta.5",
2222
"@mdx-js/react": "^1.6.22",
2323
"prism-react-renderer": "^1.2.1",
2424
"react": "^17.0.2",
2525
"react-dom": "^17.0.2"
2626
},
2727
"devDependencies": {
28-
"@open-sauced/semantic-release-conventional-config": "^1.1.0",
28+
"@open-sauced/semantic-release-conventional-config": "^1.2.0",
2929
"@svgr/webpack": "^5.5.0",
3030
"clsx": "^1.1.1",
3131
"commitizen": "^4.2.4",
3232
"cz-conventional-changelog": "^3.3.0",
3333
"file-loader": "^6.2.0",
34-
"semantic-release": "^17.4.4",
34+
"semantic-release": "^17.4.7",
3535
"url-loader": "^4.1.1"
3636
},
3737
"browserslist": {

sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ module.exports = {
2121
'contributing/code-of-conduct',
2222
'contributing/triage-guide',
2323
'contributing/resolve-merge-conflicts',
24-
'contributing/fetching-data-from-github'
24+
'contributing/fetching-data-from-github',
25+
'contributing/maintainers'
2526
],
2627
},
2728
{
304 KB
Loading
258 KB
Loading
381 KB
Loading
224 KB
Loading

0 commit comments

Comments
 (0)