Skip to content

Commit 414e06d

Browse files
committed
link directly to the PR on github
1 parent 2c47b61 commit 414e06d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

assets/lib/common.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def sha
5656
end
5757

5858
def url
59-
@pr['url']
59+
@pr['html_url']
6060
end
6161

6262
private

assets/lib/in.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def ref
2828
system('git submodule update --init --recursive 1>&2')
2929
system("git fetch -q origin pull/#{id}/head:pr-#{id} 1>&2")
3030
system("git checkout pr-#{id} 1>&2")
31-
system("git config --add pullrequest.url #{pr['url']} 1>&2")
31+
system("git config --add pullrequest.url #{pr['html_url']} 1>&2")
3232
system("git config --add pullrequest.id #{pr['number']} 1>&2")
3333
end
3434

3535
puts JSON.generate(version: { ref: ref, pr: id.to_s },
36-
metadata: [{ name: 'url', value: pr['url'] }])
36+
metadata: [{ name: 'url', value: pr['html_url'] }])

spec/integration/in_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def commit(msg)
2323

2424
before do
2525
proxy.stub('https://api.github.com:443/repos/jtarchie/test/pulls/1')
26-
.and_return(json: { url: 'http://example.com', number: 1 })
26+
.and_return(json: { html_url: 'http://example.com', number: 1 })
2727

2828
git('init -q')
2929
@ref = commit('init')

spec/integration/out_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def request_body(method, url)
5353
git('config --add pullrequest.id 1')
5454
proxy.stub('https://api.github.com:443/repos/jtarchie/test/pulls/1')
5555
.and_return(json: {
56-
url: 'http://example.com',
56+
html_url: 'http://example.com',
5757
number: 1,
5858
head: { sha: 'abcdef' }
5959
})

0 commit comments

Comments
 (0)