Obtain list of open Github issues for your projects as an iCalendar feed of VTODO items.
Github iCalendar is written in Python and uses the Flask micro web application framework. If you'd prefer a PHP based solution, a clone of this script written in PHP is available here.
Although it is not hard to download this script and run it yourself, you may prefer to connect directly to https://api.github.com with your favourite iCalendar client.
Contact Github support and click the Star button on the page for this project to register your vote for native iCalendar support in the Github API.
Install the dependencies on your system, on a Debian or Ubuntu system you may execute a command like this to get everything you need:
sudo apt-get install python-yaml python-icalendar python-flask python-pygithub
If you want to use a virtualenv (Python 2.7), these are the packages:
pip install PyYAML icalendar flask pygithub
To develop, you may simply install the dependencies specified in the requirements file:
pip install -r requirements-dev.txt
You might need to install a local project in "editable" mode on your virtualenv to run the tests:
pip install -e .
Create an API token on GitHub using these instructions
Create a configuration file, for example:
api_token: 6b36b3d7579d06c9f8e88bc6fb33864e4765e5fac4a3c2fd1bc33aad
bind_address: ::0
bind_port: 5000
filter: all
By default, you will see todo items for open issues in all repositories that you have access to. If you want to limit the list to specific repositories, list them in the configuration file and any others will be ignored:
api_token: 6b36b3d7579d06c9f8e88bc6fb33864e4765e5fac4a3c2fd1bc33aad
bind_address: ::0
bind_port: 5000
filter: all
repositories:
- repository: your-user-name/your-project
- repository: your-user-name/another-project
If you want to get only issues with a chosen label on your feed, list the labels you want in the configuration file, like this:
labels:
- label: bug
- label: enhancement
This configuration gets the listed labels from all
the repositories, but it can be combined with the repository configuration, if you want issues with specific labels from specific repositories.
api_token: 6b36b3d7579d06c9f8e88bc6fb33864e4765e5fac4a3c2fd1bc33aad
bind_address: ::0
bind_port: 5000
filter: all
repositories:
- repository: your-user-name/your-project
- repository: your-user-name/another-project
labels:
- label: bug
- label: enhancement
The filter
parameter has the same meaning as the filter
parameter
in the Github issues API
although if it is not specified, Github-iCalendar uses all
as the
default.
You can run the application directly from the command line:
$ ./github_icalendar/main.py github-ics.cfg
Or start it as a web server, passing the argument:
$ ./github_icalendar/main.py github-ics.cfg --web
In your iCalendar client (such as Mozilla Thunderbird with the Mozilla Lightning plugin) you just have to add a new remote calendar using the http://host:port URL where your github-icalendar instance is running.
Copyright (C) 2015, Daniel Pocock http://danielpocock.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.