From 4f1e2db14df7d699e5f50849dd6db5e4efc566c3 Mon Sep 17 00:00:00 2001 From: Leon Krix <98028536+leonkrix@users.noreply.github.com> Date: Tue, 27 Oct 2026 23:55:35 +0100 Subject: [PATCH] docs: how a change gets in, and a code owner --- .github/CODEOWNERS | 2 ++ CONTRIBUTING.md | 11 +++++++++++ README.md | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..4c43e18 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Every change is looked at by the maintainer. GitHub asks this person for a review automatically. +* @leonkrix diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 090b60c..828f149 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,17 @@ Thank you for looking at this. Bug reports, false positives and ideas are as welcome as code. +## How a change gets in + +1. **Issue first, for anything bigger than a small fix.** A bug with a reproduction, an idea for an option or a rule: open an [issue](https://github.com/leonkrix/playwright-layout-guard/issues) and say what you test. It saves you from writing code that does not fit. +2. **Small fixes and documentation: straight to a pull request.** A typo, a wrong sentence in the README, a clear bug with a test. +3. **Fork, branch, pull request.** Fork the repository, make a branch, and open a pull request against `main`. You do not need write access, and nobody has to add you. +4. **The CI runs.** The first time you contribute, a maintainer has to approve the run (GitHub asks for that for every new contributor, because workflows run code). The check `CI passed` has to be green. +5. **The maintainer reviews and merges.** Only a maintainer can merge. Pull requests are squash-merged, so the title of the pull request becomes the commit message: write it as a Conventional Commit. +6. **The change is released** with the next version. A pull request that users can see carries a changeset (see below); the maintainer collects them into a release. + +Nobody merges their own pull request without the CI. While there is one maintainer, the maintainer's own pull requests need no second approval; that changes as soon as there is a second maintainer. + ## Reporting a false positive The most useful report is a page where the guard fails a test but nothing visibly jumps (or the other way round). Please include: diff --git a/README.md b/README.md index 251a7be..31a9283 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/leonkrix/playwright-layout-guard/badge)](https://scorecard.dev/viewer/?uri=github.com/leonkrix/playwright-layout-guard) -**A Playwright fixture that fails a test when something on the page moves.** Any element that changes its place or size after the page has loaded — a banner that pushes the content down, an image without a size, a button that jumps when it is pressed — fails the test, and the message names the element and says how far it moved. It works in Chromium, Firefox and WebKit. +**A Playwright fixture that fails a test when something on the page moves.** Any element that changes its place or size after the page has loaded (a banner that pushes the content down, an image without a size, a button that jumps when it is pressed) fails the test, and the message names the element and says how far it moved. It works in Chromium, Firefox and WebKit. ```text Error: Something on the page moved or changed its size (1 shift):