Bitbucket Cloud - Flow and Tech
Flow
Fetch the monitored projects from Snyk (if the
skipSnykMonitoredRepos
flag was not set and theSNYK_TOKEN
was exported).Fetch
one
/some
/all
the workspaces that the credentials have access to from SCM and create a workspaces list.Fetch
one
/all
repos under the fetched/provided workspaces.Remove the repos that are not monitored by Snyk (if the
skipSnykMonitoredRepos
flag was not set and theSNYK_TOKEN
was exported) and create a Repo list.Create an import file for unmonitored repos to use for easily importing repos into your Snyk account (if the
importConfDir
flag was set)Fetch the commits for the fetched/provided repo/s and create a Contributors list.
Count the commits for the repo/s by the contributors.
Remove the contributors that were specified in the exclusion file (if
the exclusionFilePath
flag was set and a valid path to a text file was provided).Print the results.
Bitbucket Cloud API endpoints used
To get the repositories from BB Cloud, if a workspace was not provided:
/api/2.0/repositories
To get the repositories from BB Cloud, if a workspace/s was provided:
/api/2.0/repositories/{Workspace}
To get the commits for the fetched/provided repo/s list:
/api/2.0/repositories/{Workspace}/{Repo}/commits
Last updated