Skip to content

perceval-backends/grimoirelab-perceval-bitbucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

perceval-bitbucket

Build Status Coverage Status PyPI version

Perceval backend for Bitbucket.

Requirements

  • Python >= 3.6.1
  • python3-requests >= 2.7
  • grimoirelab-toolkit >= 0.2
  • perceval >= 0.17.4

Installation

Getting the source code

Clone the repository

$ git clone https://github.com/perceval-backends/grimoirelab-perceval-bitbucket

Prerequisites

Poetry

We use Poetry for managing the project. You can install it following these steps.

Setup

Install the required dependencies (this will also create a virtual environment)

$ poetry install

Activate the virtual environment

$ poetry shell

Usage

Note:

3 tokens are needed to access the bitbucket backend

For getting REFRESH_TOKEN from Bitbucket one needs to follow these steps -

  • Go to https://bitbucket.org/site/oauth2/authorize?client_id={CLIENT_ID}&response_type=code in your preferred browser
  • Authorize under your bitbucket account
  • The page will be redirected to {YOUR_REDIRECT_LINK}/?code={CODE}
  • Use curl with the required parameters
$ curl -X POST -u {CLIENT_ID}:{SECRET_ID} https://bitbucket.org/site/oauth2/token -d grant_type=authorization_code -d code={CODE}
  • The response will be a JSON containing out REFRESH_TOKEN

Fetch issues from the bitbucket project libqxt/libqxt with CLIENT_ID, SECRET_ID, REFRESH_TOKEN

$ perceval bitbucket libqxt libqxt --category issue -c CLIENT_ID -s SECRET_ID -r REFRESH_TOKEN

The bitbucket backend can fetch issue and pull_request.

Roadmap

Contributing

This project follows the contributing guidelines of the GrimoireLab.

Acknowledgment

The backend was initially developed by @imnitishng.

Adhering to the guidelines, the work is moved to this external repository. But, this can be merged (chaoss/grimoirelab-perceval/#/653) into the Perceval repository in the future.

License

Licensed under GNU General Public License (GPL), version 3 or later.

Releases

No releases published

Languages