Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 2.71 KB

README.md

File metadata and controls

71 lines (53 loc) · 2.71 KB

Bitbucket Code Review Dashboard

Description

This is a python 3 based script that issues REST APIs to a Bitbucket server to gather and plot total number of pull-requests reviewed by month and by repository name.

Goal

The target of this project is to learn how to issue rest API calls to a Bitbucket server and gather information. Afterwards, use data gathered to create different kinds of graphs using Google charts.

Expected learning includes but not limited to:

  • Using REST Apis via Python
  • Basic HTML, CSS, JavaScript syntax
  • Integrating Google Charts inside Python scripts

Prerequisites

Code

Github Repository is linked here: https://github.com/NIAGroup/bitbucket-prHistory

How To Run The Script

The script runs by invoking the python interpreter + script_name from any command line.

Without command line arguments:

python3 bitbucket_script.py

or

With command line arguments:

python3 bitbucket_script.py -u username -p password

Outcome:

Upon successful execution there will be a JSON and HTML file present in the same directory.

A user can also serve this html (PrHistoryPlot.html) file on the browser of choice to view the plots.

Output Directory Structure Bar Graphs (PR/Month & PR/Repo)
output_directory_img output_pr_plot_img

Resources

Bitbucket Rest API documentation

Google Charts DataTables and DataViews documentation

Lynda Class on Python Rest APIs

Atlassian Python API Wrapper Github Repo