Skip to content

Conversation

@cx-itay-paz
Copy link
Contributor

By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change.

References

Include supporting link to GitHub Issue/PR number

Testing

Describe how this change was tested. Be specific about anything not tested and reasons why. If this solution has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Checklist

  • I have added documentation for new/changed functionality in this PR (if applicable).
  • I have updated the CLI help for new/changed functionality in this PR (if applicable).
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used

triageShowCmd := triageShowSubCommand(resultsPredicatesWrapper)
triageUpdateCmd := triageUpdateSubCommand(resultsPredicatesWrapper, featureFlagsWrapper)
triageGetStatesCmd := triageGetStatesSubCommand(customStatesWrapper)
triageGetStatesCmd := triageGetStatesSubCommand(customStatesWrapper, featureFlagsWrapper )

Choose a reason for hiding this comment

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

There is an extra space before the closing parenthesis. Please remove it for consistency.

}

func triageGetStatesSubCommand(customStatesWrapper wrappers.CustomStatesWrapper) *cobra.Command {
func triageGetStatesSubCommand(customStatesWrapper wrappers.CustomStatesWrapper, featureFlagsWrapper wrappers.FeatureFlagsWrapper) *cobra.Command {

Choose a reason for hiding this comment

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

The function signature for triageGetStatesSubCommand has been changed to include featureFlagsWrapper. Ensure that all callers of this function are updated to pass the new argument.

`,
),
RunE: runTriageGetStates(customStatesWrapper),
RunE: runTriageGetStates(customStatesWrapper, featureFlagsWrapper),

Choose a reason for hiding this comment

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

The featureFlagsWrapper parameter is added to the runTriageGetStates function, but the corresponding function definition and the usage within the function body are not provided in the diff. Ensure that the function definition is updated to accept this new parameter and that it is utilized properly within the function.

func runTriageGetStates(customStatesWrapper wrappers.CustomStatesWrapper) func(*cobra.Command, []string) error {
func runTriageGetStates(customStatesWrapper wrappers.CustomStatesWrapper, featureFlagsWrapper wrappers.FeatureFlagsWrapper,) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, _ []string) error {
flagResponse, _ := wrappers.GetSpecificFeatureFlag(featureFlagsWrapper, wrappers.CustomStatesFeatureFlag)

Choose a reason for hiding this comment

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

Error handling for wrappers.GetSpecificFeatureFlag is missing. Consider handling the error to avoid ignoring potential issues when retrieving the feature flag status.

@cx-itay-paz cx-itay-paz changed the title add FF for custom states call Add FF for custom states call Feb 11, 2025
@cx-itay-paz cx-itay-paz changed the title Add FF for custom states call Add FF for custom states call (AST-80216) Feb 11, 2025
@github-actions
Copy link

Logo
Checkmarx One – Scan Summary & Details04424f7a-2b10-413b-8aac-26220abae69d

Great job, no security vulnerabilities found in this Pull Request

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.

1 participant