Generate AI commit summaries for automated API updates - #87
Merged
Conversation
The daily "update" workflow committed changes with a generic,
date-only message ("Updated from Slack docs, YYYY/MM/DD"), which
doesn't say anything about what actually changed.
Add a GitHub Models-backed step (actions/ai-inference@v1, using the
default GITHUB_TOKEN with models: read permission, no extra
secrets/subscription needed) that summarizes git diff / git diff
--stat of the scraped changes into a short commit title (<=72
chars) and a few bullet points, via a structured
.github/prompts/commit-message.prompt.yml with a JSON schema
response so the output is easy to parse reliably.
Falls back to the original generic, date-based message if there are
no changes, the AI call fails, or the response is malformed, so the
workflow never blocks on this step.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
added a commit
to dblock/slack-ruby-client
that referenced
this pull request
Aug 12, 2026
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. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
added a commit
to dblock/slack-ruby-client
that referenced
this pull request
Aug 12, 2026
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>
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 daily
updateworkflow (.github/workflows/update.yml) commits scraped API changes with a generic, date-only message likeUpdated from Slack docs, 2026/08/11(see ff2d6a0). This tells you nothing about what actually changed without opening the diff.Fix
Add an AI-generated commit summary step to the workflow, using only GitHub Actions (no extra Ruby code):
.github/prompts/commit-message.prompt.yml: a structured prompt foractions/ai-inference@v1that asks a model to turn agit diff/git diff --statinto a short committitle(<=72 chars, imperative mood) and asummaryof 1-5 bullet points. UsesresponseFormat: json_schemaso the response is guaranteed valid, parseable JSON.update.ymlchanges:permissions: contents: write / models: read(required for GitHub Models inference; no extra secrets or Copilot subscription needed, it uses the defaultGITHUB_TOKEN).rake api:updateproduced any changes; if not, skips the AI call entirely.git diff --statand a truncatedgit diff(20,000 chars) to files and passes them into the prompt viafile_input.actions/ai-inference@v1with the prompt file, parsestitle/summaryout of the JSON response withjq.EndBug/add-and-commit@v9step, unchanged otherwise.Example resulting commit message
Verified
.github/workflows/update.ymland.github/prompts/commit-message.prompt.ymlparse as valid YAML, and that the embeddedjsonSchemais valid JSON.