fix: omit redundant apply instructions from apply comments#2618
Open
m-agahi wants to merge 1 commit intodiggerhq:developfrom
Open
fix: omit redundant apply instructions from apply comments#2618m-agahi wants to merge 1 commit intodiggerhq:developfrom
m-agahi wants to merge 1 commit intodiggerhq:developfrom
Conversation
…2120) The PR comment "Instructions" section always showed "To apply these changes, run digger apply" even after an apply had already completed. Skip the apply instructions when the command type is already "apply", keeping only the unlock instructions.
Author
|
no review? |
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.
🧠 Ai UsageDetails (if applicable):
This PR was written primarily by Claude Code, reviewed and verified by the contributor.
Summary
Fixes #2120
The PR comment "Instructions" section always showed "To apply these changes, run
digger apply" even after an apply had already completed — which doesn't make sense.This change makes
formatExampleCommands()command-type-aware: when the batch/job type isapply, the apply instructions are omitted. The unlock instructions are always shown since they remain useful regardless of command type.Changes
libs/comment_utils/summary/updater.go—formatExampleCommandsnow accepts aDiggerCommandparameter and skips apply instructions when command isapplybackend/utils/comment_utils.go— same change for the backend's copy offormatExampleCommandslibs/comment_utils/summary/updater_test.go(new) — tests using a mockPullRequestServiceto verify the fullUpdateCommentflow for both plan and apply, plus unit tests for the formatterTest plan
go test -v ./libs/comment_utils/summary/— all 4 tests passgo build ./backend/utils/— backend compiles cleanly