Example: Python framework tool using Github REST API to search a keyword in Github Repository, the tool allow searching for GetTreatment keyword to find all the code lines where Split SDK is used.
The tool uses Github Search API, please review the github link for more info. The results are exported to CSV file with the name format: [CSV File Name]_[Keyword].csv
Environment:
- Python 2.7.15
- request 2.20.1
How to use:
- Class wrapper for Github API is: GitObj.py
- Update your relevant repository name using [owner]/[repo name] format, Keyword to search and Github token in Constants.py:
- Github access token is required to use the Github REST API, this will also allow accessing the private repositories.
- The Keyword usually is getTreatment which is the method all SDKs use to calculate treatment, if you have a wrapper class for Split SDK, use your wrapper class call for getTreatment
- Optionally set the Log and the generated CSV files name and path.
- Run the tool using the Main.py class:
python Main.py
Comments
0 comments
Please sign in to leave a comment.