Skip to content

Commit 6937fa3

Browse files
TMHSDigitalclaude
andauthored
docs(contributing): open with a five-minute first contribution (#434)
CONTRIBUTING made a newcomer read about 70 lines of branch-protection internals (rulesets, why required checks cannot be enforced on a user-owned repo) before any easy task. It now opens with "Your first contribution": fix a skill or rule with evidence, improve a snippet, or take a good-first-issue, then fork / run_all / PR with a DCO sign-off. The branch-protection internals move unchanged to AGENTS.md (maintainer and agent policy); CONTRIBUTING keeps a two-line pointer. Refs #372 Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7ca0fdc commit 6937fa3

2 files changed

Lines changed: 91 additions & 67 deletions

File tree

‎AGENTS.md‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,76 @@ When information conflicts, prefer the docs over Stack Overflow or older
226226
add-on source. The 2.x to 4.x to 5.x churn around Actions, Extensions, and
227227
property handling has invalidated a lot of community content.
228228

229+
## Branch protection on `main`
230+
231+
`main` carries the repository ruleset **`main-integrity`** (branch target
232+
`~DEFAULT_BRANCH`, enforcement `active`, **no bypass actors**). Three rules:
233+
234+
- `deletion` — the branch cannot be deleted
235+
- `non_fast_forward` — force-push is refused for every actor, owner included
236+
- `required_linear_history` — merge commits are refused, matching the
237+
squash-merge convention
238+
239+
Verify with `gh api repos/TMHSDigital/Blender-Developer-Tools/rules/branches/main`.
240+
The classic `/branches/main/protection` endpoint returns 404 by design: this
241+
is a ruleset, not classic branch protection, and the two are separate APIs.
242+
243+
**Required status checks are deliberately absent, and a pull request is not
244+
required.** A PR whose smoke jobs are red can still be merged. Merge-on-green
245+
is convention here, not enforcement — see
246+
[#192](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/192).
247+
248+
The reason is structural. A required-status-check rule blocks *direct pushes*
249+
to the branch for any actor without a bypass, not only PR merges.
250+
`release.yml` pushes its version-bump commit straight to `main` as
251+
`github-actions[bot]` using `secrets.GITHUB_TOKEN`, so the rule would break
252+
every release. On a user-owned repository GitHub rejects the only bypass
253+
actor that would cover it:
254+
255+
```
256+
422 Validation Failed
257+
"Actor GitHub Actions integration must be part of the ruleset source or owner organization"
258+
```
259+
260+
A role-based bypass does not substitute: `RepositoryRole:Write` covers the
261+
repository owner (admin inherits write) and never covers the bot — backwards
262+
from what is needed, and it would re-open admin merges of red PRs, which is
263+
the hole the protection exists to close.
264+
265+
The three rules that *are* active were chosen because a fast-forward,
266+
single-parent push does not violate any of them, so `release.yml` keeps
267+
working untouched: the bump commit lands, the tag push proceeds (a branch
268+
ruleset does not target tags), the GitHub release is cut, and the
269+
`gh workflow run pages.yml --ref main` dispatch fires.
270+
271+
### If required checks become enforceable
272+
273+
Should the repository move to an organization, or `release.yml` stop pushing
274+
to `main`, these are the checks that run unconditionally on every PR and are
275+
therefore the required-check set:
276+
277+
- `Blender 4.5 smoke`
278+
- `Blender 5.2 smoke`
279+
- `Ecosystem drift check`
280+
- `Validate content counts`
281+
- `Validate plugin manifest`
282+
- `Validate smoke harness protocol`
283+
- `Validate structure and frontmatter`
284+
285+
Three checks that appear on PRs are deliberately **excluded**:
286+
287+
- **`Blender 5.1 smoke` is label-gated.** It only runs when `needs-5.1` is
288+
applied. As a required check it would block every unlabeled PR forever on
289+
a job that never reports.
290+
- **`Auto-label by path`** — `label-sync.yml` triggers on `opened` and
291+
`synchronize` only. A reopened PR with no new push never reports it.
292+
- **`Resolve smoke matrix`** — skipped on label events other than
293+
`needs-5.1`, and it is plumbing rather than a gate; its failure already
294+
blocks the two smoke jobs that depend on it.
295+
296+
The two `Socket Security` checks come from a third-party GitHub App. An
297+
outage or an uninstall would deadlock merges, so they are advisory.
298+
229299
## License
230300

231301
CC-BY-NC-ND-4.0 (see `LICENSE`), except `snippets/` and `templates/`, which are MIT (see the `LICENSE` file in each directory) so the documented copy-and-adapt use is lawful.

‎CONTRIBUTING.md‎

Lines changed: 21 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
Thanks for helping improve this repository. This document describes how to set up locally, extend skills, rules, snippets, templates, examples, and showcase pieces, and submit changes.
44

5+
## Your first contribution
6+
7+
The fastest useful contributions are small and need no Blender run:
8+
9+
- **Fix a skill or rule.** If a skill tells an agent something that is wrong
10+
for Blender 5.2 or 4.5, edit `skills/<name>/SKILL.md` or `rules/<name>.mdc`,
11+
say in the PR how you know (a docs link, or a short `blender --background`
12+
script and its output), and run the checks below.
13+
- **Improve a snippet.** `snippets/*.py` are short standalone patterns (MIT).
14+
- **Pick up a starter issue:** issues labelled
15+
[`good first issue`](https://github.com/TMHSDigital/Blender-Developer-Tools/labels/good%20first%20issue).
16+
17+
Then: fork, branch, `pip install -r requirements-dev.txt`,
18+
`python tests/run_all.py`, and open a PR with a DCO sign-off (`git commit -s`;
19+
see the end of this file). Examples and showcase pieces have more gates
20+
(falsifiers, exit-code tables, renders); read their sections first.
21+
522
## Getting Started
623

724
1. **Fork** the repository on GitHub.
@@ -159,73 +176,10 @@ Default PR smoke is Blender 5.2 and 4.5 (`.github/workflows/blender-smoke.yml`).
159176

160177
## Branch protection on `main`
161178

162-
`main` carries the repository ruleset **`main-integrity`** (branch target
163-
`~DEFAULT_BRANCH`, enforcement `active`, **no bypass actors**). Three rules:
164-
165-
- `deletion` — the branch cannot be deleted
166-
- `non_fast_forward` — force-push is refused for every actor, owner included
167-
- `required_linear_history` — merge commits are refused, matching the
168-
squash-merge convention
169-
170-
Verify with `gh api repos/TMHSDigital/Blender-Developer-Tools/rules/branches/main`.
171-
The classic `/branches/main/protection` endpoint returns 404 by design: this
172-
is a ruleset, not classic branch protection, and the two are separate APIs.
173-
174-
**Required status checks are deliberately absent, and a pull request is not
175-
required.** A PR whose smoke jobs are red can still be merged. Merge-on-green
176-
is convention here, not enforcement — see
177-
[#192](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/192).
178-
179-
The reason is structural. A required-status-check rule blocks *direct pushes*
180-
to the branch for any actor without a bypass, not only PR merges.
181-
`release.yml` pushes its version-bump commit straight to `main` as
182-
`github-actions[bot]` using `secrets.GITHUB_TOKEN`, so the rule would break
183-
every release. On a user-owned repository GitHub rejects the only bypass
184-
actor that would cover it:
185-
186-
```
187-
422 Validation Failed
188-
"Actor GitHub Actions integration must be part of the ruleset source or owner organization"
189-
```
190-
191-
A role-based bypass does not substitute: `RepositoryRole:Write` covers the
192-
repository owner (admin inherits write) and never covers the bot — backwards
193-
from what is needed, and it would re-open admin merges of red PRs, which is
194-
the hole the protection exists to close.
195-
196-
The three rules that *are* active were chosen because a fast-forward,
197-
single-parent push does not violate any of them, so `release.yml` keeps
198-
working untouched: the bump commit lands, the tag push proceeds (a branch
199-
ruleset does not target tags), the GitHub release is cut, and the
200-
`gh workflow run pages.yml --ref main` dispatch fires.
201-
202-
### If required checks become enforceable
203-
204-
Should the repository move to an organization, or `release.yml` stop pushing
205-
to `main`, these are the checks that run unconditionally on every PR and are
206-
therefore the required-check set:
207-
208-
- `Blender 4.5 smoke`
209-
- `Blender 5.2 smoke`
210-
- `Ecosystem drift check`
211-
- `Validate content counts`
212-
- `Validate plugin manifest`
213-
- `Validate smoke harness protocol`
214-
- `Validate structure and frontmatter`
215-
216-
Three checks that appear on PRs are deliberately **excluded**:
217-
218-
- **`Blender 5.1 smoke` is label-gated.** It only runs when `needs-5.1` is
219-
applied. As a required check it would block every unlabeled PR forever on
220-
a job that never reports.
221-
- **`Auto-label by path`** — `label-sync.yml` triggers on `opened` and
222-
`synchronize` only. A reopened PR with no new push never reports it.
223-
- **`Resolve smoke matrix`** — skipped on label events other than
224-
`needs-5.1`, and it is plumbing rather than a gate; its failure already
225-
blocks the two smoke jobs that depend on it.
226-
227-
The two `Socket Security` checks come from a third-party GitHub App. An
228-
outage or an uninstall would deadlock merges, so they are advisory.
179+
What `main` enforces today, why required status checks cannot be added on a
180+
user-owned repository, and what changes if that becomes possible: see
181+
[AGENTS.md § Branch protection on `main`](AGENTS.md#branch-protection-on-main).
182+
Contributors only need to know that PRs merge on green CI.
229183

230184
## Falsifiers must fail the budget they target
231185

0 commit comments

Comments
 (0)