Support for GitHub-style release notes#1904
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
knope-docs | f37184d | Commit Preview URL Branch Preview URL |
May 24 2026, 07:05 PM |
ae7deb3 to
661ac7f
Compare
|
Added an integration test and manually ran it, works great! |
|
@copilot will you revert the last commit? Let's just stick with sequential calls. |
Agent-Logs-Url: https://github.com/knope-dev/knope/sessions/d59066c9-533f-4e7e-bbc6-85e7d41d0097 Co-authored-by: dbanty <43723790+dbanty@users.noreply.github.com>
|
@copilot now please add reessaie and reqwest-middleware to the client so it backoff/retrys with retry-after support. Make sure to log a warning when we're being rate limited which says how long until retry |
Implemented in 98e40a1: PR info lookups now use reqwest-middleware + reessaie with Retry-After-aware retries/backoff, and we emit a warning when rate limited that includes the retry delay in seconds. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot this should be in the shared http client / reponse handler, also we already have time, don't add chrono |
Done in 10bf43f. I moved the retry/backoff + rate-limit warning into the shared HTTP integration ( |
|
@copilot there's no reason to make a separate path, we can just retry all requests with those standard responses/headers. Also, move time back to where it was in Cargo.toml, alphabetical |
Done in 7827635. The shared |
Agent-Logs-Url: https://github.com/knope-dev/knope/sessions/cb702db0-40f0-45d2-a9ca-7badc71dc724 Co-authored-by: dbanty <43723790+dbanty@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds opt-in support for generating GitHub-style release note entries (e.g. * Add dark mode by @user in #42) by enriching collected changes with GitHub PR metadata during PrepareRelease, with retry/backoff for rate limits and accompanying documentation + tests.
Changes:
- Add
$pr_numberand$commit_author_logintemplate variables and detect when templates require forge/API enrichment. - Implement GitHub API enrichment for changes (plus centralized HTTP client retry/backoff & rate-limit logging).
- Update docs/recipes and add/extend integration tests and changesets.
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/Config File/release-notes.mdx | Document new GitHub-backed template variables and token/rate-limit behavior. |
| docs/src/content/docs/recipes/customizing-release-notes.mdx | Add “GitHub-style release notes” recipe and minor wording tweak. |
| deny.toml | Update cargo-deny skip-tree entries for getrandom versions with reasons. |
| crates/knope/tests/integration_helpers.rs | Simplify git push helper used by integration tests. |
| crates/knope/tests/integration_github/mod.rs | Add ignored integration test covering PR creation + enrichment path; add gh presence check. |
| crates/knope/src/step/releases/package.rs | Refactor to split “gather changes” vs “apply release” so enrichment can happen between. |
| crates/knope/src/step/releases/mod.rs | Make prepare_release async and call GitHub enrichment when templates require forge data. |
| crates/knope/src/step/mod.rs | Await async PrepareRelease step execution. |
| crates/knope/src/step/issues/jira.rs | Switch Jira HTTP errors to shared middleware error type; improve JSON-deserialize error reporting. |
| crates/knope/src/step/issues/github.rs | Rework GitHub issue listing to use new GitHub state authentication helper. |
| crates/knope/src/state.rs | Expand GitHub state to authenticated/unauthenticated and add auth helper methods; move to shared HTTP client type. |
| crates/knope/src/integrations/http.rs | Introduce reqwest-middleware + Retry-After/backoff with rate-limit logging; update shared response handling. |
| crates/knope/src/integrations/github/pr_info.rs | New GitHub enrichment implementation to populate PR number and login per commit. |
| crates/knope/src/integrations/github/mod.rs | Re-export enrichment helper; remove old GitHub state initializer. |
| crates/knope/src/integrations/github/create_release.rs | Migrate to new GitHub state/auth + shared HTTP middleware client. |
| crates/knope/src/integrations/github/create_pull_request.rs | Migrate to new GitHub state/auth + shared HTTP middleware client. |
| crates/knope/src/integrations/gitea/mod.rs | Update to new shared http_client(None) signature. |
| crates/knope/src/integrations/git.rs | Initialize new GitInfo enrichment fields to None. |
| crates/knope/src/app_config.rs | Add non-prompt GitHub token lookup; refactor config dir/value loading helpers. |
| crates/knope/Cargo.toml | Add reqwest-middleware and reessaie dependencies for retry/backoff support. |
| crates/knope-versioning/src/release_notes/mod.rs | Add forge-data detection and render new template variables; add unit tests. |
| crates/knope-versioning/src/changes/mod.rs | Extend GitInfo with pr_number and author_login enrichment fields. |
| Cargo.lock | Lockfile updates for new dependencies and transitive changes. |
| .changeset/retry_rate_limited_requests_to_github.md | Changeset for retrying rate-limited GitHub requests. |
| .changeset/commit_author_login_and_pr_number_are_now_reserved_strings_in_change_templates.md | Changeset for reserved template variables (contains a typo). |
| .changeset/add_commit_author_login_and_pr_number_change_template_variables.md | Changeset announcing new template variables and GitHub-only support. |
|
Merged! FYI @DaleSeo I renamed $commit_author_login to $pr_author_login since the PR author we get from the API might not have been the author of the specific commit. |
Continuation/rebase of #1804
TODO:
Set up a max parallel in-flight requestStay sequential since GitHub's docs ask us to