Skip to content

Instantly share code, notes, and snippets.

@elliottwilliams
Created May 12, 2019 06:40
Show Gist options
  • Save elliottwilliams/7f5498216b2606421a014f82478a4e80 to your computer and use it in GitHub Desktop.
Save elliottwilliams/7f5498216b2606421a014f82478a4e80 to your computer and use it in GitHub Desktop.
183 issues opened during the #NoTechForICE demonstration

Since GitHub's API differentiates between deleted issues and issues that never existed, we can see how many issues were created and deleted during the #NoTechForICE demonstration.

There were at least 183 issues opened today. That's pretty cool!

Context

On 2019 May 11, tech workers were protesting Palantir's relationship with ICE by opening issues on a number of Palantir's open source libraries. ICE uses Palantir's software to coordinate the deportation of immigrant families and children in the United States. Read more at https://gist.github.com/noahzgordon/29af8c13106ddc591ccaa1ea0ce6af74.

require 'net/http'
starting_numbers = {
blueprint: 3518,
tslint: 4700,
plottable: 3494,
"python-language-server": 554,
atlasdb: 3999,
"tslint-react": 214
}
api = Net::HTTP.start("api.github.com", :use_ssl => true)
ice_issues = starting_numbers.map do |repo, start|
indices = ((start+1)...)
deleted_issue_numbers = indices.take_while do |i|
head = Net::HTTP::Head.new("/repos/palantir/#{repo}/issues/#{i}")
# head.basic_auth(USERNAME, PASSWORD)
response = api.request(head)
puts("#{i}: #{response}")
not response.is_a? Net::HTTPNotFound
end
[repo, deleted_issue_numbers]
end.to_h
# {:blueprint=>[3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3552],
# :tslint=>[4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 4730],
# :plottable=>[3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524],
# :"python-language-server"=>[555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587],
# :atlasdb=>[4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030],
# :"tslint-react"=>[215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239]}
ice_issues.values.reduce(0) { |total, list| total + list.count }
# => 183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment