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.