GithubHelp home page GithubHelp logo

gothenburgbitfactory / bugwarrior Goto Github PK

View Code? Open in Web Editor NEW
721.0 721.0 208.0 1.97 MB

Pull github, bitbucket, and trac issues into taskwarrior

Home Page: http://pypi.python.org/pypi/bugwarrior

License: GNU General Public License v3.0

Python 97.38% Makefile 1.25% Batchfile 1.24% HTML 0.13%

bugwarrior's People

Contributors

alyssais avatar carlitux avatar coddingtonbear avatar cthulahoops avatar djmitche avatar do3cc avatar fmauch avatar fongshway avatar gdetrez avatar irl avatar ivan-cukic avatar jenisys avatar jspricke avatar kostajh avatar lmacken avatar lordgaav avatar mathstuf avatar mattcen avatar pawamoy avatar pjf avatar puiterwijk avatar ralphbean avatar ryansb avatar ryneeverett avatar ssbarnea avatar stephanmeijer avatar tychoish avatar ubuntudroid avatar umonkey avatar wookietreiber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bugwarrior's Issues

Documentation for developers

@tychoish says:

'the thing that will probably help the most for a "how to write a bugwarrior service" is some sort of schema for the dict returned by the issues method on IssueServices Subclasses.'

Testing with taskwarrior 2.0

Right now, bugwarrior has only been tested with taskwarrior 1.9.4.

If someone can do some testing, that would be great.

Odds are it doesn't work. Patches would be wonderful as well.

Notifications under cronjob in linux

When run as a cronjob, the notifications fail under linux.

It looks like dbus and/or pynotify don't have permissions to send notifications from there.

This could potentially be an selinux thing? I just don't have time to look at it right now.

Notifications

It would be useful to get a notification when bugwarrior has added new tasks or completed existing ones.

On Mac OS X, this can be done using Notification Center, via Terminal Notifier.

There could be a setting in bugwarriorrc to switch this on for users who'd like to use the feature.

I'll submit a patch soon.

Integration with Pivotal Tracker

Is this something that sounds reasonable? I haven't used Pivotal or Taskwarrior enough to know if this would work, but it would be awesome if it could.

Consider option to not use taskw

For the reasons stated in Taskwarrior's 3rd-Party Application Guidelines, I think it would be good to either give users a choice about utilizing taskw, or remove the dependency on taskw altogether.

@ralphbean I know you must have put a lot of work into taskw and I am appreciative of that, but I think interacting with TW using task import, task export, or subprocess calls to the command line, would result in more stable integration between Bugwarrior and Taskwarrior.

What do you think?

Duplicate tasks

I only have the github connection and I'm getting duplicate tasks:

$ task
[task next]

ID Project          Pri Due      A Age Urgency Description
-- ---------------- --- -------- - --- ------- ---------------------------------
 7 homedir                          7m       1 (bw)Is#1 - Support for installing
                                               homedir into ..
                                               https://github.com/docwhat/homed-
                                               ir/issues/1
23 homedir                          7m       1 (bw)Is#1 - Support for installing
                                               homedir into ..
                                               https://github.com/docwhat/homed-
                                               ir/issues/1
 8 homedir                          7m       1 (bw)Is#3 - remove should take
                                               keyword 'all' ..
                                               https://github.com/docwhat/homed-
                                               ir/issues/3

38 tasks, truncated to 18 lines

Here's my .bugwarriorrc file:

# Example ~/.bugwarriorrc
#

# General stuff.
[general]
# Here you define a comma separated list of targets.  Each of them must have a
# section below determining their properties, how to query them, etc.  The name
# is just a symbol, and doesn't have any functional importance.
#targets = my_github, my_bitbucket, paj_bitbucket, moksha_trac
targets = my_github

# log.level specifices the verbosity.  The default is DEBUG.
# log.level can be one of DEBUG, INFO, WARNING, ERROR, CRITICAL, DISABLED
#log.level = DEBUG

# If log.file is specified, output will be redirected there.  If it remains
# unspecified, output is sent to sys.stderr
#log.file = /var/log/bugwarrior.log

# The bitly username and api key are used to shorten URLs to the issues for your
# task list.  If you leave these options commented out, then the full URLs
# will be used in your task list.
#bitly.api_user = YOUR_USERNAME
#bitly.api_key = YOUR_API_KEY

# This is a github example.  It says, "scrape every issue from every repository
# on http://github.com/ralphbean.  It doesn't matter if ralphbean owns the issue
# or not."
[my_github]
service = github
username = docwhat
#default_priority = H

# This is the same thing, but for bitbucket.  Each target entry must have a
# 'service' attribute which must be one of 'github', 'bitbucket', or 'trac'.
#[my_bitbucket]
#service = bitbucket
#username = ralphbean
#default_priority = M

# Here's another bitbucket one.  Here we want to scrape the issues from repos of
# another user, but only include them in the taskwarrior db if they're assigned
# to me.
#[paj_bitbucket]
#service = bitbucket
#username = paj
#only_if_assigned = ralphbean
#default_priority = L

# Here's an example of a trac target.  Scrape every ticket and only include them
# if 1) they're owned by me or 2) they're currently unassigned.
# Note -- You must have the trac XML-RPC plugin installed and configured to work
# over HTTP.
#[moksha_trac]
#service = trac

#trac.base_uri = fedorahosted.org/moksha
#trac.username = ralph
#trac.password = OMG_LULZ

#only_if_assigned = ralph
#also_unassigned = True
#default_priority = H

Problems with german umlauts / special chars

If there are some special chars like german umlauts in the summary of trac tickets, than the things can not be
saved in file:

Working on [flsTrac]
Working on [myGitHub]
Adding task: {'description': u'(bw)Is#127 - FormFactory: XML Basiert [+ Dokumentation] .. http://bit.ly/w1XCPI',
 'priority': 'M',
 'project': 'flsTrac'}
Adding task: {'description': u'(bw)Is#93 - Umfragemodul f\xfcr Forum und Kursverwaltung .. http://bit.ly/w36hI3',
 'priority': 'M',
 'project': 'flsTrac'}
Traceback (most recent call last):
  File "/usr/bin/bugwarrior-pull", line 9, in <module>
    load_entry_point('bugwarrior==0.1b3', 'console_scripts', 'bugwarrior-pull')()
  File "/usr/lib64/python2.7/site-packages/bugwarrior-0.1b3-py2.7.egg/bugwarrior/command.py", line 14, in pull
    synchronize(issues)
  File "/usr/lib64/python2.7/site-packages/bugwarrior-0.1b3-py2.7.egg/bugwarrior/db.py", line 50, in synchronize
    taskw.task_add(**issue)
  File "/usr/lib64/python2.7/site-packages/taskw-0.1.6-py2.7.egg/taskw/writing.py", line 25, in task_add
    _task_add(task, 'pending')
  File "/usr/lib64/python2.7/site-packages/taskw-0.1.6-py2.7.egg/taskw/writing.py", line 79, in _task_add
    f.writelines([task2str(task)])
TypeError: writelines() argument must be a sequence of strings

Pulling from Bitbucket barfs with a 403 Forbidden error

I get this when I try and pull issues from my Bitbucket repos:

INFO:Working on [bitbucket]
CRITICAL:oh noes
TRACE Traceback (most recent call last):
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/bugwarrior-0.5.4-py2.7.egg/bugwarrior/command.py", line 14, in pull
TRACE     issues = aggregate_issues(config)
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/bugwarrior-0.5.4-py2.7.egg/bugwarrior/services/__init__.py", line 136, in aggregate_issues
TRACE     for t in targets
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/bugwarrior-0.5.4-py2.7.egg/bugwarrior/services/bitbucket.py", line 72, in issues
TRACE     issues = sum([self.pull(user + "/" + repo) for repo in repos], [])
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/bugwarrior-0.5.4-py2.7.egg/bugwarrior/services/bitbucket.py", line 39, in pull
TRACE     f = urllib2.urlopen(url)
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/urllib2.py", line 126, in urlopen
TRACE     return _opener.open(url, data, timeout)
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/urllib2.py", line 406, in open
TRACE     response = meth(req, response)
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/urllib2.py", line 519, in http_response
TRACE     'http', request, response, code, msg, hdrs)
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/urllib2.py", line 444, in error
TRACE     return self._call_chain(*args)
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/urllib2.py", line 378, in _call_chain
TRACE     result = func(*args)
TRACE   File "/usr/local/Cellar/python/2.7.3/lib/python2.7/urllib2.py", line 527, in http_error_default
TRACE     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
TRACE HTTPError: HTTP Error 403: FORBIDDEN

I did some logging and it seems to get issues from the first repo okay, but fails on the second one. Maybe Bitbucket is rate-limiting it?

Here's my bitbucket config in .bugwarriorrc:

[bitbucket]
service = bitbucket
username = extropic_engine
default_priority = M

github import tracebacks

$ bugwarrior-pull 
WARNING:URLs will not be shortened with bit.ly
WARNING:URLs will not be shortened with bit.ly
INFO:Working on [my_github]
CRITICAL:oh noes
TRACE Traceback (most recent call last):
TRACE   File "/usr/lib/python2.7/site-packages/bugwarrior-0.5.1-py2.7.egg/bugwarrior/command.py", line 14, in pull
TRACE     issues = aggregate_issues(config)
TRACE   File "/usr/lib/python2.7/site-packages/bugwarrior-0.5.1-py2.7.egg/bugwarrior/services/__init__.py", line 125, in aggregate_issues
TRACE     for t in targets
TRACE   File "/usr/lib/python2.7/site-packages/bugwarrior-0.5.1-py2.7.egg/bugwarrior/services/github.py", line 21, in __init__
TRACE     self.gh = pygithub3.Github()
TRACE   File "/usr/lib/python2.7/site-packages/pygithub3-0.4.1-py2.7.egg/pygithub3/github.py", line 24, in __init__
TRACE     self._users = User(**config)
TRACE   File "/usr/lib/python2.7/site-packages/pygithub3-0.4.1-py2.7.egg/pygithub3/services/users/__init__.py", line 14, in __init__
TRACE     self.keys = Keys(**config)
TRACE   File "/usr/lib/python2.7/site-packages/pygithub3-0.4.1-py2.7.egg/pygithub3/services/base.py", line 44, in __init__
TRACE     self._client = Client(**config)
TRACE   File "/usr/lib/python2.7/site-packages/pygithub3-0.4.1-py2.7.egg/pygithub3/core/client.py", line 29, in __init__
TRACE     self.__set_params(self.config)
TRACE   File "/usr/lib/python2.7/site-packages/pygithub3-0.4.1-py2.7.egg/pygithub3/core/client.py", line 56, in __set_params
TRACE     self.requester.params['per_page'] = config.get('per_page')
TRACE TypeError: list indices must be integers, not str

pip install does not work (python3)

Hi

I am trying to install this under python3 but it does not work. I am not sure if it is supported

warning: no files found matching 'README.rst'

Downloading/unpacking twiggy (from bugwarrior)
Downloading Twiggy-0.4.5.tar.gz (55kB): 55kB downloaded
Running setup.py egg_info for package twiggy

Downloading/unpacking bitlyapi (from bugwarrior)
Downloading bitlyapi-0.1.1.tar.gz
Running setup.py egg_info for package bitlyapi

Downloading/unpacking requests<=0.14.2 (from bugwarrior)
Downloading requests-0.14.2.tar.gz (361kB): 361kB downloaded
Running setup.py egg_info for package requests
Traceback (most recent call last):
File "", line 16, in
requests\setup.py", line 6, in
import requests
File ".\requests__init__.py", line 52, in
from . import utils
File ".\requests\utils.py", line 22, in
from .compat import parse_http_list as _parse_list_header
File ".\requests\compat.py", line 112, in
from .packages import chardet2 as chardet
ImportError: cannot import name chardet2
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 16, in

\requests\setup.py", line 6, in

import requests

File ".\requests__init__.py", line 52, in

from . import utils

File ".\requests\utils.py", line 22, in

from .compat import parse_http_list as _parse_list_header

File ".\requests\compat.py", line 112, in

from .packages import chardet2 as chardet

ImportError: cannot import name chardet2

bugwarrior-pull not recognized as command

Running OS X Mountain Lion I installed bugwarrior using pip. Worked without any issues. However, when issuing "bugwarrior-pull" on my terminal I get "command not found". Am I missing something?

use github rest/json api

github has a REST API and many libraries that support it. would you prefer higher level or lower level. Is having a small code footprint a design goal, i can look through them if you tell me what you want. I noticed that this project wasn't using OAuth so i inspected and found it wasn't using the more recent github api http://developer.github.com/v3/libraries/

Speed up bugwarrior with multiple threads

We could potentially speed up bugwarrior by querying each service in a different thread. This would open the door for more frequent cron runs and running "at the push of a button"

No output when running `bugwarrior-pull`

Hello,

After installing bugwarrior on Mac OS 10.8 using pip (I also tried easy_install subsequently), I don't see any output when running bugwarrior-pull.

I've tried:

  • deleting the .bugwarriorrc file (to see if I can get an error)
  • setting the log file to different locations using bugwarriorrc
  • installing bugwarrior with sudo pip / easy_install

Any ideas on how to debug?

sync pull requests too

Right now, bugwarrior only pulls in "issues". It should probably pull in 'pull requests' by default, too.

Jira: session() takes no arguments (2 given)

When running bugwarrior-pull with Jira I get the following error message:

Svens-MacBook-Pro:~ sven$ bugwarrior-pull 
INFO:Working on [jira_rn]
WARNING: Couldn't import magic library (is libmagic present?) Autodetection of avatar image content types will not work; for create_avatar methods, specify the 'contentType' parameter explicitly.
CRITICAL:oh noes
TRACE Traceback (most recent call last):
TRACE   File "/usr/local/lib/python2.7/site-packages/bugwarrior/command.py", line 14, in pull
TRACE     issues = aggregate_issues(config)
TRACE   File "/usr/local/lib/python2.7/site-packages/bugwarrior/services/__init__.py", line 173, in aggregate_issues
TRACE     for t in targets
TRACE   File "/usr/local/lib/python2.7/site-packages/bugwarrior/services/jira.py", line 36, in __init__
TRACE     self.config.get(self.target, 'jira.password')))
TRACE   File "/usr/local/lib/python2.7/site-packages/jira/client.py", line 88, in __init__
TRACE     self._create_http_basic_session(*basic_auth)
TRACE   File "/usr/local/lib/python2.7/site-packages/jira/client.py", line 1368, in _create_http_basic_session
TRACE     hooks={'args': self._add_content_type})
TRACE TypeError: session() takes no arguments (2 given)

A quick look at the dependencies by the jira package told me, that it needs requests>=0.13.6 while 1.1.0 seems to be current and much has changed since then, amongst other the things the session() method which indeed now takes no parameters. Unfortunately I've just started with Python development and never used the requests library. Therefore I am not able to fix the calls on my own.

Bugzilla support

We use bugzilla at work (it requires logging in via Basic Auth). It would be handy if you could query that as well.

If you need help figuring out how to query it, just ask.

Showing nothing new

I try to import my issues but it does not work.

It says "Working on [***]" and lasts a bit, but when I do 'task list" it shows nothing new.

Re-assigned issue does not get added to task list

I've come across the following issue.

  1. Add an issue, in Github for example, and assign it to yourself.
  2. Run bugwarrior-pull, the issue shows up in your local task database
  3. The issue gets worked on, then assigned to another user.
  4. Run bugwarrior-pull, the issue is marked as completed locally since it's no longer assigned to you.
  5. The issue gets reassigned to you.
  6. Run bugwarrior-pull. The issue is not added to your local task list but it should be.

I believe the problem is occurring in db.py in synchronize(). The call to load tasks with tasks = tw.load_tasks() loads completed and pending tasks, and since the description of the re-assigned issue matches a completed task, it is not synchronized.

I think the solution would be to build the local_descs list using tasks['pending'] instead of just tasks.

support for trello

Trello is a collaboration tool that organizes projects into boards. In one glance, Trello tells you what's being worked on, who's working on what, and where something is in a process. -- from trello.com

as trello provides a simple RESTful web API for a banch of its resource, add support for trello can be not too hard.

Implement issue filtering by repo

Currently, users can filter issues by user/organization and whether the issue is assigned to them. It would be incredibly helpful and awesome if users could also filter by a list of repo names.

For instance, I want to see issues from a the projects I'm concerned with in the fedora-infra organization. I don't want the issues from all projects, and I certainly don't want to manually assign myself to every issue in the projects I'm concerned with.

requests version conflict

When I install bugwarrior on my Ubuntu 12.10 machine running Python 2.7.3, I see this when it installs the requests module as part of the setup:

Installed /usr/local/lib/python2.7/dist-packages/requests-0.14.2-py2.7.egg
error: Installed distribution requests 0.14.2 conflicts with requirement requests>=1.0.0

I did not think much of it. When I configure and run bugwarrior-pull, I get a stacktrace and the following error:

pkg_resources.VersionConflict: (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages/requests-0.14.2-py2.7.egg), Requirement.parse('requests>=1.0.0'))

When I upgrade requests using pip, and run bugwarrior-pull again, I get the following stacktrace and error:

pkg_resources.DistributionNotFound: requests<=0.14.2

I am quite confused, and do not know how to rectify this problem.

Bugzilla service is busted

CRITICAL:rhbz:worker failure
TRACE Traceback (most recent call last):
TRACE   File "/home/lmacken/code/github.com/bugwarrior/bugwarrior/services/__init__.py", line 176, in _aggregate_issues
TRACE     return service.issues()
TRACE   File "/home/lmacken/code/github.com/bugwarrior/bugwarrior/services/bz.py", line 128, in issues
TRACE     ) for tag, issue in issues]
TRACE   File "/home/lmacken/code/github.com/bugwarrior/bugwarrior/services/bz.py", line 71, in annotations
TRACE     ) for c in issue['longdescs']])
TRACE KeyError: 'longdescs'

Configurable verbosity

We should add more print statements, add a configurable verbosity level to the .rc file, and use a nice logging tool (like twiggy maybe).

Use User Defined Attributes (UDAs) for tracking external reference and for tracking BW-managed tasks

When I use bugwarrior to track issues in a Github repository, I get tasks added with the prefix of "(bw)", and the URL pointing to the github issue is added as an annotation.

This works ok, but what do you think about using User Defined Attributes for this instead? That would make the output of task list a bit cleaner as you wouldn't have (bw) and the external URL immediately visible.

Bugwarrior could add two UDAs, something like:

uda.issueurl.type=string
uda.issueurl.label=IssueUrl

uda.service.type=string
uda.service.label=Service

The Service UDA could store "activecollab", "github", etc for each task.

This would have the added benefit of being able to sort your tasks by external service since you'll have an extra column for Service.

Redmine support

the developers of Taskwarrior.org use Redmine, and having bugwarrior support redmine means the devs could eat their own dogfood, if you know what I mean.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.