Generate AI CHANGELOG entries for automated API update PRs - #591
Merged
Conversation
Danger ReportNo issues found. |
dblock
force-pushed
the
ai-generated-changelog-entries
branch
3 times, most recently
from
August 12, 2026 00:55
0027b11 to
aa251fe
Compare
The Update API workflow committed a single generic CHANGELOG.md line for every automated update PR: "Update API from slack-api-ref@<rev>", with no indication of what actually changed. Following the same approach as slack-ruby/slack-api-ref#87, add a GitHub Models-backed step (actions/ai-inference@v1, default GITHUB_TOKEN with models: read permission, no extra secrets needed) that summarizes the diff produced by rake slack:api:update into a short list of grouped, descriptive entries (new/removed methods, argument/validation changes, error code changes, etc.) via a structured .github/prompts/changelog-entries.prompt.yml with a JSON schema response. Each generated entry becomes its own CHANGELOG.md bullet, all tagged with the same automated PR number, replacing the old single generic line. The same list is also included under a "## Changes" heading in the PR body for reviewers. Falls back to the original generic, rev-based message if there are no changes, the AI step fails, or the response is empty/malformed, so the workflow never blocks on this step. Uses Ruby (already set up in this workflow) instead of Python for the inline CHANGELOG-rewriting script, for consistency with the rest of this Ruby project. Also locks simplecov below 1.1.0 in the Gemfile: 1.1.0 changed Result#to_hash to write a float timestamp to coverage/.resultset.json, which coverallsapp/github-action's parser (typed Int64?) fails to deserialize, breaking the Coveralls step in CI (coverallsapp/github-action#269, fix tracked upstream in coverallsapp/coverage-reporter#191). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
force-pushed
the
ai-generated-changelog-entries
branch
from
August 12, 2026 01:10
aa251fe to
56084ef
Compare
Coverage Report for CI Build 31552746342Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.02%) to 91.055%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Update APIworkflow (.github/workflows/update_api.yml) commits a single generic CHANGELOG.md line for every automated API update PR, e.g.:This says nothing about what actually changed.
Fix
Following the same approach as slack-ruby/slack-api-ref#87:
.github/prompts/changelog-entries.prompt.yml: a structured prompt foractions/ai-inference@v1(GitHub Models, defaultGITHUB_TOKENwithmodels: read, no extra secrets/subscription) that turns the diff produced byrake slack:api:updateinto a JSON array of short, grouped, imperative-mood entries (new/removed/renamed methods, argument/validation changes, error code changes, etc.), viaresponseFormat: json_schemafor reliable parsing.update_api.ymlchanges:models: readpermission.git diff --statand a truncatedgit diffand runsactions/ai-inference@v1with the new prompt file.-prefixed list (for the PR body) from the parsed JSON response.## Changesheading in the PR body.jacobtomlinson/gha-find-replace@v3CHANGELOG step with a small inline Python script that writes one CHANGELOG bullet per entry, each referencing the same automated PR number, e.g.:Verified the workflow and prompt YAML parse correctly, the embedded JSON schema is valid, and manually simulated the CHANGELOG-rewriting Python script and the
-bullet-list formatting with sample entries to confirm output.