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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/github/nippou.rb +15 -8
- data/lib/github/nippou/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cc2a59178232b6c9fa3abedc1ca65a18bd7fb99
|
4
|
+
data.tar.gz: aa96e04421d3a6c09f7738ae20652ebda184048a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 144761183ef4fb0b463824ebd367caf77c499b814cfeaf316aaf7f99db43954914153c48a6dc1513dbb32b9855770ef72a15a7bb129598e3ff9a1d16db5674a2
|
7
|
+
data.tar.gz: c53d0301724b063c084f052170307104b412d5e171eb9ff6acdb66991d711fa1a506ef2be89b9515993add0395878992e59bbed17105792bde2e8b669511d7eb
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/github/nippou.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
20
|
-
|
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
|
-
|
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
|
-
|
28
|
-
detail[:
|
29
|
-
|
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
|
|