trellish 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/trellish/git.rb +6 -11
- data/lib/trellish/version.rb +1 -1
- metadata +1 -1
data/lib/trellish/git.rb
CHANGED
@@ -4,7 +4,7 @@ module Trellish
|
|
4
4
|
module Git
|
5
5
|
|
6
6
|
def current_git_branch
|
7
|
-
@current_git_branch ||= `cat .git/head`.split('/').last
|
7
|
+
@current_git_branch ||= `cat .git/head`.split('/').last.strip
|
8
8
|
end
|
9
9
|
|
10
10
|
def github_pull_request_url
|
@@ -17,12 +17,11 @@ module Trellish
|
|
17
17
|
req.url "/repos/#{git_repository_owner}/#{git_repository_name}/pulls"
|
18
18
|
req.headers['Content-Type'] = 'application/json'
|
19
19
|
req.headers['Authorization'] = "token #{Trellish.config[:github_oauth_token]}"
|
20
|
-
req.body =
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
true
|
20
|
+
req.body = {
|
21
|
+
title: @card.name,
|
22
|
+
base: "master",
|
23
|
+
head: "#{git_repository_owner}:#{current_git_branch}"
|
24
|
+
}.to_json
|
26
25
|
end
|
27
26
|
@github_pull_request_url = JSON.parse(response.body)["html_url"]
|
28
27
|
end
|
@@ -39,10 +38,6 @@ module Trellish
|
|
39
38
|
@matches ||= matches = remote_url.match(%r|^git@github.com:([^/]*)\/([^\.]*)\.git$|)
|
40
39
|
end
|
41
40
|
|
42
|
-
def pull_request_title
|
43
|
-
@pull_request_title ||= `git show -s --format=%s head`
|
44
|
-
end
|
45
|
-
|
46
41
|
def remote_url
|
47
42
|
@remote_url ||= `git config remote.origin.url`
|
48
43
|
end
|
data/lib/trellish/version.rb
CHANGED