github-nippou 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +10 -2
- data/Rakefile +3 -3
- data/github-nippou.gemspec +10 -10
- data/lib/github/nippou.rb +3 -8
- data/lib/github/nippou/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74f77e32a23cca62a0a455d6b2331e8425c790c1
|
4
|
+
data.tar.gz: 561f495e19b8bf55fd1b0c2c1ab1b1a2364244fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59d80bcc7724eb41490c1ada12423348ffb427652f2fc6126fb509865adc6acce6455a20f8b94dea5f2ea1eeed5c2137210dd9090a7682ce8626d91c9be27c38
|
7
|
+
data.tar.gz: f7d2b08ea28c2faa9ab04ed52dfba6669cea70ac8c18e8683d8f85e7805279a3fae17b8fddaccefc6ccd63b8398f183ee08a92080c426396f725a0dff727c4d2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# Github::Nippou
|
2
2
|
|
3
|
-
|
3
|
+
Outputs today's your GitHub action.
|
4
|
+
|
5
|
+
This is a helpful tool when you write a daily report in reference to
|
6
|
+
GitHub. nippou is a japanese word which means a daily report.
|
4
7
|
|
5
8
|
## Installation
|
6
9
|
|
@@ -18,9 +21,14 @@ Or install it yourself as:
|
|
18
21
|
|
19
22
|
$ gem install github-nippou
|
20
23
|
|
24
|
+
## Setup
|
25
|
+
|
26
|
+
$ git config --global github-nippou.user [Your GitHub account]
|
27
|
+
$ git config --global github-nippou.token [Your GitHub access token]
|
28
|
+
|
21
29
|
## Usage
|
22
30
|
|
23
|
-
|
31
|
+
$ github-nippou
|
24
32
|
|
25
33
|
## Contributing
|
26
34
|
|
data/Rakefile
CHANGED
data/github-nippou.gemspec
CHANGED
@@ -4,26 +4,26 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'github/nippou/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'github-nippou'
|
8
8
|
spec.version = Github::Nippou::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Takashi Masuda']
|
10
|
+
spec.email = ['masutaka.net@gmail.com']
|
11
11
|
spec.summary = %q{Outputs today's your GitHub action.}
|
12
12
|
spec.description = <<-EOS
|
13
13
|
This is a helpful tool when you write a daily report in reference to
|
14
14
|
GitHub. nippou is a japanese word which means a daily report.
|
15
15
|
EOS
|
16
|
-
spec.homepage =
|
17
|
-
spec.license =
|
16
|
+
spec.homepage = 'https://github.com/masutaka/github-nippou'
|
17
|
+
spec.license = 'MIT'
|
18
18
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0")
|
20
20
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
21
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
|
-
spec.require_paths = [
|
22
|
+
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_dependency
|
24
|
+
spec.add_dependency 'octokit', '~> 3.7'
|
25
25
|
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency
|
28
|
-
spec.add_development_dependency
|
26
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
27
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
29
29
|
end
|
data/lib/github/nippou.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'github/nippou/version'
|
2
2
|
require 'octokit'
|
3
3
|
|
4
4
|
module Github
|
@@ -13,17 +13,12 @@ module Github
|
|
13
13
|
events.each do |_|
|
14
14
|
break unless _.created_at.getlocal.to_date == Time.now.to_date
|
15
15
|
case _.type
|
16
|
-
when
|
16
|
+
when 'IssuesEvent', 'IssueCommentEvent'
|
17
17
|
title = _.payload.issue.title.gsub('`', '\\\`')
|
18
18
|
repo_basename = _.repo.name.sub('feedforce/', '')
|
19
19
|
merged = client.pull_merged?(_.repo.name, _.payload.issue.number)
|
20
20
|
url_to_detail[_.payload.issue.html_url] ||= {title: title, repo_basename: repo_basename, username: _.payload.issue.user.login, merged: merged}
|
21
|
-
when
|
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}
|
26
|
-
when "PullRequestEvent"
|
21
|
+
when 'PullRequestEvent', 'PullRequestReviewCommentEvent'
|
27
22
|
title = _.payload.pull_request.title.gsub('`', '\\\`')
|
28
23
|
repo_basename = _.repo.name.sub('feedforce/', '')
|
29
24
|
merged = client.pull_merged?(_.repo.name, _.payload.pull_request.number)
|
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: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Masuda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|