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
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- run: npm ci
- run: npx playwright install --with-deps chromium
- run: node --check github-sortout.user.js
- run: npm test
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing

Keep changes small, plain, and easy to audit.

## Workflow

Use pull requests for changes to `main`.

1. Branch from `main`.
2. Make the smallest change that solves the issue.
3. Update docs when behavior, install steps, privacy, or testing changes.
4. Open a pull request with what changed, why, and how it was tested.

Avoid unrelated cleanup in feature or bugfix PRs.

## Code

- Keep the userscript dependency-free unless there is a strong reason.
- Prefer DOM APIs and text nodes over `innerHTML`.
- Do not add GitHub tokens, background services, analytics, or local activity tracking.
- Treat GitHub selectors as unstable. Keep adapters small and covered by fixtures.
- Sorting should only move loaded timeline activity, not the initial issue or PR post.

## Testing

Before opening a PR, run:

```sh
node --check github-sortout.user.js
npm test
```

CI runs these same non-live checks on pull requests and pushes to `main`.

Run the live smoke checks when touching GitHub page selectors or timeline behavior:

```sh
npm run test:live
```

Manual browser testing is still useful for userscript changes, especially in Firefox with Violentmonkey.

## Releases

There is no build step and no automatic update channel.

For a release, update the userscript version, commit through a pull request, merge to `main`, and install from the raw script URL.
Loading