saddler-reporter-github 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/saddler/reporter/github/client.rb +7 -7
- data/lib/saddler/reporter/github/commit_comment.rb +1 -1
- data/lib/saddler/reporter/github/commit_review_comment.rb +1 -1
- data/lib/saddler/reporter/github/patch.rb +11 -0
- data/lib/saddler/reporter/github/patches.rb +11 -0
- data/lib/saddler/reporter/github/pull_request_comment.rb +1 -1
- data/lib/saddler/reporter/github/pull_request_review_comment.rb +1 -1
- data/lib/saddler/reporter/github/repository.rb +11 -0
- data/lib/saddler/reporter/github/version.rb +1 -1
- data/lib/saddler/reporter/github.rb +3 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed53c2465b30855564e9f9dfa3938ac8294b8f74
|
4
|
+
data.tar.gz: e675834f83967673596154e3ac70ec1ea8c3ef73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 182b5dd22e03e7c71e376604380d04426ec53848906b83f827607e9a59a5267121ed193fb1ce0ca77e8f434083fa9ad1075876cc8f94ee499478b1a663c2a52b
|
7
|
+
data.tar.gz: c72a03e71e015ea649d02ada6f04d855d1a5da3f916f3af226a0bedf05f1e678128712e9c2cd43adc91b6d57ddd0c650a4ffbc35aaefa033fb5a7bb733d76479
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
<a name="0.2.0"></a>
|
2
|
+
# [0.2.0](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v0.1.6...v0.2.0) (2015-10-02)
|
3
|
+
|
4
|
+
|
5
|
+
### Features
|
6
|
+
|
7
|
+
* **patch:** use inherited patch, patches ([05e2306](https://github.com/packsaddle/ruby-saddler-reporter-github/commit/05e2306))
|
8
|
+
* **repository:** use inherited repository ([3834b1f](https://github.com/packsaddle/ruby-saddler-reporter-github/commit/3834b1f))
|
9
|
+
|
10
|
+
|
11
|
+
|
1
12
|
<a name="0.1.6"></a>
|
2
13
|
## [0.1.6](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v0.1.5...v0.1.6) (2015-10-02)
|
3
14
|
|
@@ -3,7 +3,7 @@ module Saddler
|
|
3
3
|
module Github
|
4
4
|
# GitHub client wrapper
|
5
5
|
class Client
|
6
|
-
# @param repo [
|
6
|
+
# @param repo [Repository] git repository
|
7
7
|
def initialize(repo)
|
8
8
|
@repo = repo
|
9
9
|
end
|
@@ -29,11 +29,11 @@ module Saddler
|
|
29
29
|
|
30
30
|
# @param sha [String] target commit sha
|
31
31
|
#
|
32
|
-
# @return [
|
32
|
+
# @return [Patches<Patch>] patches
|
33
33
|
def commit_patches(sha)
|
34
|
-
patches =
|
34
|
+
patches = Patches.new
|
35
35
|
client.commit(slug, sha).files.each do |file|
|
36
|
-
patches <<
|
36
|
+
patches << Patch.new(file.patch, file: file.filename, secure_hash: sha)
|
37
37
|
end
|
38
38
|
patches
|
39
39
|
end
|
@@ -62,11 +62,11 @@ module Saddler
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
# @return [
|
65
|
+
# @return [Patches<Patch>] patches
|
66
66
|
def pull_request_patches
|
67
|
-
patches =
|
67
|
+
patches = Patches.new
|
68
68
|
client.pull_request_files(slug, pull_id).each do |file|
|
69
|
-
patches <<
|
69
|
+
patches << Patch.new(file.patch, file: file.filename, secure_hash: @repo.merging_sha)
|
70
70
|
end
|
71
71
|
patches
|
72
72
|
end
|
@@ -14,7 +14,7 @@ module Saddler
|
|
14
14
|
# @see https://developer.github.com/v3/repos/comments/#create-a-commit-comment
|
15
15
|
def report(messages, options)
|
16
16
|
repo_path = '.'
|
17
|
-
repo =
|
17
|
+
repo = Repository.new(repo_path)
|
18
18
|
|
19
19
|
sha = options['sha'] || repo.head.sha
|
20
20
|
data = parse(messages)
|
@@ -16,7 +16,7 @@ module Saddler
|
|
16
16
|
# @see https://developer.github.com/v3/repos/comments/#create-a-commit-comment
|
17
17
|
def report(messages, options)
|
18
18
|
repo_path = '.'
|
19
|
-
repo =
|
19
|
+
repo = Repository.new(repo_path)
|
20
20
|
|
21
21
|
sha = options['sha'] || repo.head.sha
|
22
22
|
data = parse(messages)
|
@@ -13,7 +13,7 @@ module Saddler
|
|
13
13
|
# @see https://developer.github.com/v3/issues/comments/#create-a-comment
|
14
14
|
def report(messages, _options)
|
15
15
|
repo_path = '.'
|
16
|
-
repo =
|
16
|
+
repo = Repository.new(repo_path)
|
17
17
|
|
18
18
|
data = parse(messages)
|
19
19
|
|
@@ -13,7 +13,7 @@ module Saddler
|
|
13
13
|
# @see https://developer.github.com/v3/pulls/comments/#create-a-comment
|
14
14
|
def report(messages, _options)
|
15
15
|
repo_path = '.'
|
16
|
-
repo =
|
16
|
+
repo = Repository.new(repo_path)
|
17
17
|
|
18
18
|
data = parse(messages)
|
19
19
|
client = Client.new(repo)
|
@@ -8,8 +8,11 @@ require 'saddler/reporter/github/client'
|
|
8
8
|
require 'saddler/reporter/github/comment'
|
9
9
|
require 'saddler/reporter/github/commit_comment'
|
10
10
|
require 'saddler/reporter/github/commit_review_comment'
|
11
|
+
require 'saddler/reporter/github/patch'
|
12
|
+
require 'saddler/reporter/github/patches'
|
11
13
|
require 'saddler/reporter/github/pull_request_comment'
|
12
14
|
require 'saddler/reporter/github/pull_request_review_comment'
|
15
|
+
require 'saddler/reporter/github/repository'
|
13
16
|
|
14
17
|
module Saddler
|
15
18
|
module Reporter
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saddler-reporter-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
@@ -132,8 +132,11 @@ files:
|
|
132
132
|
- lib/saddler/reporter/github/commit_comment.rb
|
133
133
|
- lib/saddler/reporter/github/commit_review_comment.rb
|
134
134
|
- lib/saddler/reporter/github/helper.rb
|
135
|
+
- lib/saddler/reporter/github/patch.rb
|
136
|
+
- lib/saddler/reporter/github/patches.rb
|
135
137
|
- lib/saddler/reporter/github/pull_request_comment.rb
|
136
138
|
- lib/saddler/reporter/github/pull_request_review_comment.rb
|
139
|
+
- lib/saddler/reporter/github/repository.rb
|
137
140
|
- lib/saddler/reporter/github/version.rb
|
138
141
|
- saddler-reporter-github.gemspec
|
139
142
|
homepage: https://github.com/packsaddle/ruby-saddler-reporter-github
|