Skip to content

Instantly share code, notes, and snippets.

@dtan4
Created April 13, 2016 06:36
Show Gist options
  • Save dtan4/760ecb454ca5808aca73d62d9267cea7 to your computer and use it in GitHub Desktop.
Save dtan4/760ecb454ca5808aca73d62d9267cea7 to your computer and use it in GitHub Desktop.
Generate Pull Request list in Markdown list format
$ ./pr.rb wantedly/paus-frontend
- [#1 説明書きの変更](https://github.com/wantedly/paus-frontend/pull/1)
- [#2 Delete ssh/config](https://github.com/wantedly/paus-frontend/pull/2)
- [#3 Add tutorial](https://github.com/wantedly/paus-frontend/pull/3)
- [#4 Add message](https://github.com/wantedly/paus-frontend/pull/4)
- [#5 Add username](https://github.com/wantedly/paus-frontend/pull/5)
- [#6 URL一覧ページの追加](https://github.com/wantedly/paus-frontend/pull/6)
- [#7 UsernameでURLを絞り込めるようにした](https://github.com/wantedly/paus-frontend/pull/7)
- [#8 Fix typo](https://github.com/wantedly/paus-frontend/pull/8)
- [#9 Add target attribute](https://github.com/wantedly/paus-frontend/pull/9)
- [#10 Install dependencies by `make deps`](https://github.com/wantedly/paus-frontend/pull/10)
- [#11 Use golang etcd client](https://github.com/wantedly/paus-frontend/pull/11)
- [#12 Modify docker-build task](https://github.com/wantedly/paus-frontend/pull/12)
#!/usr/bin/env ruby
require "json"
require "open-uri"
body = open("https://api.github.com/repos/#{ARGV[0]}/pulls?state=closed").read
result = JSON.parse(body, symbolize_names: true)
result.reverse.each do |pr|
puts "- [##{pr[:number]} #{pr[:title]}](#{pr[:html_url]})"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment