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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃檹] Add a switch/method to enable a custom mapping instead of Github Org == Snyk Org #344

Open
kevin-s31 opened this issue Jul 12, 2022 · 1 comment

Comments

@kevin-s31
Copy link

Describe the user need
Some customers only have 1 Github Org with many repos within this Org and do access control by using Github Teams to control access to repos within this single org. Currently, snyk-api-import will automatically map a Github org to a Snyk Org but any customer that wants to create a Snyk Org per Team (or Business Unit) they can do so, but during the import:data phase, they will need to manually map the OrgID and IntegrationID underneath each repo within json generated by snyk-api-import which could be time consuming. The ask here is if the customer has some mapping of Snyk org to Repo (coudl they use some type of config file/mapping file) to automatically assign the repos the right OrgID and IntegrationID

If you have an idea how you would like this to behave please share in as much detail as possible.

Potentially if a customer had a list of Team:Repo as a csv, if we can somehow make a utility to first map the Team:Repo to Orgslug:Repo (As Team would be the orgName) -> OrgID:Repo (Where we convert the OrgSlug into OrgID) -> OrgID + IntegrationID:Repo (Where based on the OrgID we can also pull the IntegrationID) -> somehow append this OrgID + IntegrationID into the json generated by snyk-api-import then customers would have a nice final json of Repo + OrgID + IntegrationID that is generated nicely without manual json manipulation

Add any other context or screenshots about the feature request here.

@papotte
Copy link

papotte commented Jul 28, 2022

Hello! I have added this functionality in particular for Github. I would love to have your feedback on it:

https://github.com/poliamordesobremesa/snyk-api-import/tree/rb/import-from-teams

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

No branches or pull requests

2 participants