Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Report a wrong classification, missed call site, or command failure
title: ''
labels: ''
assignees: ''
---

### Version and environment

Paste `patchline --version`, your Python version, and operating system.

### Smallest example

Include minimal before/after JSON specs or the source line being scanned.
Remove private URLs, credentials, and customer data.

### Command and actual result

Include the command, output, and exit code if relevant.

### Expected result

Explain why the API change should be breaking, additive, or require review.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Describe a real API upgrade or integration Patchline should handle
title: ''
labels: ''
assignees: ''
---

### Your use case

What API upgrade or workflow are you trying to handle?

### Example input and desired output

A small spec or source snippet helps define the behavior.

### Current workaround

How do you handle this today? What makes it difficult?
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Describe the problem and the resulting behavior.

Include a minimal before/after example for a classification change.

Validation performed:

- Tests or commands run, and their results.
- Any limitations or compatibility changes.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- run: python -m unittest discover tests -v
- name: build installable wheel
run: python -m pip wheel . --no-deps --wheel-dir dist
- name: verify installed wheel outside source checkout
run: python tests/wheel_smoke.py dist

# The demo must always work exactly as the README documents it.
# (exit code 1 = breaking changes found, which is the expected result here)
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changelog

## 0.3.0

- Add `patchline demo`, an offline example bundled in the installed wheel.
- Add `patchline --version`, package links, and installation verification outside
the source checkout on all four CI configurations.
- Fix false field-removal findings when an object becomes a composed schema.
Composition changes now use `REVIEW`, not `BREAKING`; diff still exits `1`
so CI does not silently approve an unverified compatibility change.
- Reproduce the pinned Stripe comparison as 6,385 findings: four breaking
field removals, one composition change requiring review, and 6,380 additive.
Earlier reports incorrectly described the terminal-reader union as removed fields.
- Add a CI integration recipe, issue templates, and contribution instructions.

Reports now accept severity `REVIEW` and summaries include a `review` count.
Consumers that enumerate severity values must handle this additional value.

## 0.2.0

- Expand comparison to all response statuses, media representations, array
items, required request bodies/parameters, and removed request media types.
- Add Python and JavaScript-module scanning, dependency-folder exclusions,
deterministic results, and input error exit code `2`.
- Add Windows/Linux CI and 46 regression tests.

## 0.1.0

- Initial JSON API diff, JS/TS source scanning, and Stripe example.
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributing to Patchline

Start with a small, reproducible API change or scanner example. A useful report
includes a minimal old/new JSON spec, expected classification, actual output,
and a short source snippet if call-site matching is involved.

## Run locally

```bash
git clone https://github.com/Xenrai/patchline.git
cd patchline
python -m pip install -e .
python -m unittest discover tests -v
patchline demo
```

Python 3.10+ is required. Runtime and unit tests use the standard library.

## Send a change

1. Fork the repository and create a branch for one specific improvement.
2. For behavior changes, add a regression showing a real failure or missed case.
3. Keep findings deterministic and preserve the `0` / `1` / `2` CLI exit contract.
4. Document new limits or classification changes. Unsupported schemas must not
be presented as proven incompatibilities.
5. Run the suite and open a pull request describing the user-visible result.

CI tests Windows and Linux, builds a wheel, and runs its demo in an isolated
environment outside the checkout. The Stripe baseline should change only after
reviewing why the findings changed; do not update counts just to make CI pass.

## Useful first contributions

- Small scanner regressions for Python dictionary access or JavaScript optional chaining.
- Minimal paired specs for an unsupported OpenAPI shape, with expected behavior.
- Clearer error messages with a reproducer and a test.
- Documentation tested on a platform you use.

Discuss composition analysis, YAML support, and AST-based scanning in an issue
before a large implementation. These need a defined compatibility policy.

If you use Patchline, a short account of your API, language, and false positives
is valuable feedback. A star helps people find it; fork when you want to change it.
Loading
Loading