Skip to content

refactor: store diff in action object (#1693) - #1701

Open
amnkarn wants to merge 2 commits into
finos:mainfrom
amnkarn:fix-1693
Open

refactor: store diff in action object (#1693)#1701
amnkarn wants to merge 2 commits into
finos:mainfrom
amnkarn:fix-1693

Conversation

@amnkarn

@amnkarn amnkarn commented Aug 26, 2026

Copy link
Copy Markdown

Fixes #1693

Description

This PR refactors getDiff and related consumers to store and access the git diff directly on the action object (action.diff). This makes it easier for plugins and subsequent actions (like scanDiff) to retrieve the diff without needing to extract it from the step content.

Changes Made

  • Backend: Updated getDiff to assign the diff string directly to action.diff and updated the Action interface.
  • Processors: Updated scanDiff.ts to retrieve the diff from action.diff.
  • UI: Updated PushActionView in types.ts to accept Step | string for the diff property.
  • UI Services: Modified getPush in git-push.ts to handle the new string format.

Backward Compatibility

To ensure historical database records and existing UI components do not break, fallback logic has been added. If action.diff is not present (or is not a string), the system gracefully falls back to extracting the content from steps.find((s) => s.stepName === 'diff')?.content in both scanDiff.ts and git-push.ts.

@amnkarn
amnkarn requested a review from a team as a code owner August 26, 2026 11:20
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 6a75417
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/6a8eccac60675c0008309419

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 26, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: amnkarn / name: Aman Karn (6a75417)
  • ✅ login: amnkarn / name: Aman Kumar Karn (ed30c23)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor getDiff to store the diff into the action

1 participant