Skip to content

snyk-labs/import-github-org-repos-from-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create snyk-created-orgs.json based off of Snyk and GitHub Organization Names

This script will search your GitHub organizations for any matching Snyk organization based off of GitHub organization mapping in a csv. If matches are found, it will generate snyk-created-orgs.json which will be used to import repos into Snyk.

Requirements

Python version 3.10.14

Download snyk-api-import, make the file executable, and place the file in the root directory of this repo.

Required Environment Variables

SNYK_TOKEN

SNYK_LOG_PATH - This needs to be the full path to the root directory of this repo.

Script Arguments

csv-file-path - Path to the csv file with GitHub organization data.

github-token

group-id

snyk-api-import-name - Name of the Snyk API import binary in root directory

Running

git clone https://github.com/snyk-labs/import-gitlab-repo-from-csv.git
pip install -r requirements.txt
python3 index.py --csv-file-path=FULL-PATH-TO-CSV-File --github-token=GITHUB-TOKEN --group-id=SNYK-GROUP-ID --snyk-api-import-name=snyk-api-import

Example run command

python3 index.py --csv-file-path=FULL-PATH-TO-CSV-File --github-token=GITHUB-TOKEN --group-id=SNYK-GROUP-ID --snyk-api-import-name=snyk-api-import

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages