diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..2e42dc9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,21 @@ +--- +name: Bug report +about: Something in json-logging doesn't work as documented +labels: bug, needs triage +--- + +## What happened + +## What you expected + +## Minimal reproduction + + + +## Versions + +- json-logging: +- Python: +- Framework and version (FastAPI, Flask, Quart, Sanic, Connexion): + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..a5380f8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question + url: https://github.com/bobbui/json-logging-python/discussions + about: Usage questions are easier to answer in Discussions. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..1efdadb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest a new capability or a change in behavior +labels: enhancement, needs triage +--- + +## The problem + + + +## What you'd like + + + +## Alternatives you've tried + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..644855c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +Fixes # + + + +## What changed and why + +## How I tested it + +- [ ] The linked issue is labeled `ready` +- [ ] Tests cover the change +- [ ] CHANGELOG.md has an entry under Unreleased, if users will notice the change diff --git a/AGENTS.md b/AGENTS.md index 0be1019..07a3239 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -78,6 +78,9 @@ possible. Use reasonable deadlines and always reap child processes. ## Pull requests and reviews +- Do not open a PR unless it links an issue a maintainer has labeled `ready`. + If the issue is missing or still `needs triage`, stop and leave it for triage. + See [CONTRIBUTING.md](CONTRIBUTING.md). - Read the existing issue, relevant code, and current PR discussion before proposing a fix; check for overlapping open PRs. - Include a concise problem statement, root cause, focused patch, regression diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5ec0dfc --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to json-logging + +Thx for wanting to help. Please read this before you open a pull request. + +## Issues come first + +Every pull request needs a linked issue that a maintainer has triaged. An issue +is triaged once a maintainer has added the `ready` label to it. Until then it +carries the `needs triage` label. + +The flow is: + +1. Search open and closed issues for the same problem or idea. +2. Open a new issue from one of the templates, with a minimal reproduction for + bugs or a concrete use case for features. +3. Wait for a maintainer to triage it. They may ask questions, mark it as a + duplicate, decline it, or label it `ready`. +4. Once it's `ready`, comment that you're picking it up and open a PR that says + `Fixes #` in its description. + +Pull requests without a linked `ready` issue may be closed without review, even +if the change looks fine. This keeps review time for changes the project has +agreed it wants, and it saves you from writing code that ends up declined. + +A few changes don't need an issue: typo and broken link fixes, Dependabot +updates, and release PRs opened by maintainers. + +## Before you open the PR + +- Keep it to one bug or feature. +- Add tests for the behavior you changed. +- Add a changelog entry under `Unreleased` in `CHANGELOG.md` when users will + notice the change. +- Run the checks described in [MAINTENANCE.md](MAINTENANCE.md#development-and-ci). + +If you use an AI coding agent, point it at [AGENTS.md](AGENTS.md). The same +triage rule applies. diff --git a/MAINTENANCE.md b/MAINTENANCE.md index f92e377..e45cab2 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -15,6 +15,9 @@ agents should follow [AGENTS.md](AGENTS.md). published package when the distinction matters. 5. Link related issues and explain workarounds. Do not close unresolved behavior without clear evidence or the appropriate project decision. +6. New issues from the templates start with `needs triage`. When an issue is + understood and the project wants a fix, swap `needs triage` for `ready`. + Only `ready` issues are open for pull requests. For correlation ID defects, test synchronous and asynchronous handlers, requests with and without a correlation header, and behavior across concurrent @@ -23,7 +26,10 @@ running in a different thread. ## Pull-request review -- Keep changes small and reviewable, with a linked issue when useful. +- Every PR must link an issue labeled `ready`, except typo and link fixes, + Dependabot updates and maintainer release PRs. PRs without one may be closed + without review, pointing the author to [CONTRIBUTING.md](CONTRIBUTING.md). +- Keep changes small and reviewable. - Include reproduction steps for fixes, targeted tests, and compatibility notes. State what was *not* tested. - Confirm no unintentional changes to log schema, correlation IDs, HTTP