Sha256: d70e060359c4b802a8bd6b22426f143a6d2692ae8a6594ca13c8ddecae3d1cbe
Contents?: true
Size: 891 Bytes
Versions: 1
Compression:
Stored size: 891 Bytes
Contents
require 'json' module GetIssues class Error < StandardError; end def self.start(prefix_url,private_token,group_name,project_name,mile_stone_title) projects_string = `curl --header "PRIVATE-TOKEN: #{private_token}" "#{prefix_url}"` projects_json = JSON.parse(projects_string) project_json = projects_json.filter{|t| t["name"]==project_name}&.first project_id = project_json["id"] milestones_string = `curl --header "PRIVATE-TOKEN: #{private_token}" "#{prefix_url}/#{project_id}/milestones"` milestones_json = JSON.parse(milestones_string) mile_stone_json = milestones_json.filter{|t| t["title"]==milestone_title}&.first mile_stone_id = mile_stone_json["id"] issues_string = `curl --header "PRIVATE-TOKEN: #{private_token}" "#{prefix_url}/#{project_id}/milestones/#{mile_stone_id}/issues"` issues_json = JSON.parse(issues_string) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
get_issues-0.1.0 | lib/get_issues.rb |