diff --git a/AGENTS.md b/AGENTS.md index 34b52fbd0..60c985440 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,6 +12,7 @@ * In tests, use `qt` matchers (e.g. `b.Assert(err, qt.ErrorMatches, ...)`) instead of raw `if`/`t.Fatal` checks. * In tests, always use the latest Hugo specification, e.g. for layouts, it's `layouts/page.html` and not `layouts/_default/single.html`, `layouts/list.html` and not `layouts/_default/list.html` * Never name tests `TestIssue1234`; always give the test function a descriptive name, e.g. `TestDisablePathToLower`, and add any issue reference as a Go doc function comment, e.g. `// See issue 1234.`. +* If you borrow a test case (e.g. from the issue), that test's author must be added as co-author in the commit. * If you're a security researcher, read @SECURITY.md carefully. * Brevity is good. This applies to code, comments and commit messages. Don't write a novel. * Use `./check.sh ./somepackage/...` when iterating. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5a142ed2..13db2dc56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,6 +72,7 @@ To make the contribution process as seamless as possible, we ask for the followi * When you’re ready to create a pull request, be sure to: * Sign the [CLA](https://cla-assistant.io/gohugoio/hugo). * Have test cases for the new code. If you have questions about how to do this, please ask in your pull request. + * If you borrow a test case (e.g. from the issue), that test's author must be added as [co-author](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors) in the commit. * Run `go fmt`. * Add documentation if you are adding new features or changing functionality. The docs site lives in `/docs`. * Squash your commits into a single commit. `git rebase -i`. It’s okay to force update your pull request with `git push -f`.