Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Check if org is undefined in the CLI formatted output [CC-763] #1756

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

ipapast
Copy link
Contributor

@ipapast ipapast commented Mar 23, 2021

What does this PR do?

This PR changes the formatted output of the Snyk CLI to NOT display an organization name, if it is undefined.

The CLI currently displays undefined for the formatted final output of a test run, if an organization is not defined. We add a check here to not print it if it is undefined.

As we are moving towards the Beta release of the IaC experimental flow, we want to have an org name correctly displayed.
At this moment, the org name is getting passed from a test endpoint, so there is no easy way to do it without using it in the new experimental flow.

We will tackle this problem in a next PR, however we don't want to show undefined to our users for now, so we skip the organization name.

How should this be manually tested?

Run node ~/snyk-repos/snyk/dist/cli iac test file.tf --experimental before
Run npm run build && node ~/snyk-repos/snyk/dist/cli iac test file.tf --experimental after to check that the org name is not getting displayed anymore.

Relevant tickets

Jira CC-763

Screenshots

Before

image

After

image

@github-actions
Copy link
Contributor

Warnings
⚠️ You've modified files in src/ directory, but haven't updated anything in test folder. Is there something that could be tested?
Messages
📖

This PR will not trigger a new version. It doesn't include any commit message with feat or fix.

Generated by 🚫 dangerJS against d3ac141

@ipapast ipapast marked this pull request as ready for review March 23, 2021 10:32
@ipapast ipapast requested review from a team as code owners March 23, 2021 10:32
@ipapast ipapast changed the title refactor: Do not show org in the meta output if undefined refactor: Check if org is undefined in the CLI formatted output Mar 23, 2021
@ipapast ipapast self-assigned this Mar 23, 2021
@ipapast ipapast merged commit 023ae6e into master Mar 23, 2021
@ipapast ipapast deleted the refactor/do-not-show-org-name-for-experimental branch March 23, 2021 10:38
@ipapast ipapast changed the title refactor: Check if org is undefined in the CLI formatted output refactor: Check if org is undefined in the CLI formatted output [CC-763] Mar 23, 2021
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.

2 participants