Skip to content

refactor: Change getCommonHistoryGroupFields to receive an object instead of individual params#1186

Merged
adhityamamallan merged 4 commits intocadence-workflow:masterfrom
adhityamamallan:common-group-fields-obj
Feb 23, 2026
Merged

refactor: Change getCommonHistoryGroupFields to receive an object instead of individual params#1186
adhityamamallan merged 4 commits intocadence-workflow:masterfrom
adhityamamallan:common-group-fields-obj

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Feb 20, 2026

Summary

Change getCommonHistoryGroupFields (in workflow-history-v2) to receive an object instead of individual params, to improve readability of optional params.

Test plan

Builds & tests passing + ran locally to sanity-check.

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
@adhityamamallan adhityamamallan changed the title Common group fields obj refactor: Change getCommonHistoryGroupFields to receive an object instead of individual params Feb 20, 2026
@adhityamamallan adhityamamallan marked this pull request as ready for review February 20, 2026 13:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the getCommonHistoryGroupFields function to accept a single object parameter with named properties instead of 8 individual positional parameters. This improves code readability, especially for the 3 optional parameters that previously required passing undefined placeholders.

Changes:

  • Updated getCommonHistoryGroupFields function signature to use object destructuring with named parameters
  • Updated all 7 call sites across different history group generator functions to use the new object parameter syntax
  • Updated the test file to use the new function signature

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
get-common-history-group-fields.ts Changed function signature from 8 positional parameters to object destructuring with named properties
get-timer-group-from-events.ts Updated function call to use object syntax with named parameters
get-single-event-group-from-events.ts Updated function call to use object syntax with named parameters
get-signal-external-workflow-execution-group-from-events.ts Updated function call to use object syntax with named parameters
get-request-cancel-external-workflow-execution-group-from-events.ts Updated function call to use object syntax with named parameters
get-decision-group-from-events.ts Updated function call to use object syntax with named parameters
get-child-workflow-execution-group-from-events.ts Updated function call to use object syntax with named parameters
get-activity-group-from-events.ts Updated function call to use object syntax with named parameters
get-common-history-group-fields.test.ts Updated test setup to use new object parameter syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adhityamamallan adhityamamallan merged commit eaa84eb into cadence-workflow:master Feb 23, 2026
3 checks passed
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.

3 participants