ruboty-github_pr_release 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 103a3e009db56e427645e5880a06ff45b760fd4f
4
- data.tar.gz: 834f0a4b87015f4bc4a70e334d9f37765ba681df
3
+ metadata.gz: 74160653fc7bb35354b5ba4470d02119dff5c199
4
+ data.tar.gz: e9957fc5ab7f3c0bc5128eaf892d1b8f1a49d9ee
5
5
  SHA512:
6
- metadata.gz: 49050e9ff5b1cecf661e01a4a8185c74dd7dc63062ec8b7889d1aa33f79571a2b897bedea5fa8e191dc210e5131c69d279febbe67a4f98b2cc8086f2b5f29c8a
7
- data.tar.gz: d2ec0cbe211e851614362bfe190e1b0e143eb709aeceb9ba142592dc857da40a52741376f128b7473588a76c0bc3004ddbf675a0e3e0d1d4d26ce445650caf7a
6
+ metadata.gz: 1ccbc61542dc1bf372eed80cf2368868be9d73f07417f32ff4d69ba503318a29f85d6beb737c5be50f012c0a01faf9305f4e25ff50ae81c1429769010259a700
7
+ data.tar.gz: 4d50c1df298329da0dff6879c04f1f4ee580396db722bc49aaaae21cd54c19f9821670ba6fcab1f035a429f9efd6f2852fd8514e38c2f19e4ca3d8da026f9e2a
@@ -11,8 +11,10 @@ module Ruboty
11
11
  Ruboty.logger.debug("Found merged pull requests: #{merged_pr.size}")
12
12
  body = "Releasing these pull requests:\n\n"
13
13
  merged_pr.collect do |pr|
14
- num, title = /Merge pull request (?<merge_num>#\d+) from.*\n\n(?<merge_title>.*)/.match(pr.commit.message).captures
15
- body += "- [ ] #{num} #{title} @#{pr.author.login}\n"
14
+ if match = /Merge pull request (?<merge_num>#\d+) from.*\n\n(?<merge_title>.*)/.match(pr.commit.message)
15
+ num, title = match.captures
16
+ body += "- [ ] #{num} #{title} @#{pr.author.login}\n"
17
+ end
16
18
  end
17
19
  Ruboty.logger.debug("body: \n#{body}")
18
20
  # TODO: put slack login id if exists
@@ -34,7 +34,7 @@ module Ruboty
34
34
  diff = Diffy::Diff.new(old, new)
35
35
  if
36
36
  Ruboty.logger.debug("updating #{what}:\n#{diff.to_s(:color)}\n")
37
- message.reply("updating #{what}:\n#{diff}\n")
37
+ message.reply("updating #{what}:\n#{diff.to_s.gsub(/\\n/, '')}\n") unless diff.to_s.empty?
38
38
  end
39
39
  end
40
40
 
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module GithubPrRelease
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-github_pr_release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micahel H. Oshita
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-26 00:00:00.000000000 Z
11
+ date: 2017-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler