Product HuntAI Sandboxes are on Product Hunt.AI Sandboxes by Buddy are live on Product Hunt today.Join the discussion

Generate release notes from the diff with Grok

Buddy now integrates with xAI and includes a new pipeline action: Grok. Connect your API key once, and the action runs with access to the repository, a terminal and the run variables.

We built a pipeline that writes release notes from git diff on every version tag. When a change breaks the API, the run waits for approval.

Step 1: connect Grok

Add the Grok integration with an API key from console.x.ai. Buddy stores the key encrypted, so it never lands in the repository.

Step 2: the Grok action

The demo is a small orders API in Node.js with a few tests. The Grok action builds its instructions from three parts:

  • Inline: Write release notes for $BUDDY_RUN_TAG. Buddy substitutes the tag when the action starts, so the agent knows right away which version it describes.
  • File .buddy/grok-release.md: everything specific to this repository. It tells Grok to skip tests and pipeline files and to change nothing but release.json.
  • Skill ./.buddy/skills/release-notes: rules that fit any API. Grok compares tags with git log and git diff, marks a change as breaking when an existing integration would stop working, writes release.json and replies with release notes for Slack. You can plug the same skill into another project.

The file and the skill live in the repository, so changes to them go through regular code review.

Pick the model from the list:

  • grok-build-0.1
  • grok-4.7
  • grok-4.6
  • grok-4.5

Image loading...Grok action configuration: grok-integration integration, grok-build-0.1 model, inline prompt with $BUDDY_RUN_TAG, prompt file .buddy/grok-release.md and skill ./.buddy/skills/release-notes

This is release.json for a version with a breaking change:

json
{ "version": "v1.2.0", "breaking": true, "changes": [ { "type": "breaking", "text": "The coupon field in created and retrieved order responses is now named couponCode." } ] }

Step 3: the pipeline

Image loading...Grok release notes pipeline in Buddy: refs/tags/v* trigger, Grok release notes, Test & check release, Approve breaking release with an IF condition and Send release notes

The pipeline has four actions:

  • Grok release notes - the action from step 2.
  • Test & check release - runs the tests and copies the flag from release.json into BREAKING.
  • Approve breaking release - runs only when BREAKING=true (VAR_IS condition).
  • Send release notes - posts $BUDDY_ACTION_GROK_RESULT to Slack.

The trigger is CREATE_REF on refs/tags/v*, so only version tags start it.

How BREAKING reaches the condition

BREAKING is a pipeline variable with the Settable option. That lets Test & check release overwrite the value:

bash
export BREAKING=$(node -p "require('./release.json').breaking") $

The approval condition and every later action see the new value. You can check it in the Variables tab:

Image loading...Pipeline Variables tab: BREAKING set to true after a run with a breaking change

Run 1: v1.1.0, a regular release

v1.1.0 has two commits: a new SPRING20 coupon and case-insensitive coupon codes. Both were classified as features. The flag stayed false, so the approval was skipped:

Image loading...Run #1 for tag v1.1.0: Grok release notes 31 s, Test & check release 4 s, Approve breaking release skipped, Send release notes sent

The release notes were then sent to Slack:

Image loading...Slack message with v1.1.0 release notes: breaking false, SPRING20 coupon and case-insensitive coupon codes

Run 2: v1.2.0, a breaking change the commit message missed

v1.2.0 has a single commit: Tidy up order payload. Sounds like cleanup, but a field in the response got renamed:

diff
- const order = { id: nextId++, items: body.items, coupon: body.coupon || null, total }; + const order = { id: nextId++, items: body.items, couponCode: body.coupon || null, total };

Tests pass because none of them checks that field. A client reading order.coupon gets undefined after the upgrade.

Grok identified the breaking change. The Results tab shows what it ran, step by step: git describe, git log, git diff, reading src/server.js from before the change, and writing release.json with "breaking": true.

Image loading...Grok action Results tab: git describe, git log, git diff, git show v1.1.0:src/server.js and writing release.json

The flag was true, so the run stopped at Approve breaking release. Its comment names the version, and the release notes sit right above it:

Image loading...Run #2 for tag v1.2.0: Grok output variables mentioning the couponCode field and the Approve breaking release action with Approve and Stop buttons

After we clicked Approve, the message went out with breaking: true:

Image loading...Slack message with v1.2.0 release notes: breaking true, the coupon field in order responses is now named couponCode

Stop ends the run and no message goes out.

Two tags, two outcomes. The regular release went straight to Slack. The breaking change stopped for approval, even though the tests passed and the commit message gave nothing away.

Grok action output variables

When it finishes, Grok leaves variables for the following actions. You can find them in the logs, under Output Variables:

Variable Contains
BUDDY_ACTION_GROK_CONCLUSION Session status
BUDDY_ACTION_GROK_RESULT Last reply
BUDDY_ACTION_GROK_SESSION_ID xAI session ID
BUDDY_ACTION_GROK_RUN_FILE Session log JSON
BUDDY_ACTION_GROK_OUTPUT_FILE Same as RUN_FILE

The log is saved to .buddy/output/grok/. Keep it as an artifact and you have a record of why a change was marked as breaking and which commands Grok ran.

Learn more

Jarek Dylewski

Jarek Dylewski

Customer Support

A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.

Oct 13, 2026
Share