Skip to content

Part of my internship work in summer 2022 but modified to not include any company information

License

Notifications You must be signed in to change notification settings

Peaches99/bitbucket-feature-crawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic-Crawler

Using Bitbucket's Rest Api (1.0) this script will search through all repositories in search of gherkin feature files.


In it's default configuration it saves each repositories gathered data as a single Json file in the /data/ directory.
The main function also returns a list of all Json strings sorted by the repository index.

It will only create a Project file if a repository has at least one feature file and if it has more than one they will all be added into a single project file.

Setup:

You can use generateEnv.py to interactively generate the required config file interactively but if you want to do that manually follow the guide below.



There needs to be a .env file in the root script directory with the bitbucket credentials and url in the following format:

You will find all these variables in an example file called setup_example but don't forget to rename it .env when you are done.

User credentials

BITBUCKET_CREDENTIAL_TOKEN="Basic <-encoded_credentials->"

To get the encoded credentials you need to base64 encode your credential string "username:password" and place it in the location above.

Api Url

BITBUCKET_PROJECT_URL="http://<bitbucket_url>/rest/api/1.0/projects/"

Replace the bitbucket_url tag with your bitbucket url.

Tcp limit

TCP_REQUEST_LIMIT=30

Here you can set how many maximum requests the script will send to the server.

Avoid going over 50 if you don't want to nuke your internal bitbucket server.



These variables need to be present and properly setup for the script to work its magic ;)

About

Part of my internship work in summer 2022 but modified to not include any company information

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages