@@ -3,7 +3,7 @@ import { Effect, Option } from "effect";
33import { NotPullRequestContextError , GitHubApiError } from "../errors.js" ;
44import type { GitHubContext , Octokit , PullRequestPayload , CommentOptions } from "../types.js" ;
55import type { DiffResult } from "../schemas.js" ;
6- import { hasDixChanges } from "./utils.js" ;
6+ import { hasDixChanges , hasPackageChanges } from "./utils.js" ;
77
88const NIX_DIFF_ACTION_MARKER_BASE = "<!-- nix-diff-action" ;
99
@@ -70,16 +70,15 @@ export const formatAggregatedComment = (
7070 headSha : string ,
7171 options ?: FormatCommentOptions ,
7272) : string => {
73- const visibleResults = results . filter ( ( r ) => hasDixChanges ( r . diff ) ) ;
74- const maxDiffLength = calculateMaxDiffPerAttribute ( visibleResults . length ) ;
73+ const maxDiffLength = calculateMaxDiffPerAttribute ( results . length ) ;
7574 // Single attribute: displayName-specific marker for matrix + update strategy
7675 // Multiple attributes: generic marker (results order may vary in comment-only mode)
7776 const marker =
78- visibleResults . length === 1
79- ? getNixDiffActionMarker ( visibleResults [ 0 ] . displayName )
77+ results . length === 1
78+ ? getNixDiffActionMarker ( results [ 0 ] . displayName )
8079 : getNixDiffActionMarker ( ) ;
8180
82- const sections = visibleResults
81+ const sections = results
8382 . map ( ( result ) => {
8483 const { truncated, text } = truncateDiff (
8584 result . diff || "No differences found" ,
@@ -269,17 +268,19 @@ export class GitHubService extends Effect.Service<GitHubService>()("GitHubServic
269268 formatOptions ?: FormatCommentOptions ,
270269 ) : Effect . Effect < void , GitHubApiError > =>
271270 Effect . gen ( function * ( ) {
272- const hasChanges = results . some ( ( r ) => hasDixChanges ( r . diff ) ) ;
273- const commentBody = formatAggregatedComment ( results , pr . head . sha , formatOptions ) ;
274- // Use displayName-specific marker for single attribute
275- const displayName = results . length === 1 ? results [ 0 ] . displayName : undefined ;
276-
277- if ( options . skipNoChange && ! hasChanges ) {
271+ const visibleResults = results . filter (
272+ ( r ) => hasDixChanges ( r . diff ) && hasPackageChanges ( r . diff ) ,
273+ ) ;
274+ if ( options . skipNoChange && visibleResults . length === 0 ) {
278275 return yield * Effect . logInfo (
279- "No differences found. Skipping comment (skip-no-change is enabled)." ,
276+ "No meaningful differences found. Skipping comment (skip-no-change is enabled)." ,
280277 ) ;
281278 }
282279
280+ const commentBody = formatAggregatedComment ( visibleResults , pr . head . sha , formatOptions ) ;
281+ // Use displayName-specific marker for single attribute
282+ const displayName = visibleResults . length === 1 ? visibleResults [ 0 ] . displayName : undefined ;
283+
283284 if ( options . commentStrategy === "update" ) {
284285 const existing = yield * findExistingNixDiffComment (
285286 octokit ,
0 commit comments