gplan 0.0.10 → 0.0.11

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.
Files changed (2) hide show
  1. data/lib/github.rb +3 -3
  2. metadata +2 -2
@@ -39,7 +39,7 @@ class Github
39
39
  # if story url like "user/repo_name#123"
40
40
  unless pr_id
41
41
  story = repo_name.split '#'
42
- repo_name = story[0]
42
+ repo_name = story[0].empty? ? get_repo_name : story[0]
43
43
  pr_id = story[1]
44
44
  end
45
45
  pr = HTTParty.get( pulls_url(repo_name, pr_id), HEADERS ).parsed_response
@@ -73,13 +73,13 @@ class Github
73
73
  # used to extract linked issues from the description follow githubs linking issue linking matchers
74
74
  def extract_linked_issues(pr)
75
75
  body = pr['body']
76
- regex = /(close|close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)(\s)+((\w*\/\w*)?#(\d+))/im
76
+ regex = /(?:close|close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|connect(?:s)?(?:ed)?\sto?)\s?+((\w*\/\w*)?#(\d+))/im
77
77
  linked_issues = body.scan(regex)
78
78
  return if linked_issues.nil?
79
79
 
80
80
  pr['linked_issues'] = []
81
81
  linked_issues.each do |linked_issue|
82
- pr['linked_issues'] << get_story(linked_issue[2]) unless linked_issue[2].nil?
82
+ pr['linked_issues'] << get_story(linked_issue[0]) unless linked_issue[0].nil?
83
83
  end
84
84
  pr
85
85
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gplan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-11 00:00:00.000000000 Z
12
+ date: 2015-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty