git-pr-release-roadrunner 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,205 @@
1
+ require 'erb'
2
+ require 'uri'
3
+ require 'open3'
4
+ require 'json'
5
+ require 'colorize'
6
+ require 'diff/lcs'
7
+
8
+ module Git
9
+ module Pr
10
+ module Release
11
+ module Util
12
+ def host_and_repository_and_scheme
13
+ @host_and_repository_and_scheme ||= begin
14
+ remote = git(:config, 'remote.origin.url').first.chomp
15
+ unless %r(^\w+://) === remote
16
+ remote = "ssh://#{remote.sub(':', '/')}"
17
+ end
18
+
19
+ remote_url = URI.parse(remote)
20
+ repository = remote_url.path.sub(%r(^/), '').sub(/\.git$/, '')
21
+
22
+ host = remote_url.host == 'github.com' ? nil : remote_url.host
23
+ [ host, repository, remote_url.scheme === 'http' ? 'http' : 'https' ]
24
+ end
25
+ end
26
+
27
+ def say(message, level)
28
+ color = case level
29
+ when :trace
30
+ return unless ENV['DEBUG']
31
+ nil
32
+ when :debug
33
+ return unless ENV['DEBUG']
34
+ :blue
35
+ when :info
36
+ :green
37
+ when :notice
38
+ :yellow
39
+ when :warn
40
+ :magenta
41
+ when :error
42
+ :red
43
+ end
44
+
45
+ STDERR.puts message.colorize(color)
46
+ end
47
+
48
+ def git(*command)
49
+ command = [ 'git', *command.map(&:to_s) ]
50
+ say "Executing `#{command.join(' ')}`", :trace
51
+ out, status = Open3.capture2(*command)
52
+ unless status.success?
53
+ raise "Executing `#{command.join(' ')}` failed: #{status}"
54
+ end
55
+ out.each_line
56
+ end
57
+
58
+ def git_config(key)
59
+ host, _ = host_and_repository_and_scheme()
60
+
61
+ plain_key = [ 'pr-release', key ].join('.')
62
+ host_aware_key = [ 'pr-release', host, key ].compact.join('.')
63
+
64
+ begin
65
+ git(:config, '-f', '.git-pr-release', plain_key).first.chomp
66
+ rescue
67
+ git(:config, host_aware_key).first.chomp rescue nil
68
+ end
69
+ end
70
+
71
+ def git_config_set(key, value)
72
+ host, _ = host_and_repository_and_scheme()
73
+ host_aware_key = [ 'pr-release', host, key ].compact.join('.')
74
+
75
+ git :config, '--global', host_aware_key, value
76
+ end
77
+
78
+ # First line will be the title of the PR
79
+ DEFAULT_PR_TEMPLATE = <<ERB
80
+ Release <%= Time.now %>
81
+ <% pull_requests.each do |pr| -%>
82
+ <%= pr.to_checklist_item %>
83
+ <% end -%>
84
+ ERB
85
+
86
+ def build_pr_title_and_body(release_pr, merged_prs, changed_files, template_path)
87
+ release_pull_request = target_pull_request = release_pr ? PullRequest.new(release_pr) : DummyPullRequest.new
88
+ merged_pull_requests = pull_requests = merged_prs.map { |pr| PullRequest.new(pr) }
89
+
90
+ template = if template_path
91
+ template_fullpath = File.join(git('rev-parse', '--show-toplevel').first.chomp, template_path)
92
+ File.read(template_fullpath)
93
+ else
94
+ DEFAULT_PR_TEMPLATE
95
+ end
96
+
97
+ erb = if RUBY_VERSION >= '2.6'
98
+ ERB.new template, trim_mode: '-'
99
+ else
100
+ ERB.new template, nil, '-'
101
+ end
102
+ content = erb.result binding
103
+ content.split(/\n/, 2)
104
+ end
105
+
106
+ def dump_result_as_json(release_pr, merged_prs, changed_files)
107
+ puts( {
108
+ :release_pull_request => (release_pr ? PullRequest.new(release_pr) : DummyPullRequest.new).to_hash,
109
+ :merged_pull_requests => merged_prs.map { |pr| PullRequest.new(pr).to_hash },
110
+ :changed_files => changed_files.map { |file| file.to_hash }
111
+ }.to_json )
112
+ end
113
+
114
+ def merge_pr_body(old_body, new_body)
115
+ # Try to take over checklist statuses
116
+ pr_body_lines = []
117
+
118
+ check_status = {}
119
+ old_body.split(/\r?\n/).each { |line|
120
+ line.match(/^- \[(?<check_value>[ x])\] #(?<issue_number>\d+)/) { |m|
121
+ say "Found pull-request checkbox \##{m[:issue_number]} is #{m[:check_value]}.", :trace
122
+ check_status[m[:issue_number]] = m[:check_value]
123
+ }
124
+ }
125
+ old_body_unchecked = old_body.gsub /^- \[[ x]\] \#(\d+)/, '- [ ] #\1'
126
+
127
+ Diff::LCS.traverse_balanced(old_body_unchecked.split(/\r?\n/), new_body.split(/\r?\n/)) do |event|
128
+ say "diff: #{event.inspect}", :trace
129
+ action, old, new = *event
130
+ old_nr, old_line = *old
131
+ new_nr, new_line = *new
132
+
133
+ case action
134
+ when '=', '+'
135
+ say "Use line as is: #{new_line}", :trace
136
+ pr_body_lines << new_line
137
+ when '-'
138
+ say "Use old line: #{old_line}", :trace
139
+ pr_body_lines << old_line
140
+ when '!'
141
+ if [ old_line, new_line ].all? { |line| /^- \[ \]/ === line }
142
+ say "Found checklist diff; use old one: #{old_line}", :trace
143
+ pr_body_lines << old_line
144
+ else
145
+ # not a checklist diff, use both line
146
+ say "Use line as is: #{old_line}", :trace
147
+ pr_body_lines << old_line
148
+
149
+ say "Use line as is: #{new_line}", :trace
150
+ pr_body_lines << new_line
151
+ end
152
+ else
153
+ say "Unknown diff event: #{event}", :warn
154
+ end
155
+ end
156
+
157
+ merged_body = pr_body_lines.join("\n")
158
+ check_status.each { |issue_number, check_value|
159
+ say "Update pull-request checkbox \##{issue_number} to #{check_value}.", :trace
160
+ merged_body.gsub! /^- \[ \] \##{issue_number}/, "- [#{check_value}] \##{issue_number}"
161
+ }
162
+
163
+ merged_body
164
+ end
165
+
166
+ def obtain_token!
167
+ token = ENV.fetch('GIT_PR_RELEASE_TOKEN') { git_config('token') }
168
+
169
+ unless token
170
+ require 'highline/import'
171
+ STDERR.puts 'Could not obtain GitHub API token.'
172
+ STDERR.puts 'Trying to generate token...'
173
+
174
+ username = ask('username? ') { |q| q.default = ENV['USER'] }
175
+ password = ask('password? (not saved) ') { |q| q.echo = '*' }
176
+
177
+ temporary_client = Octokit::Client.new :login => username, :password => password
178
+
179
+ auth = request_authorization(temporary_client, nil)
180
+
181
+ token = auth.token
182
+ git_config_set 'token', token
183
+ end
184
+
185
+ token
186
+ end
187
+
188
+ def request_authorization(client, two_factor_code)
189
+ params = { :scopes => [ 'public_repo', 'repo' ], :note => 'git-pr-release' }
190
+ params[:headers] = { "X-GitHub-OTP" => two_factor_code} if two_factor_code
191
+
192
+ auth = nil
193
+ begin
194
+ auth = client.create_authorization(params)
195
+ rescue Octokit::OneTimePasswordRequired
196
+ two_factor_code = ask('two-factor authentication code? ')
197
+ auth = request_authorization(client, two_factor_code)
198
+ end
199
+
200
+ auth
201
+ end
202
+ end
203
+ end
204
+ end
205
+ end
@@ -0,0 +1,11 @@
1
+ require "git/pr/release/util"
2
+ require "git/pr/release/pull_request"
3
+ require "git/pr/release/dummy_pull_request"
4
+ require "git/pr/release/cli"
5
+
6
+ module Git
7
+ module Pr
8
+ module Release
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ module Git
2
+ module Pr
3
+ module Release
4
+ module Roadrunner
5
+ VERSION: String
6
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
7
+ end
8
+ end
9
+ end
10
+ end
data/spec/.DS_Store ADDED
Binary file
Binary file
@@ -0,0 +1,330 @@
1
+ ---
2
+ :url: https://api.github.com/repos/motemen/git-pr-release/pulls/1
3
+ :id: 13194147
4
+ :node_id: MDExOlB1bGxSZXF1ZXN0MTMxOTQxNDc=
5
+ :html_url: https://github.com/motemen/git-pr-release/pull/1
6
+ :diff_url: https://github.com/motemen/git-pr-release/pull/1.diff
7
+ :patch_url: https://github.com/motemen/git-pr-release/pull/1.patch
8
+ :issue_url: https://api.github.com/repos/motemen/git-pr-release/issues/1
9
+ :number: 1
10
+ :state: closed
11
+ :locked: false
12
+ :title: No need to append key prefix for template config
13
+ :user:
14
+ :login: hakobe
15
+ :id: 6882
16
+ :node_id: MDQ6VXNlcjY4ODI=
17
+ :avatar_url: https://avatars0.githubusercontent.com/u/6882?v=4
18
+ :gravatar_id: ''
19
+ :url: https://api.github.com/users/hakobe
20
+ :html_url: https://github.com/hakobe
21
+ :followers_url: https://api.github.com/users/hakobe/followers
22
+ :following_url: https://api.github.com/users/hakobe/following{/other_user}
23
+ :gists_url: https://api.github.com/users/hakobe/gists{/gist_id}
24
+ :starred_url: https://api.github.com/users/hakobe/starred{/owner}{/repo}
25
+ :subscriptions_url: https://api.github.com/users/hakobe/subscriptions
26
+ :organizations_url: https://api.github.com/users/hakobe/orgs
27
+ :repos_url: https://api.github.com/users/hakobe/repos
28
+ :events_url: https://api.github.com/users/hakobe/events{/privacy}
29
+ :received_events_url: https://api.github.com/users/hakobe/received_events
30
+ :type: User
31
+ :site_admin: false
32
+ :body: "`git_config('pr-release.template')` loads config value from key `pr-release.pr-release.template`.\n"
33
+ :created_at: 2014-03-05 02:48:51.000000000 Z
34
+ :updated_at: 2014-07-10 03:13:44.000000000 Z
35
+ :closed_at: 2014-03-05 02:59:52.000000000 Z
36
+ :merged_at: 2014-03-05 02:59:52.000000000 Z
37
+ :merge_commit_sha: d40cebeaa7cd69c5eabb6e76de7314891d9cd743
38
+ :assignee:
39
+ :assignees: []
40
+ :requested_reviewers: []
41
+ :requested_teams: []
42
+ :labels: []
43
+ :milestone:
44
+ :commits_url: https://api.github.com/repos/motemen/git-pr-release/pulls/1/commits
45
+ :review_comments_url: https://api.github.com/repos/motemen/git-pr-release/pulls/1/comments
46
+ :review_comment_url: https://api.github.com/repos/motemen/git-pr-release/pulls/comments{/number}
47
+ :comments_url: https://api.github.com/repos/motemen/git-pr-release/issues/1/comments
48
+ :statuses_url: https://api.github.com/repos/motemen/git-pr-release/statuses/bbcd2a04ef394e91be44c24e93e52fdbca944060
49
+ :head:
50
+ :label: hakobe:fix/template-config-key
51
+ :ref: fix/template-config-key
52
+ :sha: bbcd2a04ef394e91be44c24e93e52fdbca944060
53
+ :user:
54
+ :login: hakobe
55
+ :id: 6882
56
+ :node_id: MDQ6VXNlcjY4ODI=
57
+ :avatar_url: https://avatars0.githubusercontent.com/u/6882?v=4
58
+ :gravatar_id: ''
59
+ :url: https://api.github.com/users/hakobe
60
+ :html_url: https://github.com/hakobe
61
+ :followers_url: https://api.github.com/users/hakobe/followers
62
+ :following_url: https://api.github.com/users/hakobe/following{/other_user}
63
+ :gists_url: https://api.github.com/users/hakobe/gists{/gist_id}
64
+ :starred_url: https://api.github.com/users/hakobe/starred{/owner}{/repo}
65
+ :subscriptions_url: https://api.github.com/users/hakobe/subscriptions
66
+ :organizations_url: https://api.github.com/users/hakobe/orgs
67
+ :repos_url: https://api.github.com/users/hakobe/repos
68
+ :events_url: https://api.github.com/users/hakobe/events{/privacy}
69
+ :received_events_url: https://api.github.com/users/hakobe/received_events
70
+ :type: User
71
+ :site_admin: false
72
+ :repo:
73
+ :id: 17425170
74
+ :node_id: MDEwOlJlcG9zaXRvcnkxNzQyNTE3MA==
75
+ :name: git-pr-release
76
+ :full_name: hakobe/git-pr-release
77
+ :private: false
78
+ :owner:
79
+ :login: hakobe
80
+ :id: 6882
81
+ :node_id: MDQ6VXNlcjY4ODI=
82
+ :avatar_url: https://avatars0.githubusercontent.com/u/6882?v=4
83
+ :gravatar_id: ''
84
+ :url: https://api.github.com/users/hakobe
85
+ :html_url: https://github.com/hakobe
86
+ :followers_url: https://api.github.com/users/hakobe/followers
87
+ :following_url: https://api.github.com/users/hakobe/following{/other_user}
88
+ :gists_url: https://api.github.com/users/hakobe/gists{/gist_id}
89
+ :starred_url: https://api.github.com/users/hakobe/starred{/owner}{/repo}
90
+ :subscriptions_url: https://api.github.com/users/hakobe/subscriptions
91
+ :organizations_url: https://api.github.com/users/hakobe/orgs
92
+ :repos_url: https://api.github.com/users/hakobe/repos
93
+ :events_url: https://api.github.com/users/hakobe/events{/privacy}
94
+ :received_events_url: https://api.github.com/users/hakobe/received_events
95
+ :type: User
96
+ :site_admin: false
97
+ :html_url: https://github.com/hakobe/git-pr-release
98
+ :description: Creates a pull request which summarizes feature branches that are
99
+ to be released into production
100
+ :fork: true
101
+ :url: https://api.github.com/repos/hakobe/git-pr-release
102
+ :forks_url: https://api.github.com/repos/hakobe/git-pr-release/forks
103
+ :keys_url: https://api.github.com/repos/hakobe/git-pr-release/keys{/key_id}
104
+ :collaborators_url: https://api.github.com/repos/hakobe/git-pr-release/collaborators{/collaborator}
105
+ :teams_url: https://api.github.com/repos/hakobe/git-pr-release/teams
106
+ :hooks_url: https://api.github.com/repos/hakobe/git-pr-release/hooks
107
+ :issue_events_url: https://api.github.com/repos/hakobe/git-pr-release/issues/events{/number}
108
+ :events_url: https://api.github.com/repos/hakobe/git-pr-release/events
109
+ :assignees_url: https://api.github.com/repos/hakobe/git-pr-release/assignees{/user}
110
+ :branches_url: https://api.github.com/repos/hakobe/git-pr-release/branches{/branch}
111
+ :tags_url: https://api.github.com/repos/hakobe/git-pr-release/tags
112
+ :blobs_url: https://api.github.com/repos/hakobe/git-pr-release/git/blobs{/sha}
113
+ :git_tags_url: https://api.github.com/repos/hakobe/git-pr-release/git/tags{/sha}
114
+ :git_refs_url: https://api.github.com/repos/hakobe/git-pr-release/git/refs{/sha}
115
+ :trees_url: https://api.github.com/repos/hakobe/git-pr-release/git/trees{/sha}
116
+ :statuses_url: https://api.github.com/repos/hakobe/git-pr-release/statuses/{sha}
117
+ :languages_url: https://api.github.com/repos/hakobe/git-pr-release/languages
118
+ :stargazers_url: https://api.github.com/repos/hakobe/git-pr-release/stargazers
119
+ :contributors_url: https://api.github.com/repos/hakobe/git-pr-release/contributors
120
+ :subscribers_url: https://api.github.com/repos/hakobe/git-pr-release/subscribers
121
+ :subscription_url: https://api.github.com/repos/hakobe/git-pr-release/subscription
122
+ :commits_url: https://api.github.com/repos/hakobe/git-pr-release/commits{/sha}
123
+ :git_commits_url: https://api.github.com/repos/hakobe/git-pr-release/git/commits{/sha}
124
+ :comments_url: https://api.github.com/repos/hakobe/git-pr-release/comments{/number}
125
+ :issue_comment_url: https://api.github.com/repos/hakobe/git-pr-release/issues/comments{/number}
126
+ :contents_url: https://api.github.com/repos/hakobe/git-pr-release/contents/{+path}
127
+ :compare_url: https://api.github.com/repos/hakobe/git-pr-release/compare/{base}...{head}
128
+ :merges_url: https://api.github.com/repos/hakobe/git-pr-release/merges
129
+ :archive_url: https://api.github.com/repos/hakobe/git-pr-release/{archive_format}{/ref}
130
+ :downloads_url: https://api.github.com/repos/hakobe/git-pr-release/downloads
131
+ :issues_url: https://api.github.com/repos/hakobe/git-pr-release/issues{/number}
132
+ :pulls_url: https://api.github.com/repos/hakobe/git-pr-release/pulls{/number}
133
+ :milestones_url: https://api.github.com/repos/hakobe/git-pr-release/milestones{/number}
134
+ :notifications_url: https://api.github.com/repos/hakobe/git-pr-release/notifications{?since,all,participating}
135
+ :labels_url: https://api.github.com/repos/hakobe/git-pr-release/labels{/name}
136
+ :releases_url: https://api.github.com/repos/hakobe/git-pr-release/releases{/id}
137
+ :deployments_url: https://api.github.com/repos/hakobe/git-pr-release/deployments
138
+ :created_at: 2014-03-05 02:20:59.000000000 Z
139
+ :updated_at: 2014-05-13 01:42:58.000000000 Z
140
+ :pushed_at: 2014-05-12 11:42:34.000000000 Z
141
+ :git_url: git://github.com/hakobe/git-pr-release.git
142
+ :ssh_url: git@github.com:hakobe/git-pr-release.git
143
+ :clone_url: https://github.com/hakobe/git-pr-release.git
144
+ :svn_url: https://github.com/hakobe/git-pr-release
145
+ :homepage: https://rubygems.org/gems/git-pr-release
146
+ :size: 236
147
+ :stargazers_count: 0
148
+ :watchers_count: 0
149
+ :language: Ruby
150
+ :has_issues: false
151
+ :has_projects: true
152
+ :has_downloads: true
153
+ :has_wiki: true
154
+ :has_pages: false
155
+ :forks_count: 0
156
+ :mirror_url:
157
+ :archived: false
158
+ :open_issues_count: 0
159
+ :license:
160
+ :forks: 0
161
+ :open_issues: 0
162
+ :watchers: 0
163
+ :default_branch: master
164
+ :base:
165
+ :label: motemen:master
166
+ :ref: master
167
+ :sha: adcd1d55438db0116f2583368466f1bf101ac0d0
168
+ :user:
169
+ :login: motemen
170
+ :id: 8465
171
+ :node_id: MDQ6VXNlcjg0NjU=
172
+ :avatar_url: https://avatars2.githubusercontent.com/u/8465?v=4
173
+ :gravatar_id: ''
174
+ :url: https://api.github.com/users/motemen
175
+ :html_url: https://github.com/motemen
176
+ :followers_url: https://api.github.com/users/motemen/followers
177
+ :following_url: https://api.github.com/users/motemen/following{/other_user}
178
+ :gists_url: https://api.github.com/users/motemen/gists{/gist_id}
179
+ :starred_url: https://api.github.com/users/motemen/starred{/owner}{/repo}
180
+ :subscriptions_url: https://api.github.com/users/motemen/subscriptions
181
+ :organizations_url: https://api.github.com/users/motemen/orgs
182
+ :repos_url: https://api.github.com/users/motemen/repos
183
+ :events_url: https://api.github.com/users/motemen/events{/privacy}
184
+ :received_events_url: https://api.github.com/users/motemen/received_events
185
+ :type: User
186
+ :site_admin: false
187
+ :repo:
188
+ :id: 15468156
189
+ :node_id: MDEwOlJlcG9zaXRvcnkxNTQ2ODE1Ng==
190
+ :name: git-pr-release
191
+ :full_name: motemen/git-pr-release
192
+ :private: false
193
+ :owner:
194
+ :login: motemen
195
+ :id: 8465
196
+ :node_id: MDQ6VXNlcjg0NjU=
197
+ :avatar_url: https://avatars2.githubusercontent.com/u/8465?v=4
198
+ :gravatar_id: ''
199
+ :url: https://api.github.com/users/motemen
200
+ :html_url: https://github.com/motemen
201
+ :followers_url: https://api.github.com/users/motemen/followers
202
+ :following_url: https://api.github.com/users/motemen/following{/other_user}
203
+ :gists_url: https://api.github.com/users/motemen/gists{/gist_id}
204
+ :starred_url: https://api.github.com/users/motemen/starred{/owner}{/repo}
205
+ :subscriptions_url: https://api.github.com/users/motemen/subscriptions
206
+ :organizations_url: https://api.github.com/users/motemen/orgs
207
+ :repos_url: https://api.github.com/users/motemen/repos
208
+ :events_url: https://api.github.com/users/motemen/events{/privacy}
209
+ :received_events_url: https://api.github.com/users/motemen/received_events
210
+ :type: User
211
+ :site_admin: false
212
+ :html_url: https://github.com/motemen/git-pr-release
213
+ :description: Release pull request generator
214
+ :fork: false
215
+ :url: https://api.github.com/repos/motemen/git-pr-release
216
+ :forks_url: https://api.github.com/repos/motemen/git-pr-release/forks
217
+ :keys_url: https://api.github.com/repos/motemen/git-pr-release/keys{/key_id}
218
+ :collaborators_url: https://api.github.com/repos/motemen/git-pr-release/collaborators{/collaborator}
219
+ :teams_url: https://api.github.com/repos/motemen/git-pr-release/teams
220
+ :hooks_url: https://api.github.com/repos/motemen/git-pr-release/hooks
221
+ :issue_events_url: https://api.github.com/repos/motemen/git-pr-release/issues/events{/number}
222
+ :events_url: https://api.github.com/repos/motemen/git-pr-release/events
223
+ :assignees_url: https://api.github.com/repos/motemen/git-pr-release/assignees{/user}
224
+ :branches_url: https://api.github.com/repos/motemen/git-pr-release/branches{/branch}
225
+ :tags_url: https://api.github.com/repos/motemen/git-pr-release/tags
226
+ :blobs_url: https://api.github.com/repos/motemen/git-pr-release/git/blobs{/sha}
227
+ :git_tags_url: https://api.github.com/repos/motemen/git-pr-release/git/tags{/sha}
228
+ :git_refs_url: https://api.github.com/repos/motemen/git-pr-release/git/refs{/sha}
229
+ :trees_url: https://api.github.com/repos/motemen/git-pr-release/git/trees{/sha}
230
+ :statuses_url: https://api.github.com/repos/motemen/git-pr-release/statuses/{sha}
231
+ :languages_url: https://api.github.com/repos/motemen/git-pr-release/languages
232
+ :stargazers_url: https://api.github.com/repos/motemen/git-pr-release/stargazers
233
+ :contributors_url: https://api.github.com/repos/motemen/git-pr-release/contributors
234
+ :subscribers_url: https://api.github.com/repos/motemen/git-pr-release/subscribers
235
+ :subscription_url: https://api.github.com/repos/motemen/git-pr-release/subscription
236
+ :commits_url: https://api.github.com/repos/motemen/git-pr-release/commits{/sha}
237
+ :git_commits_url: https://api.github.com/repos/motemen/git-pr-release/git/commits{/sha}
238
+ :comments_url: https://api.github.com/repos/motemen/git-pr-release/comments{/number}
239
+ :issue_comment_url: https://api.github.com/repos/motemen/git-pr-release/issues/comments{/number}
240
+ :contents_url: https://api.github.com/repos/motemen/git-pr-release/contents/{+path}
241
+ :compare_url: https://api.github.com/repos/motemen/git-pr-release/compare/{base}...{head}
242
+ :merges_url: https://api.github.com/repos/motemen/git-pr-release/merges
243
+ :archive_url: https://api.github.com/repos/motemen/git-pr-release/{archive_format}{/ref}
244
+ :downloads_url: https://api.github.com/repos/motemen/git-pr-release/downloads
245
+ :issues_url: https://api.github.com/repos/motemen/git-pr-release/issues{/number}
246
+ :pulls_url: https://api.github.com/repos/motemen/git-pr-release/pulls{/number}
247
+ :milestones_url: https://api.github.com/repos/motemen/git-pr-release/milestones{/number}
248
+ :notifications_url: https://api.github.com/repos/motemen/git-pr-release/notifications{?since,all,participating}
249
+ :labels_url: https://api.github.com/repos/motemen/git-pr-release/labels{/name}
250
+ :releases_url: https://api.github.com/repos/motemen/git-pr-release/releases{/id}
251
+ :deployments_url: https://api.github.com/repos/motemen/git-pr-release/deployments
252
+ :created_at: 2013-12-27 06:35:52.000000000 Z
253
+ :updated_at: 2019-02-18 01:40:52.000000000 Z
254
+ :pushed_at: 2018-11-15 10:45:07.000000000 Z
255
+ :git_url: git://github.com/motemen/git-pr-release.git
256
+ :ssh_url: git@github.com:motemen/git-pr-release.git
257
+ :clone_url: https://github.com/motemen/git-pr-release.git
258
+ :svn_url: https://github.com/motemen/git-pr-release
259
+ :homepage: https://rubygems.org/gems/git-pr-release
260
+ :size: 62
261
+ :stargazers_count: 359
262
+ :watchers_count: 359
263
+ :language: Ruby
264
+ :has_issues: true
265
+ :has_projects: true
266
+ :has_downloads: true
267
+ :has_wiki: true
268
+ :has_pages: false
269
+ :forks_count: 28
270
+ :mirror_url:
271
+ :archived: false
272
+ :open_issues_count: 6
273
+ :license:
274
+ :key: mit
275
+ :name: MIT License
276
+ :spdx_id: MIT
277
+ :url: https://api.github.com/licenses/mit
278
+ :node_id: MDc6TGljZW5zZTEz
279
+ :forks: 28
280
+ :open_issues: 6
281
+ :watchers: 359
282
+ :default_branch: master
283
+ :_links:
284
+ :self:
285
+ :href: https://api.github.com/repos/motemen/git-pr-release/pulls/1
286
+ :html:
287
+ :href: https://github.com/motemen/git-pr-release/pull/1
288
+ :issue:
289
+ :href: https://api.github.com/repos/motemen/git-pr-release/issues/1
290
+ :comments:
291
+ :href: https://api.github.com/repos/motemen/git-pr-release/issues/1/comments
292
+ :review_comments:
293
+ :href: https://api.github.com/repos/motemen/git-pr-release/pulls/1/comments
294
+ :review_comment:
295
+ :href: https://api.github.com/repos/motemen/git-pr-release/pulls/comments{/number}
296
+ :commits:
297
+ :href: https://api.github.com/repos/motemen/git-pr-release/pulls/1/commits
298
+ :statuses:
299
+ :href: https://api.github.com/repos/motemen/git-pr-release/statuses/bbcd2a04ef394e91be44c24e93e52fdbca944060
300
+ :author_association: COLLABORATOR
301
+ :merged: true
302
+ :mergeable:
303
+ :rebaseable:
304
+ :mergeable_state: unknown
305
+ :merged_by:
306
+ :login: motemen
307
+ :id: 8465
308
+ :node_id: MDQ6VXNlcjg0NjU=
309
+ :avatar_url: https://avatars2.githubusercontent.com/u/8465?v=4
310
+ :gravatar_id: ''
311
+ :url: https://api.github.com/users/motemen
312
+ :html_url: https://github.com/motemen
313
+ :followers_url: https://api.github.com/users/motemen/followers
314
+ :following_url: https://api.github.com/users/motemen/following{/other_user}
315
+ :gists_url: https://api.github.com/users/motemen/gists{/gist_id}
316
+ :starred_url: https://api.github.com/users/motemen/starred{/owner}{/repo}
317
+ :subscriptions_url: https://api.github.com/users/motemen/subscriptions
318
+ :organizations_url: https://api.github.com/users/motemen/orgs
319
+ :repos_url: https://api.github.com/users/motemen/repos
320
+ :events_url: https://api.github.com/users/motemen/events{/privacy}
321
+ :received_events_url: https://api.github.com/users/motemen/received_events
322
+ :type: User
323
+ :site_admin: false
324
+ :comments: 2
325
+ :review_comments: 0
326
+ :maintainer_can_modify: false
327
+ :commits: 1
328
+ :additions: 1
329
+ :deletions: 1
330
+ :changed_files: 1
@@ -0,0 +1,14 @@
1
+ ---
2
+ :sha: 2bcc5ec915521df50825ad08118665c66ad072be
3
+ :filename: bin/git-pr-release
4
+ :status: modified
5
+ :additions: 1
6
+ :deletions: 1
7
+ :changes: 2
8
+ :blob_url: https://github.com/motemen/git-pr-release/blob/bbcd2a04ef394e91be44c24e93e52fdbca944060/bin/git-pr-release
9
+ :raw_url: https://github.com/motemen/git-pr-release/raw/bbcd2a04ef394e91be44c24e93e52fdbca944060/bin/git-pr-release
10
+ :contents_url: https://api.github.com/repos/motemen/git-pr-release/contents/bin/git-pr-release?ref=bbcd2a04ef394e91be44c24e93e52fdbca944060
11
+ :patch: "@@ -87,7 +87,7 @@ def build_pr_title_and_body(prs)\n \n template = DEFAULT_PR_TEMPLATE\n
12
+ \n- if path = git_config('pr-release.template')\n+ if path = git_config('template')\n
13
+ \ template_path = File.join(git('rev-parse', '--show-toplevel').first.chomp,
14
+ path)\n template = File.read(template_path)\n end"