|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Keep changes small, plain, and easy to audit. |
| 4 | + |
| 5 | +## Workflow |
| 6 | + |
| 7 | +Use pull requests for changes to `main`. |
| 8 | + |
| 9 | +1. Branch from `main`. |
| 10 | +2. Make the smallest change that solves the issue. |
| 11 | +3. Update docs when behavior, install steps, privacy, or testing changes. |
| 12 | +4. Open a pull request with what changed, why, and how it was tested. |
| 13 | + |
| 14 | +Avoid unrelated cleanup in feature or bugfix PRs. |
| 15 | + |
| 16 | +## Code |
| 17 | + |
| 18 | +- Keep the userscript dependency-free unless there is a strong reason. |
| 19 | +- Prefer DOM APIs and text nodes over `innerHTML`. |
| 20 | +- Do not add GitHub tokens, background services, analytics, or local activity tracking. |
| 21 | +- Treat GitHub selectors as unstable. Keep adapters small and covered by fixtures. |
| 22 | +- Sorting should only move loaded timeline activity, not the initial issue or PR post. |
| 23 | + |
| 24 | +## Testing |
| 25 | + |
| 26 | +Before opening a PR, run: |
| 27 | + |
| 28 | +```sh |
| 29 | +node --check github-sortout.user.js |
| 30 | +npm test |
| 31 | +``` |
| 32 | + |
| 33 | +CI runs these same non-live checks on pull requests and pushes to `main`. |
| 34 | + |
| 35 | +Run the live smoke checks when touching GitHub page selectors or timeline behavior: |
| 36 | + |
| 37 | +```sh |
| 38 | +npm run test:live |
| 39 | +``` |
| 40 | + |
| 41 | +Manual browser testing is still useful for userscript changes, especially in Firefox with Violentmonkey. |
| 42 | + |
| 43 | +## Releases |
| 44 | + |
| 45 | +There is no build step and no automatic update channel. |
| 46 | + |
| 47 | +For a release, update the userscript version, commit through a pull request, merge to `main`, and install from the raw script URL. |
0 commit comments