How to import existing Github issues into Taiga Kanban?

659 views
Skip to first unread message

ma...@twork.it

unread,
Nov 18, 2014, 5:23:33 PM11/18/14
to tai...@googlegroups.com
Hi Taiga folks, this looks very impressive.

I've been using LeanKit Kanban and synchronizing Stories and Tasks with Github Issues using Zapier. Is there some way that I can import by github issues into Taiga, and keep them synchronized?

Thanks,
-Marc

Alejandro Alonso

unread,
Nov 18, 2014, 6:25:08 PM11/18/14
to ma...@twork.it, tai...@googlegroups.com
Hello Marc,

We just released a new feature that synchronizes github issues creation and comments from Github to Taiga (just Github to Taiga direction). You could use the Taiga REST API for initial import and synchronizing, we are still working on finishing the documentation but the work in progress is here -> http://taigaio.github.io/taiga-doc/dist/api.html

Regards,



--

  
Alejandro Alonso Fernández  
CIO & Co-founder

www.kaleidos.net/FC8EAC/

Marc Siegel

unread,
Nov 19, 2014, 9:29:14 AM11/19/14
to Alejandro Alonso, tai...@googlegroups.com
Thanks Alejandro, appreciate the answer.

Just to be clear: so you're saying that I have to do my own one-way REST import? It's not supported automatically in the hosted system?

Thanks,
-Marc

Alejandro Alonso

unread,
Nov 19, 2014, 10:13:41 AM11/19/14
to Marc Siegel, tai...@googlegroups.com
Hello Marc,

Actually it would be the only way. We just released our first approach to github integration and it's based on Github webhooks, via this feature we can listen to events happening in Github (commits, issues and issue comments now). Initial issues import or project synchronization will probably be developed too but those features are not still into Taiga.

Regards,

kasper...@gmail.com

unread,
May 20, 2015, 9:14:52 AM5/20/15
to tai...@googlegroups.com, ma...@twork.it
Hi, we want to get started using Taiga with an existing GitHub project. New GitHub issues are showing up in Taiga. How can we import older GitHub issues into Taiga?

Alejandro Alonso

unread,
May 20, 2015, 4:20:22 PM5/20/15
to kasper...@gmail.com, tai...@googlegroups.com, Marc Siegel
Hello Kasper,

Full github import is in the Taiga roadmap but actually there is nothing officially developed for it. You could use the Taiga API (http://taigaio.github.io/taiga-doc/dist/api.html) and the github one for importing all the old ones.

Regards,

--
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/0a51ccf6-6a91-4497-a65f-f67c210b5af9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

rogerio....@gmail.com

unread,
Feb 22, 2016, 6:17:25 AM2/22/16
to taigaio, kasper...@gmail.com, ma...@twork.it
Hi folks,

I'm trying to write some really simple ruby script to import all my issues as user stories from Github to Taiga. This is the code that I've written so far: 
require 'json'
require 'rest-client'
puts 'Creating User Stories from github issutes.. STARTED!'
github = {:url => 'https://api.github.com/repos/foo/foo/issues', :token => 'token foo'}
taiga = {:url => 'https://api.taiga.io/api/v1/userstories', :token => 'Bearer bla', :project_id => 00001}
puts 'Loading Issues from github..'
response = RestClient::Request.execute(method: :get, url: github[:url],
timeout: 10, headers: {params: {Authorization: github[:token]}})
puts "Issues loaded: #{response}"
puts "Converting request to JSON.."
json = JSON.parse(response)
puts "Creating User Stories on Taiga.."
json.each do |issue|
puts "Creating User Story on Taiga with subject: #{issue['title']} and description: #{issue['body']}"
RestClient.post taiga[:url], {:project => taiga[:project_id], :subject => issue['title'], :description => issue['body']}.to_json, {:content_type => :json, :Authorization => taiga[:token]}
end


This code actually works and the user stories are being created on Taiga. Great. However, I've noticed that when a task is created via Github Integration, a field (apparently) named "external reference" is set, like this:


And I couldn't find where/how I can set it on the API documentation.

I've tried, in vain, to send this field as a body parameter (just like the project, subject and description), and I received a 500 INTERNAL SERVER ERROR.

So, does anybody know how can I set the external_reference field when creating issues via API?

Thanks a bunch.

Alejandro Alonso

unread,
Feb 22, 2016, 8:42:00 AM2/22/16
to rogerio....@gmail.com, taigaio, Kasper Souren, Marc Siegel
Hello!,

You are right, external_reference field it's not documented in the API (it was designed just to be used from the external systems webhooks). If you need to use it in your own calls it should be something like:

["github", "http://github.com/test/project/issues/11"]

An array of two elements where the first element is the external system and the second one is the url.

Regards!,

2016-02-22 12:17 GMT+01:00 <rogerio....@gmail.com>:

This code actually works and the user stories are being created on Taiga. Great. However, I've noticed that when a task is created via Github Integration, a field (apparently) named "external reference" is set, like this:


And I couldn't find where/how I can set it on the API documentation.

I've tried, in vain, to send this field as a body parameter (just like the project, subject and description), and I received a 500 INTERNAL SERVER ERROR.

So, does anybody know how can I set the external_reference field when creating issues via API?

Thanks a bunch.




rogerio....@gmail.com

unread,
Feb 22, 2016, 4:50:44 PM2/22/16
to taigaio, rogerio....@gmail.com, kasper...@gmail.com, ma...@twork.it
Hi Alejandro,

Thank your for your reply.

Yeah, now I got it. The array did the trick.

And this is the final ruby script, if anybody were interested in:


Cheers.

Alejandro Alonso

unread,
Feb 23, 2016, 1:09:18 AM2/23/16
to Rogério R. Alcântara, taigaio, Kasper Souren, Marc Siegel
Great!, thanks for sharing! :)

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

ric...@gmail.com

unread,
Apr 15, 2016, 10:36:34 AM4/15/16
to taigaio, rogerio....@gmail.com, kasper...@gmail.com, ma...@twork.it
I realize that there appears to be a solution for github issues import, but in our case we wanted to perform a bulk import of user stories from a CSV into Taiga.

Our use case was that we generally work with our customers to determine user stories first through workbooks (e.g., Excel), and then upload them in bulk into Taiga.

That said, we've been using a bash script that bulk imports from CSV. Called taiga_import, it's located here, among a number of other Taiga-related scripts: https://github.com/richbl/taiga.io-scripts.

Rich

andrew...@gmail.com

unread,
Dec 18, 2017, 10:33:05 PM12/18/17
to taigaio
Hi Rich,

How does your bash script work?

ric...@gmail.com

unread,
Dec 18, 2017, 11:36:58 PM12/18/17
to taigaio
Hi Andrew,

It's been a while, but the gist for authentication through the Taiga API is the following:

1) Get auth_token (HTTP POST)
2) Get the project ID, used to be called the project slug (HTTP GET)

With these two values, we can pretty much do anything remotely with a project through the Taiga API (a great resource). See API Section 1.1 Authentication for details. Note that the acquired auth_token is time-sensitive (IIRC).

In our own use case for the bulk upload of user stories, we parse a local tab-delimited text file (no CSV) and HTTP POST the contents via the userstories API call.

The original bash script itself is available on Github as part of the larger taiga.io-scripts project (a collection of Taiga-related shell scripts). A caveat in that it's been a couple of years since these bash scripts were written, and the API may have changed. More recently, much of that same Taiga authentication functionality has been moved into a TypeScript service for Angular as part of the NG2 Taiga Task Activity Reports project. 

Either should be helpful in understanding the logic of remotely connecting to and interacting with a Taiga.io project through their API.

Rich
Reply all
Reply to author
Forward
0 new messages