|
2 | 2 |
|
3 | 3 | 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. |
4 | 4 |
|
| 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 | + |
5 | 22 | ## Getting Started |
6 | 23 |
|
7 | 24 | 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`). |
159 | 176 |
|
160 | 177 | ## Branch protection on `main` |
161 | 178 |
|
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. |
229 | 183 |
|
230 | 184 | ## Falsifiers must fail the budget they target |
231 | 185 |
|
|
0 commit comments