github-nippou 1.1.1 → 1.2.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: 9305f2aaccbbe5b9abc0a10509bd9010c1b1675e
4
- data.tar.gz: 4337e711aa27585ae6b677eebd98b41f807e8800
3
+ metadata.gz: b2fc65a5d317d5e2fb3eb3981317283b208ce4c3
4
+ data.tar.gz: 5dc2731edf57ac227fb2ac9945462c99149d0d36
5
5
  SHA512:
6
- metadata.gz: 08ade5d7ce8192483cdd5380b809b61740dae7401152d9f739a9f1496a047ef416da43fede177175e2b98419e59f60f319e921cb423ba8d1e028f6145be88d4c
7
- data.tar.gz: f59a9d87ca3e1b9ba1a847f828300336f8fc6b83fd97155b5dd5aa518eb5e44180292798dc0c27e1e1ff1fb4f33498bedff77a16aa5aed78940054b469be43dc
6
+ metadata.gz: c605539e14192e274703a38b015ec784d13adf475e8809d400d81e605356858f347c9acb1413542d7e7dc0906297aee199fb9ffe48bb7d0523bc5c4c8c1dbb7d
7
+ data.tar.gz: 42f9b41d7ca288574f6bf553818fe07b6cf682da28eac025950588f22dce9af0763c83483f0ba230877b2917e8190d60710ca5b2e4310b64057a22b52f8f7319
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-nippou (1.1.1)
4
+ github-nippou (1.2.0)
5
5
  octokit
6
6
  thor
7
7
 
@@ -22,7 +22,11 @@ module Github
22
22
  def list
23
23
  nippous.each do |url, detail|
24
24
  line = "* [#{detail[:title]} - #{detail[:repo_basename]}](#{url}) by #{detail[:username]}"
25
- line << ' **merged!**' if detail[:merged]
25
+ if detail[:merged]
26
+ line << ' **merged!**'
27
+ elsif detail[:state] == 'closed'
28
+ line << ' **closed!**'
29
+ end
26
30
  puts line
27
31
  end
28
32
  end
@@ -46,7 +50,7 @@ module Github
46
50
  end
47
51
  end
48
52
 
49
- result
53
+ result.sort
50
54
  end
51
55
 
52
56
  def skip?(event, now)
@@ -103,13 +107,15 @@ MESSAGE
103
107
  def hash_for_issue(repo, issue)
104
108
  title = issue.title.markdown_escape
105
109
  merged = client.pull_merged?(repo.name, issue.number)
106
- {title: title, repo_basename: repo.name, username: issue.user.login, merged: merged}
110
+ state = client.issue(repo.name, issue.number).state
111
+ {title: title, repo_basename: repo.name, username: issue.user.login, merged: merged, state: state}
107
112
  end
108
113
 
109
114
  def hash_for_pr(repo, pr)
110
115
  title = pr.title.markdown_escape
111
116
  merged = client.pull_merged?(repo.name, pr.number)
112
- {title: title, repo_basename: repo.name, username: pr.user.login, merged: merged}
117
+ state = client.pull_request(repo.name, pr.number).state
118
+ {title: title, repo_basename: repo.name, username: pr.user.login, merged: merged, state: state}
113
119
  end
114
120
  end
115
121
  end
@@ -1,5 +1,5 @@
1
1
  module Github
2
2
  module Nippou
3
- VERSION = '1.1.1'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-nippou
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Masuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-21 00:00:00.000000000 Z
11
+ date: 2016-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.4.8
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Print today's your GitHub action.