rok commented on code in PR #33791: URL: https://github.com/apache/arrow/pull/33791#discussion_r1083554815
########## dev/release/02-source-test.rb: ########## @@ -93,33 +93,26 @@ def test_python_version end def test_vote - jira_url = "https://issues.apache.org/jira" - jql_conditions = [ - "project = ARROW", - "status in (Resolved, Closed)", - "fixVersion = #{@release_version}", - ] - jql = jql_conditions.join(" AND ") + github_token = ENV["ARROW_GITHUB_API_TOKEN"] + uri = URI.parse("https://api.github.com/graphql") + https = Net::HTTP.new(uri.host, uri.port) + https.use_ssl = true + req = Net::HTTP::Post.new(uri.path, initheader = {"Authorization" => "Bearer #{github_token}"}) + + n_issues_query = "{\"query\":\"query {search(query: \\\"repo:apache/arrow is:issue is:closed milestone:#{@release_version}\\\", type:ISSUE) {issueCount}}\"}" + req.body = n_issues_query n_resolved_issues = nil - search_url = URI("#{jira_url}/rest/api/2/search?jql=#{CGI.escape(jql)}") - search_url.open do |response| - n_resolved_issues = JSON.parse(response.read)["total"] + https.request(req) do |response| + n_resolved_issues = JSON.parse(response.body)["data"]["search"]["issueCount"] end Review Comment: Used your proposal. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
