Skip to content

Commit

Permalink
Fix update-oncall script for large issue lists
Browse files Browse the repository at this point in the history
  • Loading branch information
zerowidth committed Jul 11, 2022
1 parent 06b0791 commit 8898fa5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dot_local/bin/executable_update-oncall
Expand Up @@ -116,9 +116,8 @@ puts "updating issue ##{issue["number"]}: #{issue["title"]}"
# find nines issues assigned to me
since = (Date.today - 7).iso8601
puts "fetching nines alerts"
nines = JSON.parse(sh("gh api -X GET 'repos/github/nines/issues' -f assignee=#{user} -f state=all -f per_page=100 -f direction=asc -f since=#{since}"))
nines = JSON.parse(sh("gh api -X GET 'repos/github/nines/issues' -f assignee=#{user} -f state=all -f per_page=100 -f direction=asc -f since=#{since} --paginate | jq 'reduce inputs as $i (.; . += $i)'"))
issues = nines.map { |data| NinesIssue.new(data) }.group_by(&:severity)
raise "uh oh too many nines, need pagination" if nines.length >= 100

sections = split_markdown_sections(issue["body"])
sections = sections.map do |section|
Expand Down

0 comments on commit 8898fa5

Please sign in to comment.