Skip to content

ci(github): comment the Nix flake environment diff on flake.lock PRs#9

Merged
jcardozo-eth merged 2 commits into
mainfrom
ci/comment-pr-on-nix-flake-lock-environment-diff
Jul 15, 2026
Merged

ci(github): comment the Nix flake environment diff on flake.lock PRs#9
jcardozo-eth merged 2 commits into
mainfrom
ci/comment-pr-on-nix-flake-lock-environment-diff

Conversation

@jcardozo-eth

Copy link
Copy Markdown
Member

Closes #7

Summary

Adds a workflow that shows what a Nix flake update actually changes. On any PR that touches flake.lock, it builds the pinned dev-shell environment before and after the update and posts one PR comment listing which packages changed and to which versions, instead of the opaque hash change. The comment updates itself on later pushes and stays silent when the environment is effectively unchanged.

Verification

just check is green and the workflow passes yamllint .. Live behaviour will be verified after merge on the open Dependabot PR #5: the comment appears with the expected deltas, a @dependabot rebase updates the same comment in place with no duplicate, and a PR not touching flake.lock triggers no run.

Checklist

  • just check green
  • Docs updated (CONTRIBUTING CI section)

On every pull request that changes flake.lock, build the pinned dev-shell
environment at the PR head and at the merge base, diff the two realized
closures with nix store diff-closures, and upsert a single PR comment with
the package-level delta. Later pushes edit that same comment in place; an
unchanged environment posts nothing.

Runs least-privilege (contents: read, pull-requests: write) with the
built-in token and no repository secrets, so it also annotates Dependabot
flake.lock bumps that otherwise render as an opaque hash change.
Add a CI/CD paragraph describing the flake.lock environment diff comment:
what a reviewer gets from it and why it matters for Dependabot's weekly
lock bumps, which otherwise land as an opaque hash change.
@jcardozo-eth jcardozo-eth self-assigned this Jul 15, 2026
@jcardozo-eth
jcardozo-eth merged commit fd4bd17 into main Jul 15, 2026
4 checks passed
@jcardozo-eth
jcardozo-eth deleted the ci/comment-pr-on-nix-flake-lock-environment-diff branch July 15, 2026 17:43
@jcardozo-eth jcardozo-eth added this to the 2.0.0 milestone Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post the environment package diff as a comment on flake.lock update PRs

1 participant