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
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- `prw run` now notifies once (`merged` or `closed`) and automatically stops watching a PR once it is merged or closed, instead of polling it forever. This notification always fires, regardless of `--on`/`notification_filter`.
## [0.4.0] - 2026-10-24

prw now covers the whole PR lifecycle and is built for scripts and AI agents: it detects GitHub Actions results (previously reported as `pending` forever), works with Slack and Discord webhooks, and adds `prw wait`, `prw checks`, `prw flaky`, an MCP server, auto-watching your PRs, review and merge-conflict events, and failed-job log excerpts. It reuses your `gh` login and polls with conditional requests that cost no API quota.

### Added
- `prw flaky <owner/repo | URL>`: finds flaky GitHub Actions jobs — jobs that failed and then passed when their workflow run was re-run on the same commit — in the repository's last `--runs` workflow runs (default 300, max 1000), grouped by workflow and job with counts, last occurrence and a link to the latest failed attempt; `--json`. Cancelled jobs (fail-fast victims) don't count. New MCP tool `get_flaky_checks`.
Expand All @@ -22,6 +23,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `prw wait <PR_URL>`: blocks until the PR's CI finishes and exits `0` (success or merged), `1` (failed), `2` (timeout), `3` (other error) or `130` (interrupted). Fails fast on the first failed check, follows new pushes, retries transient API errors, and prints a JSON result with `--json`. Progress goes to stderr.
- Zero-setup auth for GitHub CLI users: when no token is configured, `prw` uses `GH_TOKEN` or, failing that, the token from `gh auth token`. Lookup order: config file, `GITHUB_TOKEN`, `GH_TOKEN`, `gh auth token`. `prw config show` now reports the exact source.
- Integration tests against the real GitHub API (`make integration`, build tag `integration`), run nightly by a new `Integration` workflow. They fail against the old status-only logic.
- `prw run` now notifies once (`merged` or `closed`) and automatically stops watching a PR once it is merged or closed, instead of polling it forever. This notification always fires, regardless of `--on`/`notification_filter`.
- Native OS notifications on macOS, Linux and Windows (`prw run --notify-native` or `prw config set notification_native true`), contributed by @marianogappa in #5.
- Failed check names and links are included in console notifications and in the webhook payload (`failed_checks`)

### Fixed
- A check whose workflow ran more than once for the same commit (e.g. an older run cancelled by `concurrency: cancel-in-progress`) kept the PR failed even after the newer run passed. Only the newest run of each check counts now, like on GitHub.
Expand All @@ -47,8 +51,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Webhook requests now time out after 10 seconds instead of waiting indefinitely, and webhook errors include the response body.
- CI status now aggregates GitHub Check Runs (GitHub Actions) together with legacy commit statuses. Previously, repositories using only GitHub Actions were reported as `pending` forever and never triggered notifications.

## [0.3.0] - 2025-12-16

### Added
- Failed check names and links are included in console notifications and in the webhook payload (`failed_checks`)
- Cross-platform prebuilt binaries (Linux, macOS, Windows) via GitHub Releases
- Automated release workflow for tagged versions
- Issue and pull request templates
Expand All @@ -75,7 +80,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Complete documentation: README, CONTRIBUTING, SECURITY, QUICKSTART
- MIT license

[Unreleased]: https://github.com/devblac/prw/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/devblac/prw/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/devblac/prw/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/devblac/prw/releases/tag/v0.3.0
[0.2.0]: https://github.com/devblac/prw/releases/tag/v0.2.0
[0.1.0]: https://github.com/devblac/prw/releases/tag/v0.1.0

1 change: 1 addition & 0 deletions TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Legend — Impact: 1–5 · Effort: S (≤½ day), M (1–2 days), L (3+ days)
- ✅ #12 `prw checks <PR>` — done (buckets fail/cancel/pending/pass/neutral/skipping, durations, links, `--json`, exit 8 while running; verified live on devblac/docker-lint#5, zephyrproject-rtos/zephyr#105183 — 35 checks, superseded run hidden — and devblac/prw#13)
- ✅ #15 Failed job log excerpt — done (`--logs` on `checks`/`wait`, MCP `get_failed_logs`; parser tested on a real staticcheck failure log; verified live on cloudposse/atmos#3476, #3422 and #2199 — a commit status — and over MCP stdio)
- ✅ #16 Flakiness detection — done as `prw flaky` + MCP `get_flaky_checks` (failed-then-passed across attempts of the same run; verified live: grafana/grafana 4 flaky jobs in 300 runs, hashicorp/terraform "Unit Tests"; parallel fetching cut grafana from 24s to 9s). The "status history" half was dropped: low value for its cost.
- 🚀 v0.4.0 released with everything above (PRs #6–#22).
- Next: #17 packaging (Homebrew/Scoop) + keychain token storage, #8 `gh` extension publishing — both need owner decisions

## Planned
Expand Down
5 changes: 3 additions & 2 deletions cmd/prw/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ func captureStdout(fn func() error) (string, error) {
}()

io.Copy(&buf, r)
os.Stdout = oldStdout

// Restore stdout only after receiving from errCh: the channel orders fn's reads
// of os.Stdout before this write (the pipe closing doesn't, for the race detector).
err := <-errCh
os.Stdout = oldStdout
return buf.String(), err
}

Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package version
import "fmt"

var (
Version = "0.3.0"
Version = "0.4.0"
Commit = "unknown"
)

Expand Down
Loading