gothenburgbitfactory / bugwarrior Goto Github PK
View Code? Open in Web Editor NEWPull github, bitbucket, and trac issues into taskwarrior
Home Page: http://pypi.python.org/pypi/bugwarrior
License: GNU General Public License v3.0
Pull github, bitbucket, and trac issues into taskwarrior
Home Page: http://pypi.python.org/pypi/bugwarrior
License: GNU General Public License v3.0
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
Use python-modernize and 'six'
Will it blend?
No messages to report here, but its not quite working. Should be looked into.
@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.'
bitbucket and github work as of 0.4.1, we should have bugzilla too.
https://github.com/sigmavirus24/github3.py looks good.
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.
test
Right now, bugwarrior only pulls in "issues". It should probably pull in 'pull requests' by default, too.
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.
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.
I've come across the following issue.
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
.
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:
Any ideas on how to debug?
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.
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.
Sometimes the slashes in my URLs get escaped when read from the taskwarrior db which results is every task being 'completed' and then added again.
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.
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
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'
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"
We need to manually step through the pages.
As described here http://www.youtube.com/watch?v=ZuiSbMS0_5g&feature=related
It works now, and would be awesome. :)
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.
It would be awesome if comments could be pulled from github, bitbucket, and trac tickets and have them listed as annotations on tasks.
especially for trac (I report lots of things to the sysadmins on my team and want to track those tickets in bugwarrior).
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.
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
github and bitbucket works. We should have trac now.
It would be helpful if the redmine example were more detailed. Why not use an anonymous pull of taskwarrior issues as an example in the rc?
test again!
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.
Need to bisect and find out when this got introduced.
$ 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
I've been convinced.
bugwarrior can add new tasks, but it can't close them yet
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?
We should add more print statements, add a configurable verbosity level to the .rc file, and use a nice logging tool (like twiggy
maybe).
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/
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.
formatting is broken on github for the config file
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.
After i've run bugwarrior-pull, Taskwarrior could not understand the file pending.data:
[task list]
Unrecognized taskwarrior file format. in /home/mono/.task/pending.data at line 1
The data bugwarrior fetched: http://paste.pocoo.org/show/523137/
Here you can see my pending.data: http://paste.pocoo.org/show/523139/
So you can better read it, i had upload it to pocoo.
Best Regards,
Lukas
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?
This is a follow-up to #41.
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
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.
This should really be available as "yum install bugwarrior"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.