Perceval backend for Bitbucket.
- Python >= 3.6.1
- python3-requests >= 2.7
- grimoirelab-toolkit >= 0.2
- perceval >= 0.17.4
Clone the repository
$ git clone https://github.com/perceval-backends/grimoirelab-perceval-bitbucket
We use Poetry for managing the project. You can install it following these steps.
Install the required dependencies (this will also create a virtual environment)
$ poetry install
Activate the virtual environment
$ poetry shell
Note:
3 tokens are needed to access the bitbucket backend
CLIENT_ID
get from Bitbucket - SettingsSECRET_ID
get from Bitbucket - SettingsREFRESH_TOKEN
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
.
- Fix flake8 errors
- Add support for using
username
andpassword
for authentication instead of the 3 access tokens, read more about it from chaoss/grimoirelab-perceval/#/653 (comment) - Add tests
- Start using Bitergia/release-tools
- Publish the package to PyPI
This project follows the contributing guidelines of the GrimoireLab.
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.
Licensed under GNU General Public License (GPL), version 3 or later.