saddler-reporter-github 0.3.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +35 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +24 -0
- data/Gemfile +1 -1
- data/README.md +3 -3
- data/Rakefile +2 -2
- data/lib/saddler/reporter/github/client.rb +13 -16
- data/lib/saddler/reporter/github/comment.rb +2 -2
- data/lib/saddler/reporter/github/version.rb +1 -1
- data/lib/saddler/reporter/github.rb +1 -0
- data/saddler-reporter-github.gemspec +15 -13
- metadata +24 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 03c683dbe483dcb944eadb334058f6da81058b7bae8fc203c7f288c60fbe647e
|
4
|
+
data.tar.gz: 0d7f722f5ffd1dcea27d2a479f47081447bae1590cac958569af924f7bad2dd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a719c58ccae7cfe082bd6cdb71d6147d3795c733de7a8217ea0d64838f98542c4c741c39b4a1ffeb0dd55ef44e662ed6929780ecb7df7144d546b23b87f3378f
|
7
|
+
data.tar.gz: b0bd8e82b5cc3ce8f4daa5fb405ae8d6eb63032527d37531db79ea68f315df839d236aa4142e886110d33c233103ad50196a94c79eae14c951819d4e0a6e7860
|
@@ -0,0 +1,35 @@
|
|
1
|
+
version: 2.1
|
2
|
+
orbs:
|
3
|
+
ruby: circleci/ruby@1.2
|
4
|
+
|
5
|
+
executors:
|
6
|
+
linux:
|
7
|
+
docker:
|
8
|
+
- image: cimg/base:stable
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
test:
|
12
|
+
parameters:
|
13
|
+
os:
|
14
|
+
type: executor
|
15
|
+
ruby-version:
|
16
|
+
type: string
|
17
|
+
executor: << parameters.os >>
|
18
|
+
steps:
|
19
|
+
- checkout
|
20
|
+
- ruby/install:
|
21
|
+
version: << parameters.ruby-version >>
|
22
|
+
- run:
|
23
|
+
name: bundle install
|
24
|
+
command: bundle install
|
25
|
+
- run:
|
26
|
+
name: test
|
27
|
+
command: bundle exec rake
|
28
|
+
workflows:
|
29
|
+
all-tests:
|
30
|
+
jobs:
|
31
|
+
- test:
|
32
|
+
matrix:
|
33
|
+
parameters:
|
34
|
+
os: [linux]
|
35
|
+
ruby-version: ["2.6", "2.7", "3.0"]
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
# [2.1.0](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v2.0.0...v2.1.0) (2021-11-07)
|
2
|
+
|
3
|
+
* Relax git_diff_parser version
|
4
|
+
|
5
|
+
|
6
|
+
<a name="2.0.0"></a>
|
7
|
+
# [2.0.0](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v1.0.0...v2.0.0) (2017-01-15)
|
8
|
+
|
9
|
+
* Drop support for ruby 1.9
|
10
|
+
|
11
|
+
|
12
|
+
<a name="1.0.0"></a>
|
13
|
+
# [1.0.0](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v0.4.0...v1.0.0) (2016-05-02)
|
14
|
+
|
15
|
+
* Ship v1.0.0
|
16
|
+
|
17
|
+
|
18
|
+
<a name="0.4.0"></a>
|
19
|
+
# [0.4.0](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v0.3.0...v0.4.0) (2016-05-02)
|
20
|
+
|
21
|
+
* Use env_pull_request
|
22
|
+
* Update dependencies
|
23
|
+
|
24
|
+
|
1
25
|
<a name="0.3.0"></a>
|
2
26
|
# [0.3.0](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v0.2.2...v0.3.0) (2016-01-04)
|
3
27
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Saddler::Reporter::Github
|
2
2
|
|
3
|
-
[![Gem version][gem-image]][gem-url] [![
|
3
|
+
[![Gem version][gem-image]][gem-url] [![CI Status][ci-image]][ci-url] [![yard docs][docs-image]][docs-url]
|
4
4
|
|
5
5
|
> [Saddler](https://github.com/packsaddle/ruby-saddler) reporter for GitHub.
|
6
6
|
|
@@ -114,8 +114,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
114
114
|
|
115
115
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
116
116
|
|
117
|
-
[
|
118
|
-
[
|
117
|
+
[ci-url]: https://circleci.com/gh/packsaddle/ruby-saddler-reporter-github
|
118
|
+
[ci-image]: https://img.shields.io/circleci/build/github/packsaddle/ruby-saddler-reporter-github?style=flat-square
|
119
119
|
[gem-url]: https://rubygems.org/gems/saddler-reporter-github
|
120
120
|
[gem-image]: http://img.shields.io/gem/v/saddler-reporter-github.svg?style=flat-square
|
121
121
|
[docs-url]: http://www.rubydoc.info/gems/saddler-reporter-github
|
data/Rakefile
CHANGED
@@ -10,8 +10,8 @@ task default: :test
|
|
10
10
|
|
11
11
|
require 'yard'
|
12
12
|
require 'yard/rake/yardoc_task'
|
13
|
-
DOC_FILES = ['lib/**/*.rb']
|
14
|
-
DOC_OPTIONS = ['--debug', '--verbose']
|
13
|
+
DOC_FILES = ['lib/**/*.rb'].freeze
|
14
|
+
DOC_OPTIONS = ['--debug', '--verbose'].freeze
|
15
15
|
YARD::Rake::YardocTask.new(:doc) do |t|
|
16
16
|
t.files = DOC_FILES
|
17
17
|
t.options = DOC_OPTIONS if Rake.application.options.trace
|
@@ -83,13 +83,18 @@ module Saddler
|
|
83
83
|
|
84
84
|
# @return [Integer, nil] pull request id
|
85
85
|
def pull_id
|
86
|
-
@pull_id
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
return @pull_id unless @pull_id.nil?
|
87
|
+
|
88
|
+
if env_pull_id
|
89
|
+
@pull_id = env_pull_id
|
90
|
+
return @pull_id
|
91
|
+
end
|
92
|
+
|
93
|
+
if @repo.current_branch
|
94
|
+
pull = pull_requests.find { |pr| pr[:head][:ref] == @repo.current_branch }
|
95
|
+
if pull
|
96
|
+
@pull_id = pull[:number].to_i
|
97
|
+
return @pull_id
|
93
98
|
end
|
94
99
|
end
|
95
100
|
end
|
@@ -118,15 +123,7 @@ module Saddler
|
|
118
123
|
|
119
124
|
# @return [Integer, nil] pull request id from environment variables
|
120
125
|
def env_pull_id
|
121
|
-
|
122
|
-
ENV['PULL_REQUEST_ID'].to_i
|
123
|
-
elsif ENV['TRAVIS_PULL_REQUEST'] && ENV['TRAVIS_PULL_REQUEST'] != 'false'
|
124
|
-
ENV['TRAVIS_PULL_REQUEST'].to_i
|
125
|
-
elsif ENV['CIRCLE_PR_NUMBER']
|
126
|
-
ENV['CIRCLE_PR_NUMBER'].to_i
|
127
|
-
elsif ENV['ghprbPullId']
|
128
|
-
ENV['ghprbPullId'].to_i
|
129
|
-
end
|
126
|
+
@env_pull_id ||= EnvPullRequest.new.pull_request_id
|
130
127
|
end
|
131
128
|
end
|
132
129
|
end
|
@@ -13,27 +13,29 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = 'Saddler reporter for GitHub.'
|
14
14
|
spec.homepage = 'https://github.com/packsaddle/ruby-saddler-reporter-github'
|
15
15
|
spec.license = 'MIT'
|
16
|
+
spec.required_ruby_version = '>= 2.0'
|
16
17
|
|
17
18
|
spec.files = \
|
18
19
|
`git ls-files -z`
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
.split("\x0")
|
21
|
+
.reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
.reject do |f|
|
23
|
+
[
|
24
|
+
'.travis.yml',
|
25
|
+
'circle.yml',
|
26
|
+
'.tachikoma.yml',
|
27
|
+
'package.json'
|
28
|
+
].include?(f)
|
29
|
+
end
|
29
30
|
spec.bindir = 'exe'
|
30
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
32
|
spec.require_paths = ['lib']
|
32
33
|
|
33
34
|
spec.add_runtime_dependency 'octokit', '>= 0'
|
34
|
-
spec.add_runtime_dependency 'git_diff_parser', '>= 2.0', '<
|
35
|
-
spec.add_runtime_dependency 'saddler-reporter-support', '>=
|
36
|
-
spec.add_runtime_dependency 'saddler-reporter-support-git', '>=
|
35
|
+
spec.add_runtime_dependency 'git_diff_parser', '>= 2.0', '< 5.0'
|
36
|
+
spec.add_runtime_dependency 'saddler-reporter-support', '>= 1.0'
|
37
|
+
spec.add_runtime_dependency 'saddler-reporter-support-git', '>= 1.0'
|
38
|
+
spec.add_runtime_dependency 'env_pull_request', '>= 1.0'
|
37
39
|
|
38
40
|
spec.add_development_dependency 'bundler', '>= 0'
|
39
41
|
spec.add_development_dependency 'rake', '>= 0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saddler-reporter-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '2.0'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '5.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,47 +43,49 @@ dependencies:
|
|
43
43
|
version: '2.0'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '5.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: saddler-reporter-support
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0
|
54
|
-
- - "<"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '0.2'
|
53
|
+
version: '1.0'
|
57
54
|
type: :runtime
|
58
55
|
prerelease: false
|
59
56
|
version_requirements: !ruby/object:Gem::Requirement
|
60
57
|
requirements:
|
61
58
|
- - ">="
|
62
59
|
- !ruby/object:Gem::Version
|
63
|
-
version: '0
|
64
|
-
- - "<"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '0.2'
|
60
|
+
version: '1.0'
|
67
61
|
- !ruby/object:Gem::Dependency
|
68
62
|
name: saddler-reporter-support-git
|
69
63
|
requirement: !ruby/object:Gem::Requirement
|
70
64
|
requirements:
|
71
65
|
- - ">="
|
72
66
|
- !ruby/object:Gem::Version
|
73
|
-
version: '0
|
74
|
-
- - "<"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0.4'
|
67
|
+
version: '1.0'
|
77
68
|
type: :runtime
|
78
69
|
prerelease: false
|
79
70
|
version_requirements: !ruby/object:Gem::Requirement
|
80
71
|
requirements:
|
81
72
|
- - ">="
|
82
73
|
- !ruby/object:Gem::Version
|
83
|
-
version: '0
|
84
|
-
|
74
|
+
version: '1.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: env_pull_request
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
85
80
|
- !ruby/object:Gem::Version
|
86
|
-
version: '0
|
81
|
+
version: '1.0'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
87
89
|
- !ruby/object:Gem::Dependency
|
88
90
|
name: bundler
|
89
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,6 +135,7 @@ executables: []
|
|
133
135
|
extensions: []
|
134
136
|
extra_rdoc_files: []
|
135
137
|
files:
|
138
|
+
- ".circleci/config.yml"
|
136
139
|
- ".conventional-changelog.context.js"
|
137
140
|
- ".gitignore"
|
138
141
|
- ".rubocop.yml"
|
@@ -169,17 +172,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
172
|
requirements:
|
170
173
|
- - ">="
|
171
174
|
- !ruby/object:Gem::Version
|
172
|
-
version: '0'
|
175
|
+
version: '2.0'
|
173
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
177
|
requirements:
|
175
178
|
- - ">="
|
176
179
|
- !ruby/object:Gem::Version
|
177
180
|
version: '0'
|
178
181
|
requirements: []
|
179
|
-
|
180
|
-
rubygems_version: 2.4.5.1
|
182
|
+
rubygems_version: 3.1.6
|
181
183
|
signing_key:
|
182
184
|
specification_version: 4
|
183
185
|
summary: Saddler reporter for GitHub.
|
184
186
|
test_files: []
|
185
|
-
has_rdoc:
|