2016-07-25 3 views
1

A Rubyの宝石を追加します。のJIRA API - 問題への1つまたは複数の添付ファイルを追加する方法JIRAのREST API <a href="https://github.com/sumoheavy/jira-ruby" rel="nofollow">https://github.com/sumoheavy/jira-ruby</a></p> <p>ための取り付け

EDIT#1

JIRA REST API: Issue attachments

それについての任意の提案ですか?

EDIT#2

私はいくつかの添付ファイルだけカールとを保存する方法を考え出しました。

curl -D- -u "username:password" -X POST -H "X-Atlassian-Token: no-check" -F "[email protected]/1.jpg" "https://jira.you_end_point/rest/api/2/issue/"issue-ID"/attachments" 
+0

「この宝石を存在問題に使う」とはどういう意味ですか? – siegy22

+0

EDIT#1。 - Jiraで問題を作成する。 - 問題にファイルを追加する。 –

答えて

1

これは、おそらく、ローカルファイルを削除する必要があり、この後

残り、クライアントの宝石

require 'rest-client' 
resource = RestClient::Resource.new(url, username, password) 
response = resource.post({ file: File.new(path)}, { "X-Atlassian-Token" => "nocheck"}) 
response.code.eql?(200) # ok status ;) 

私の解決策..です

私はこれを願っています助けになるでしょう!) do ne

関連する問題