github-nippou 0.0.2 → 0.1.0

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: 1bb724335313bf7004835f34554f720e96cd387a
4
- data.tar.gz: d61fbe1cb8978dc0e91f07ed2cee0eb0bc7fcf53
3
+ metadata.gz: 2cc2a59178232b6c9fa3abedc1ca65a18bd7fb99
4
+ data.tar.gz: aa96e04421d3a6c09f7738ae20652ebda184048a
5
5
  SHA512:
6
- metadata.gz: ded3ad1220b31d024ba9dba45c4f046a311d11e536d95e0f11e9cc7841606443e974c3d11d804291a499ec7f83e0a19752055bc57529fc18cd8af08567371d03
7
- data.tar.gz: 6a9e4ac6dd0dffe8ffef06372c2ef50976aa0352c7686090466d6650c9ff56ff8793c4761410e8173d522ffa22941af7e381bbb155d8837c690eba4f949dab5d
6
+ metadata.gz: 144761183ef4fb0b463824ebd367caf77c499b814cfeaf316aaf7f99db43954914153c48a6dc1513dbb32b9855770ef72a15a7bb129598e3ff9a1d16db5674a2
7
+ data.tar.gz: c53d0301724b063c084f052170307104b412d5e171eb9ff6acdb66991d711fa1a506ef2be89b9515993add0395878992e59bbed17105792bde2e8b669511d7eb
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  *.gem
2
2
  /.bundle
3
+ /.envrc
3
4
  /vendor/bundle
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-nippou (0.0.2)
4
+ github-nippou (0.1.0)
5
5
  octokit (~> 3.7)
6
6
 
7
7
  GEM
@@ -14,20 +14,27 @@ module Github
14
14
  break unless _.created_at.getlocal.to_date == Time.now.to_date
15
15
  case _.type
16
16
  when "IssuesEvent"
17
- url_to_detail[_.payload.issue.html_url] ||= {title: _.payload.issue.title, comments: []}
17
+ title = _.payload.issue.title.gsub('`', '\\\`')
18
+ repo_basename = _.repo.name.sub('feedforce/', '')
19
+ merged = client.pull_merged?(_.repo.name, _.payload.issue.number)
20
+ url_to_detail[_.payload.issue.html_url] ||= {title: title, repo_basename: repo_basename, username: _.payload.issue.user.login, merged: merged}
18
21
  when "IssueCommentEvent"
19
- url_to_detail[_.payload.issue.html_url] ||= {title: _.payload.issue.title, comments: []}
20
- url_to_detail[_.payload.issue.html_url][:comments] << _.payload.comment.html_url
22
+ title = _.payload.issue.title.gsub('`', '\\\`')
23
+ repo_basename = _.repo.name.sub('feedforce/', '')
24
+ merged = client.pull_merged?(_.repo.name, _.payload.issue.number)
25
+ url_to_detail[_.payload.issue.html_url] ||= {title: title, repo_basename: repo_basename, username: _.payload.issue.user.login, merged: merged}
21
26
  when "PullRequestEvent"
22
- url_to_detail[_.payload.pull_request.html_url] ||= {title: _.payload.pull_request.title, comments: []}
27
+ title = _.payload.pull_request.title.gsub('`', '\\\`')
28
+ repo_basename = _.repo.name.sub('feedforce/', '')
29
+ merged = client.pull_merged?(_.repo.name, _.payload.pull_request.number)
30
+ url_to_detail[_.payload.pull_request.html_url] ||= {title: title, repo_basename: repo_basename, username: _.payload.pull_request.user.login, merged: merged}
23
31
  end
24
32
  end
25
33
 
26
34
  url_to_detail.each do |url, detail|
27
- puts "- #{detail[:title]} #{url}"
28
- detail[:comments].reverse.each do |comment|
29
- puts " * #{comment}"
30
- end
35
+ line = "* [#{detail[:title]} - #{detail[:repo_basename]}](#{url}) by #{detail[:username]}"
36
+ line << ' **merged!**' if detail[:merged]
37
+ puts line
31
38
  end
32
39
  end
33
40
 
@@ -1,5 +1,5 @@
1
1
  module Github
2
2
  module Nippou
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-nippou
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Masuda