Extracting data from software engineering tools – Gerrit and Jira
To illustrate how to work with data extraction, let’s extract data from a popular software engineering tool for code reviews – Gerrit. This tool is used for reviewing and discussing fragments of code developed by individual programmers, just before they are integrated into the main code base of the product.
The following program code shows how to access the database of Gerrit – that is, through the JSON API – and how to extract the list of all changes for a specific project. This program uses the Python pygerrit2
package (https://pypi.org/project/pygerrit2/). This module helps us use the JSON API as it provides Python functions instead of just JSON strings:
# importing libraries from pygerrit2 import GerritRestAPI # A bit of config - repo gerrit_url = "https://gerrit.onap.org/r" # since we use a public OSS repository auth = None # this line gets sets the parameters for...