022-criando-issues-por-linha-de-comando-com-bitbucket-cli

Dica 22 - Criando issues por linha de comando com bitbucket cli

OBSOLETO

Instalação

pip install bitbucket-python

Usando com Python

Lembre-se de habilitar a criação de issues no repositório.

from bitbucket.client import Client
from decouple import config

email = config('BITBUCKET_EMAIL')
password = config('BITBUCKET_PASSWORD')
client = Client(email, password)

repository_slug = config('REPOSITORY_SLUG')

repo = client.get_repository(repository_slug)

data = {
    'title': 'Your title',
    'content': {'raw': 'Your description'},
    'kind': 'task'
}
# kind: task or bug

response = client.create_issue(repository_slug, data)

Usando com click

Last updated

Was this helpful?