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 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 = %Q|{
21
- "title": "#{pull_request_title}",
22
- "base": "master",
23
- "head": "#{git_repository_owner}:#{current_git_branch}"
24
- }|.gsub(/\s/, '')
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
@@ -1,3 +1,3 @@
1
1
  module Trellish
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trellish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: