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

[RfC]: Add Support for Multiple Snyk Organizations #167

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

Silthus
Copy link
Contributor

@Silthus Silthus commented Jan 24, 2024

  • Tests written and linted ℹ︎
  • Commit history is tidy & follows Contributing guidelines ℹ︎

What this does

One big feature that is currently missing from the plugin is the support for multiple Snyk organizations. This PR adds that feature in a backwards compatible and minimal way.

It adds a new snyk.io/org-ids annotations that allows defining a comma separated list of organization ids. It will then iterate over those organizations and tries to find any of the specified targets or projects within any of those organizations, aggregating them into a single list.

In addition the link to the individual tabs changes when multiple orgs are specified to include the org slug in the url. This avoids duplicate links.

Notes for the reviewer

I also upgraded all dependencies to the latest backstage version, as I was unable to build the project otherwise. The commits are cleanly separated.

Don't hesitate to reach out if you have any additional requests or things your would like to change.

More information

This PR is supported by the Interhyp as part of the ING.

@Silthus Silthus requested a review from a team as a code owner January 24, 2024 10:49
Copy link

cla-bot bot commented Jan 24, 2024

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Silthus on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

Copy link

cla-bot bot commented Jan 24, 2024

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Silthus on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

Copy link

cla-bot bot commented Jan 24, 2024

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Silthus on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

src/api/index.ts Outdated Show resolved Hide resolved
@aarlaud
Copy link
Contributor

aarlaud commented Jan 31, 2024

For clarity since there might be multiple orgs, I think it'd be useful to add in the tab metadata the org slug+ID. Simply adding in SnykTab.tsx the following

const metadata = {
      origin: value.projectDetails.origin,
      type: value.projectDetails.type,
      "created": value.projectDetails.created,
      "last tested": value.projectDetails.lastTestedDate,
      "Project ID": `${value.projectDetails.id}`,
      "Organization": `${orgId}`
    };

image

What do you think?

Copy link

cla-bot bot commented Jan 31, 2024

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Silthus on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

1 similar comment
Copy link

cla-bot bot commented Jan 31, 2024

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Silthus on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

Copy link

cla-bot bot commented Jan 31, 2024

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Silthus on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

@aarlaud
Copy link
Contributor

aarlaud commented Feb 1, 2024

Alright @Silthus, can you rebase off develop ? thanks

@Silthus
Copy link
Contributor Author

Silthus commented Feb 1, 2024

Alright @Silthus, can you rebase off develop ? thanks

Ok I rebased.
Maybe it would be a good idea to add prettier and eslint to the project to get rid of the code style diffs and make formatting easier?

@aarlaud aarlaud merged commit 3b11e6e into snyk-tech-services:develop Feb 5, 2024
1 check passed
@aarlaud
Copy link
Contributor

aarlaud commented Feb 5, 2024

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

2 participants