danger-space_checkstyle_reports 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: ce5c4b55c335e41f8b1c90245cc3c72405d159dc3505f5d877250815c4aae01d
4
- data.tar.gz: 76b407deea84d5e0775eef63dadbb6072a083ea76fa9c318c19a76b37909fa97
3
+ metadata.gz: 184ac713ace243ec44fc17eed74a0a284cc499518529aff9ebe85855530261b8
4
+ data.tar.gz: c0df5ec480eafd476c42741bc3f2748e5ba126a7b241b0c65ebe3c830684ffba
5
5
  SHA512:
6
- metadata.gz: e957fe25ec7a24fece96c651c73a5e8a5a24f2809276df16ab30c75b1277827e4067fcf079eb664a474a2a6f60bb554459cc6b8bb3a0f12704bc06fb34ddf758
7
- data.tar.gz: bdfe7966f5220ada29fe2196e5b64a0c97bfcdc3a1ab39e8ed4fbc57061a55d35433d245c287c42ac1f1f79f0615241e3e45a62782129350db5b251b617fb2e3
6
+ metadata.gz: cb3dcbbe36ac7e8bf7cfea0ce0379668ce2c17c0f800573247a2421c810aeb47c85db955dd63c977d22217148c92a5efc08451aedcf1cc3cda249131db1e52ee
7
+ data.tar.gz: 92d058f1fc048e3b852688be8b0b91a55c25d67f77aeb907427e71ed30263d8eb6e6e67667784e9dc03c668ef870adb8f3a6f300ccef1cf5872d6f39c6428cd5
data/Dangerfile.sample ADDED
@@ -0,0 +1,3 @@
1
+ checkstyle_reports.inline_comment = true
2
+ checkstyle_reports.report('checkstyle-results.xml', modified_files_only: true)
3
+
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in danger-apkstats.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,136 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ danger-checkstyle_reports (0.1.0)
5
+ danger-plugin-api (~> 1.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.5.2)
11
+ public_suffix (>= 2.0.2, < 4.0)
12
+ ast (2.4.0)
13
+ claide (1.0.2)
14
+ claide-plugins (0.9.2)
15
+ cork
16
+ nap
17
+ open4 (~> 1.3)
18
+ coderay (1.1.2)
19
+ colored2 (3.1.2)
20
+ cork (0.3.0)
21
+ colored2 (~> 3.1)
22
+ danger (5.6.7)
23
+ claide (~> 1.0)
24
+ claide-plugins (>= 0.9.2)
25
+ colored2 (~> 3.1)
26
+ cork (~> 0.1)
27
+ faraday (~> 0.9)
28
+ faraday-http-cache (~> 1.0)
29
+ git (~> 1.5)
30
+ kramdown (~> 1.5)
31
+ no_proxy_fix
32
+ octokit (~> 4.7)
33
+ terminal-table (~> 1)
34
+ danger-plugin-api (1.0.0)
35
+ danger (> 2.0)
36
+ diff-lcs (1.3)
37
+ faraday (0.15.3)
38
+ multipart-post (>= 1.2, < 3)
39
+ faraday-http-cache (1.3.1)
40
+ faraday (~> 0.8)
41
+ ffi (1.9.25)
42
+ formatador (0.2.5)
43
+ git (1.5.0)
44
+ guard (2.14.2)
45
+ formatador (>= 0.2.4)
46
+ listen (>= 2.7, < 4.0)
47
+ lumberjack (>= 1.0.12, < 2.0)
48
+ nenv (~> 0.1)
49
+ notiffany (~> 0.0)
50
+ pry (>= 0.9.12)
51
+ shellany (~> 0.0)
52
+ thor (>= 0.18.1)
53
+ guard-compat (1.2.1)
54
+ guard-rspec (4.7.3)
55
+ guard (~> 2.1)
56
+ guard-compat (~> 1.1)
57
+ rspec (>= 2.99.0, < 4.0)
58
+ jaro_winkler (1.5.1)
59
+ kramdown (1.17.0)
60
+ listen (3.0.7)
61
+ rb-fsevent (>= 0.9.3)
62
+ rb-inotify (>= 0.9.7)
63
+ lumberjack (1.0.13)
64
+ method_source (0.9.0)
65
+ multipart-post (2.0.0)
66
+ nap (1.1.0)
67
+ nenv (0.3.0)
68
+ no_proxy_fix (0.1.2)
69
+ notiffany (0.1.1)
70
+ nenv (~> 0.1)
71
+ shellany (~> 0.0)
72
+ octokit (4.12.0)
73
+ sawyer (~> 0.8.0, >= 0.5.3)
74
+ open4 (1.3.4)
75
+ parallel (1.12.1)
76
+ parser (2.5.1.2)
77
+ ast (~> 2.4.0)
78
+ powerpack (0.1.2)
79
+ pry (0.11.3)
80
+ coderay (~> 1.1.0)
81
+ method_source (~> 0.9.0)
82
+ public_suffix (3.0.3)
83
+ rainbow (3.0.0)
84
+ rake (10.5.0)
85
+ rb-fsevent (0.10.3)
86
+ rb-inotify (0.9.10)
87
+ ffi (>= 0.5.0, < 2)
88
+ rspec (3.7.0)
89
+ rspec-core (~> 3.7.0)
90
+ rspec-expectations (~> 3.7.0)
91
+ rspec-mocks (~> 3.7.0)
92
+ rspec-core (3.7.1)
93
+ rspec-support (~> 3.7.0)
94
+ rspec-expectations (3.7.0)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.7.0)
97
+ rspec-mocks (3.7.0)
98
+ diff-lcs (>= 1.2.0, < 2.0)
99
+ rspec-support (~> 3.7.0)
100
+ rspec-support (3.7.1)
101
+ rubocop (0.58.2)
102
+ jaro_winkler (~> 1.5.1)
103
+ parallel (~> 1.10)
104
+ parser (>= 2.5, != 2.5.1.1)
105
+ powerpack (~> 0.1)
106
+ rainbow (>= 2.2.2, < 4.0)
107
+ ruby-progressbar (~> 1.7)
108
+ unicode-display_width (~> 1.0, >= 1.0.1)
109
+ ruby-progressbar (1.9.0)
110
+ sawyer (0.8.1)
111
+ addressable (>= 2.3.5, < 2.6)
112
+ faraday (~> 0.8, < 1.0)
113
+ shellany (0.0.1)
114
+ terminal-table (1.8.0)
115
+ unicode-display_width (~> 1.1, >= 1.1.1)
116
+ thor (0.20.0)
117
+ unicode-display_width (1.4.0)
118
+ yard (0.9.15)
119
+
120
+ PLATFORMS
121
+ ruby
122
+
123
+ DEPENDENCIES
124
+ bundler (~> 1.3)
125
+ danger-checkstyle_reports!
126
+ guard (~> 2.14)
127
+ guard-rspec (~> 4.7)
128
+ listen (= 3.0.7)
129
+ pry
130
+ rake (~> 10.0)
131
+ rspec (~> 3.4)
132
+ rubocop
133
+ yard
134
+
135
+ BUNDLED WITH
136
+ 1.16.3
data/Guardfile ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A guardfile for making Danger Plugins
4
+ # For more info see https://github.com/guard/guard#readme
5
+
6
+ # To run, use `bundle exec guard`.
7
+
8
+ guard :rspec, cmd: "bundle exec rspec" do
9
+ require "guard/rspec/dsl"
10
+ dsl = Guard::RSpec::Dsl.new(self)
11
+
12
+ # RSpec files
13
+ rspec = dsl.rspec
14
+ watch(rspec.spec_helper) { rspec.spec_dir }
15
+ watch(rspec.spec_support) { rspec.spec_dir }
16
+ watch(rspec.spec_files)
17
+
18
+ # Ruby files
19
+ ruby = dsl.ruby
20
+ dsl.watch_spec_files_for(ruby.lib_files)
21
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2018 Jumpei Matsuda <jmatsu.drm@gmail.com>
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Danger Space Checkstyle Reports
2
+
3
+ This is a plugin of [Danger](https://github.com/danger/danger) for Android projects.
4
+ This reports checkstyle results.
5
+
6
+ ## Installation
7
+
8
+ `gem install danger-space_checkstyle_reports`
9
+
10
+ ## Usage
11
+
12
+ `space_checkstyle_reports` namespace is available under Dangerfile.
13
+
14
+ ### Report errors
15
+
16
+ ```
17
+ # If you'd like inlining comments
18
+ checkstyle_reports.inline_comment = true
19
+ # If you want to filter only modified lines
20
+ checkstyle_reports.filtering_lines = true
21
+ checkstyle_reports.report(/path/to/xml)
22
+ ```
23
+
24
+ ## Development
25
+
26
+ 1. Clone this repo
27
+ 2. Run `bundle install` to setup dependencies.
28
+ 3. Run `bundle exec rake spec` to run the tests.
29
+ 4. Use `bundle exec guard` to automatically have tests run as you make changes.
30
+ 5. Make your changes.
data/Rakefile ADDED
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+ require "rubocop/rake_task"
6
+
7
+ RSpec::Core::RakeTask.new(:specs)
8
+
9
+ task default: :specs
10
+
11
+ task :spec do
12
+ Rake::Task["specs"].invoke
13
+ Rake::Task["rubocop"].invoke
14
+ Rake::Task["spec_docs"].invoke
15
+ end
16
+
17
+ desc "Run RuboCop on the lib/specs directory"
18
+ RuboCop::RakeTask.new(:rubocop) do |task|
19
+ task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
20
+ end
21
+
22
+ desc "Ensure that the plugin passes `danger plugins lint`"
23
+ task :spec_docs do
24
+ sh "bundle exec danger plugins lint"
25
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("lib", __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "checkstyle_reports/gem_version.rb"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "danger-space_checkstyle_reports"
9
+ spec.version = CheckstyleReports::VERSION
10
+ spec.authors = ["Tedo Manvelidze"]
11
+ spec.email = ["tedex.manvelidze@gmail.com"]
12
+ spec.description = "To report checkstyle results via danger."
13
+ spec.summary = "This is a danger plugin to report checkstyle results with line filtering."
14
+ spec.homepage = "https://github.com/SpaceBank/Android-Space-Danger-Checkstyle-Reports"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files | grep -v 'fixture/'`.split($/)
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_runtime_dependency "danger-plugin-api", "~> 1.0"
23
+
24
+ # General ruby development
25
+ spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+
28
+ # Testing support
29
+ spec.add_development_dependency "rspec", "~> 3.4"
30
+
31
+ # Linting code and docs
32
+ spec.add_development_dependency "rubocop"
33
+ spec.add_development_dependency "yard"
34
+
35
+ # Makes testing easy via `bundle exec guard`
36
+ spec.add_development_dependency "guard", "~> 2.14"
37
+ spec.add_development_dependency "guard-rspec", "~> 4.7"
38
+
39
+ # If you want to work on older builds of ruby
40
+ spec.add_development_dependency "listen", "3.0.7"
41
+
42
+ # This gives you the chance to run a REPL inside your tests
43
+ # via:
44
+ #
45
+ # require 'pry'
46
+ # binding.pry
47
+ #
48
+ # This will stop test execution and let you inspect the results
49
+ spec.add_development_dependency "pry"
50
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module SpaceCheckstyleReports::Entity
3
+ module CheckstyleReports::Entity
4
4
  class FoundError
5
5
  # A detected line number
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module SpaceCheckstyleReports::Entity
3
+ module CheckstyleReports::Entity
4
4
  class FoundFile
5
5
  # A absolute path to this file
6
6
  #
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckstyleReports
4
+ VERSION = "1.0.2"
5
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module SpaceCheckstyleReports
3
+ module CheckstyleReports
4
4
  class Severity
5
5
  VALUES = %i(ignore info warning error).freeze
6
6
 
@@ -15,4 +15,4 @@ module SpaceCheckstyleReports
15
15
  VALUES.index(@base) <= VALUES.index(other.to_sym)
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -0,0 +1,179 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+ require 'rexml/document'
5
+
6
+ require_relative 'gem_version'
7
+
8
+ require_relative 'lib/severity'
9
+
10
+ require_relative 'entity/found_error'
11
+ require_relative 'entity/found_file'
12
+
13
+ module Danger
14
+ # Comment checkstyle reports.
15
+ #
16
+ # You need to specify the project root. You don't need do it if it is same with git's top-level path.
17
+ #
18
+ # checkstyle_reports.root_path=/path/to/project
19
+ #
20
+ # @example Report errors whose files have been modified (By default)
21
+ #
22
+ # checkstyle_reports.report("app/build/checkstyle/checkstyle.xml"[, modified_files_only: true])
23
+ #
24
+ # @example Report all errors in app/build/checkstyle/checkstyle.xml
25
+ #
26
+ # checkstyle_reports.report("app/build/checkstyle/checkstyle.xml", modified_files_only: false)
27
+ #
28
+ # @tags android, checkstyle
29
+ #
30
+ class DangerCheckstyleReports < Plugin
31
+ REPORT_METHODS = %i[message warn fail].freeze
32
+
33
+ # *Optional*
34
+ # An absolute path to a root.
35
+ # To comment errors to VCS, this needs to know relative path of files from the root.
36
+ #
37
+ # @return [String] the root path of git repository by default.
38
+ attr_accessor :root_path
39
+
40
+ # *Optional*
41
+ # Create inline comment if true.
42
+ #
43
+ # @return [Boolean] true by default
44
+ attr_accessor :inline_comment
45
+
46
+ # *Optional*
47
+ # minimum severity to be reported (inclusive)
48
+ #
49
+ # @return [String, Symbol] error by default
50
+ attr_accessor :min_severity
51
+
52
+ # *Optional*
53
+ # Set report method
54
+ #
55
+ # @return [String, Symbol] error by default
56
+ attr_accessor :report_method
57
+
58
+ # Enable filtering
59
+ # Only show messages within changed files.
60
+ attr_accessor :filtering
61
+
62
+ # Only show messages for the modified lines.
63
+ attr_accessor :filtering_lines
64
+
65
+ # The array of files which include at least one error
66
+ #
67
+ # @return [Array<String>] a collection of relative paths
68
+ attr_reader :reported_files
69
+
70
+ # Report errors based on the given xml file if needed
71
+ #
72
+ # @param [String] xml_file which contains checkstyle results to be reported
73
+ # @param [Boolean] modified_files_only which is a flag to filter out non-added/non-modified files
74
+ # @return [void] void
75
+ def report(xml_file, modified_files_only: true)
76
+ raise 'File path must not be empty' if xml_file.empty?
77
+ raise 'File not found' unless File.exist?(xml_file)
78
+
79
+ @min_severity = (min_severity || :error).to_sym
80
+ @report_method = (report_method || :fail).to_sym
81
+
82
+ raise 'Unknown severity found' unless CheckstyleReports::Severity::VALUES.include?(min_severity)
83
+ raise 'Unknown report method' unless REPORT_METHODS.include?(report_method)
84
+
85
+ files = parse_xml(xml_file, modified_files_only)
86
+
87
+ @reported_files = files.map(&:relative_path)
88
+
89
+ do_comment(files) unless files.empty?
90
+ end
91
+
92
+ private
93
+
94
+ # Parse the given xml file and apply filters if needed
95
+ #
96
+ # @param [String] file_path which is a check-style xml file
97
+ # @param [Boolean] modified_files_only a flag to determine to apply added/modified files-only filter
98
+ # @return [Array<FoundFile>] filtered files
99
+ def parse_xml(file_path, modified_files_only)
100
+ prefix = root_path || `git rev-parse --show-toplevel`.chomp
101
+
102
+ files = []
103
+
104
+ REXML::Document.new(File.read(file_path)).root.elements.each("file") do |f|
105
+ files << CheckstyleReports::Entity::FoundFile.new(f, prefix: prefix)
106
+ end
107
+
108
+ if modified_files_only
109
+ target_files = git.modified_files + git.added_files
110
+
111
+ files.select! { |f| target_files.include?(f.relative_path) }
112
+ end
113
+
114
+ files.reject! { |f| f.errors.empty? }
115
+ files
116
+ end
117
+
118
+ # Comment errors based on the given xml file to VCS
119
+ #
120
+ # @param [Array<FoundFile>] files which contains checkstyle results to be reported
121
+ # @return [void] void
122
+ def do_comment(files)
123
+ base_severity = CheckstyleReports::Severity.new(min_severity)
124
+ target_files = git.modified_files + git.added_files
125
+ target_lines = {}
126
+
127
+ if filtering_lines
128
+ target_files.each do |file|
129
+ added_lines = parse_added_line_numbers(git.diff[file].patch)
130
+ target_lines[file] = added_lines
131
+ end
132
+ end
133
+
134
+ files.each do |f|
135
+ f.errors.each do |e|
136
+ # check severity
137
+ next unless base_severity <= e.severity
138
+
139
+ if filtering_lines
140
+ next unless target_files.include?(f.relative_path)
141
+ added_lines = target_lines[f.relative_path]
142
+ next unless added_lines.include?(e.line_number)
143
+ end
144
+
145
+ if inline_comment
146
+ public_send(report_method, e.html_unescaped_message, file: f.relative_path, line: e.line_number)
147
+ else
148
+ public_send(report_method, "#{f.relative_path} : #{e.html_unescaped_message} at #{e.line_number}")
149
+ end
150
+ end
151
+ end
152
+ end
153
+
154
+ # Parses git diff of a file and returns an array of added line numbers.
155
+ def parse_added_line_numbers(diff)
156
+ current_line_number = nil
157
+ added_line_numbers = []
158
+ diff_lines = diff.strip.split("\n")
159
+ diff_lines.each_with_index do |line, index|
160
+ if (m = %r{\+(\d+)(?:,\d+)? @@}.match(line))
161
+ # (e.g. @@ -32,10 +32,7 @@)
162
+ current_line_number = Integer(m[1])
163
+ else
164
+ if !current_line_number.nil?
165
+ if line.start_with?('+')
166
+ # added line
167
+ added_line_numbers.push(current_line_number)
168
+ current_line_number += 1
169
+ elsif !line.start_with?('-')
170
+ # unmodified line
171
+ current_line_number += 1
172
+ end
173
+ end
174
+ end
175
+ end
176
+ added_line_numbers
177
+ end
178
+ end
179
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "checkstyle_reports/gem_version"
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "checkstyle_reports/plugin"
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path("spec_helper", __dir__)
4
+
5
+ module Danger
6
+ describe Danger::DangerCheckstyleReports do
7
+ it "should be a plugin" do
8
+ expect(Danger::DangerCheckstyleReports.new(nil)).to be_a Danger::Plugin
9
+ end
10
+
11
+ #
12
+ # You should test your custom attributes and methods here
13
+ #
14
+ describe "with Dangerfile" do
15
+ before do
16
+ @dangerfile = testing_dangerfile
17
+ @my_plugin = @dangerfile.checkstyle_reports
18
+
19
+ # mock the PR data
20
+ # you can then use this, eg. github.pr_author, later in the spec
21
+ json = File.read(fixture_path + "github_pr.json")
22
+ allow(@my_plugin.github).to receive(:pr_json).and_return(json)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "../spec_helper"
4
4
 
5
- module SpaceCheckstyleReports::Entity
5
+ module CheckstyleReports::Entity
6
6
  ERROR_NODE_SAMPLE_1 = <<NODE
7
7
  <error
8
8
  line="144"
@@ -22,7 +22,7 @@ NODE
22
22
  />
23
23
  NODE
24
24
 
25
- describe SpaceCheckstyleReports::Entity::FoundError do
25
+ describe CheckstyleReports::Entity::FoundError do
26
26
  let(:error) { FoundError.new(REXML::Document.new(node).root) }
27
27
 
28
28
  context "sample1" do
@@ -2,17 +2,17 @@
2
2
 
3
3
  require_relative "../spec_helper"
4
4
 
5
- module SpaceCheckstyleReports::Entity
5
+ module CheckstyleReports::Entity
6
6
  FILE_NODE_SAMPLE_1 = <<NODE
7
7
  <file
8
- name="/Users/ted3x/Workspace/sample/src/main/java/io/github/ted3x/Sample.java" >
8
+ name="/Users/jmatsu/Workspace/sample/src/main/java/io/github/jmatsu/Sample.java" >
9
9
  #{ERROR_NODE_SAMPLE_1}
10
10
  </file>
11
11
  NODE
12
12
 
13
13
  FILE_NODE_SAMPLE_2 = <<NODE
14
14
  <file
15
- name="/Users/ted3x/Workspace/sample/src/test/java/io/github/ted3x/Sample2.java" >
15
+ name="/Users/jmatsu/Workspace/sample/src/test/java/io/github/jmatsu/Sample2.java" >
16
16
  #{ERROR_NODE_SAMPLE_1}
17
17
  #{ERROR_NODE_SAMPLE_2}
18
18
  </file>
@@ -20,19 +20,19 @@ NODE
20
20
 
21
21
  FILE_NODE_SAMPLE_EMPTY = <<NODE
22
22
  <file
23
- name="/Users/ted3x/Workspace/sample/src/main/java/io/github/ted3x/Sample.java" />
23
+ name="/Users/jmatsu/Workspace/sample/src/main/java/io/github/jmatsu/Sample.java" />
24
24
  NODE
25
25
 
26
- describe SpaceCheckstyleReports::Entity::FoundFile do
27
- let(:file) { FoundFile.new(REXML::Document.new(node).root, prefix: "/Users/ted3x/Workspace/sample") }
26
+ describe CheckstyleReports::Entity::FoundFile do
27
+ let(:file) { FoundFile.new(REXML::Document.new(node).root, prefix: "/Users/jmatsu/Workspace/sample") }
28
28
 
29
29
  context "sample1" do
30
30
  let(:node) { FILE_NODE_SAMPLE_1 }
31
31
 
32
32
  it "should read it successfully" do
33
- expect(file.path).to eq("/Users/ted3x/Workspace/sample/src/main/java/io/github/ted3x/Sample.java")
33
+ expect(file.path).to eq("/Users/jmatsu/Workspace/sample/src/main/java/io/github/jmatsu/Sample.java")
34
34
  expect(file.errors.size).to eq(1)
35
- expect(file.relative_path).to eq("src/main/java/io/github/ted3x/Sample.java")
35
+ expect(file.relative_path).to eq("src/main/java/io/github/jmatsu/Sample.java")
36
36
  end
37
37
  end
38
38
 
@@ -40,9 +40,9 @@ NODE
40
40
  let(:node) { FILE_NODE_SAMPLE_2 }
41
41
 
42
42
  it "should read it successfully" do
43
- expect(file.path).to eq("/Users/ted3x/Workspace/sample/src/test/java/io/github/ted3x/Sample2.java")
43
+ expect(file.path).to eq("/Users/jmatsu/Workspace/sample/src/test/java/io/github/jmatsu/Sample2.java")
44
44
  expect(file.errors.size).to eq(2)
45
- expect(file.relative_path).to eq("src/test/java/io/github/ted3x/Sample2.java")
45
+ expect(file.relative_path).to eq("src/test/java/io/github/jmatsu/Sample2.java")
46
46
  end
47
47
  end
48
48
 
@@ -50,9 +50,9 @@ NODE
50
50
  let(:node) { FILE_NODE_SAMPLE_EMPTY }
51
51
 
52
52
  it "should read it successfully" do
53
- expect(file.path).to eq("/Users/ted3x/Workspace/sample/src/main/java/io/github/ted3x/Sample.java")
53
+ expect(file.path).to eq("/Users/jmatsu/Workspace/sample/src/main/java/io/github/jmatsu/Sample.java")
54
54
  expect(file.errors.size).to eq(0)
55
- expect(file.relative_path).to eq("src/main/java/io/github/ted3x/Sample.java")
55
+ expect(file.relative_path).to eq("src/main/java/io/github/jmatsu/Sample.java")
56
56
  end
57
57
  end
58
58
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  require_relative "../spec_helper"
4
4
 
5
- module SpaceCheckstyleReports
6
- describe SpaceCheckstyleReports::Severity do
5
+ module CheckstyleReports
6
+ describe CheckstyleReports::Severity do
7
7
  let(:data) do
8
8
  [
9
9
  [:ignore, :ignore, true],
@@ -30,7 +30,7 @@ module SpaceCheckstyleReports
30
30
  data.each do |d|
31
31
  base, other, expected = d
32
32
 
33
- severity = SpaceCheckstyleReports::Severity.new(base)
33
+ severity = CheckstyleReports::Severity.new(base)
34
34
 
35
35
  expect(severity <= other).to eq(expected)
36
36
  end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "pathname"
4
+ ROOT = Pathname.new(File.expand_path("..", __dir__))
5
+ $:.unshift((ROOT + "lib").to_s)
6
+ $:.unshift((ROOT + "spec").to_s)
7
+
8
+ def fixture_path
9
+ "#{(ROOT + 'fixture')}/"
10
+ end
11
+
12
+ require "bundler/setup"
13
+ require "pry"
14
+
15
+ require "rspec"
16
+ require "danger"
17
+
18
+ if `git remote -v` == ""
19
+ puts "You cannot run tests without setting a local git remote on this repo"
20
+ puts "It's a weird side-effect of Danger's internals."
21
+ exit(0)
22
+ end
23
+
24
+ # Use coloured output, it's the best.
25
+ RSpec.configure do |config|
26
+ config.filter_gems_from_backtrace "bundler"
27
+ config.color = true
28
+ config.tty = true
29
+ end
30
+
31
+ require "danger_plugin"
32
+
33
+ # These functions are a subset of https://github.com/danger/danger/blob/master/spec/spec_helper.rb
34
+ # If you are expanding these files, see if it's already been done ^.
35
+
36
+ # A silent version of the user interface,
37
+ # it comes with an extra function `.string` which will
38
+ # strip all ANSI colours from the string.
39
+
40
+ # rubocop:disable Lint/NestedMethodDefinition
41
+ def testing_ui
42
+ @output = StringIO.new
43
+ def @output.winsize
44
+ [20, 9999]
45
+ end
46
+
47
+ cork = Cork::Board.new(out: @output)
48
+ def cork.string
49
+ out.string.gsub(/\e\[([;\d]+)?m/, "")
50
+ end
51
+ cork
52
+ end
53
+ # rubocop:enable Lint/NestedMethodDefinition
54
+
55
+ # Example environment (ENV) that would come from
56
+ # running a PR on TravisCI
57
+ def testing_env
58
+ {
59
+ "HAS_JOSH_K_SEAL_OF_APPROVAL" => "true",
60
+ "TRAVIS_PULL_REQUEST" => "800",
61
+ "TRAVIS_REPO_SLUG" => "artsy/eigen",
62
+ "TRAVIS_COMMIT_RANGE" => "759adcbd0d8f...13c4dc8bb61d",
63
+ "DANGER_GITHUB_API_TOKEN" => "123sbdq54erfsd3422gdfio"
64
+ }
65
+ end
66
+
67
+ # A stubbed out Dangerfile for use in tests
68
+ def testing_dangerfile
69
+ env = Danger::EnvironmentManager.new(testing_env)
70
+ Danger::Dangerfile.new(env, testing_ui)
71
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-space_checkstyle_reports
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tedo Manvelidze
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '1.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -150,22 +150,35 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
- description: A short description of danger-space_checkstyle_reports.
153
+ description: To report checkstyle results via danger.
154
154
  email:
155
- - tedo.manvelidze@space.ge
155
+ - tedex.manvelidze@gmail.com
156
156
  executables: []
157
157
  extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
160
  - ".gitignore"
161
+ - Dangerfile.sample
162
+ - Gemfile
163
+ - Gemfile.lock
164
+ - Guardfile
161
165
  - LICENSE
162
- - fixture/github_pr.json
163
- - lib/space_checkstyle_reports/entity/found_error.rb
164
- - lib/space_checkstyle_reports/entity/found_file.rb
165
- - lib/space_checkstyle_reports/lib/severity.rb
166
+ - LICENSE.txt
167
+ - README.md
168
+ - Rakefile
169
+ - danger-checkstyle_reports.gemspec
170
+ - lib/checkstyle_reports/entity/found_error.rb
171
+ - lib/checkstyle_reports/entity/found_file.rb
172
+ - lib/checkstyle_reports/gem_version.rb
173
+ - lib/checkstyle_reports/lib/severity.rb
174
+ - lib/checkstyle_reports/plugin.rb
175
+ - lib/danger_checkstyle_reports.rb
176
+ - lib/danger_plugin.rb
177
+ - spec/checkstyle_reports_spec.rb
166
178
  - spec/entity/found_error_spec.rb
167
179
  - spec/entity/found_file_spec.rb
168
180
  - spec/lib/severity_spec.rb
181
+ - spec/spec_helper.rb
169
182
  homepage: https://github.com/SpaceBank/Android-Space-Danger-Checkstyle-Reports
170
183
  licenses:
171
184
  - MIT
@@ -188,8 +201,10 @@ requirements: []
188
201
  rubygems_version: 3.4.10
189
202
  signing_key:
190
203
  specification_version: 4
191
- summary: A longer description of danger-space_checkstyle_reports.
204
+ summary: This is a danger plugin to report checkstyle results with line filtering.
192
205
  test_files:
206
+ - spec/checkstyle_reports_spec.rb
193
207
  - spec/entity/found_error_spec.rb
194
208
  - spec/entity/found_file_spec.rb
195
209
  - spec/lib/severity_spec.rb
210
+ - spec/spec_helper.rb
@@ -1,333 +0,0 @@
1
- {
2
- "url": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/1",
3
- "id": 221460271,
4
- "node_id": "MDExOlB1bGxSZXF1ZXN0MjIxNDYwMjcx",
5
- "html_url": "https://github.com/ted3x/my-danger-test-sample/pull/1",
6
- "diff_url": "https://github.com/ted3x/my-danger-test-sample/pull/1.diff",
7
- "patch_url": "https://github.com/ted3x/my-danger-test-sample/pull/1.patch",
8
- "issue_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/1",
9
- "number": 1,
10
- "state": "open",
11
- "locked": false,
12
- "title": "danger-checkstyle_format",
13
- "user": {
14
- "login": "ted3x",
15
- "id": 4340693,
16
- "node_id": "MDQ6VXNlcjQzNDA2OTM=",
17
- "avatar_url": "https://avatars0.githubusercontent.com/u/4340693?v=4",
18
- "gravatar_id": "",
19
- "url": "https://api.github.com/users/ted3x",
20
- "html_url": "https://github.com/ted3x",
21
- "followers_url": "https://api.github.com/users/ted3x/followers",
22
- "following_url": "https://api.github.com/users/ted3x/following{/other_user}",
23
- "gists_url": "https://api.github.com/users/ted3x/gists{/gist_id}",
24
- "starred_url": "https://api.github.com/users/ted3x/starred{/owner}{/repo}",
25
- "subscriptions_url": "https://api.github.com/users/ted3x/subscriptions",
26
- "organizations_url": "https://api.github.com/users/ted3x/orgs",
27
- "repos_url": "https://api.github.com/users/ted3x/repos",
28
- "events_url": "https://api.github.com/users/ted3x/events{/privacy}",
29
- "received_events_url": "https://api.github.com/users/ted3x/received_events",
30
- "type": "User",
31
- "site_admin": false
32
- },
33
- "body": "",
34
- "created_at": "2018-10-09T14:24:17Z",
35
- "updated_at": "2018-10-09T14:24:17Z",
36
- "closed_at": null,
37
- "merged_at": null,
38
- "merge_commit_sha": "ff47c9f445337664d38598e7db268735dcf2ee48",
39
- "assignee": null,
40
- "assignees": [
41
-
42
- ],
43
- "requested_reviewers": [
44
-
45
- ],
46
- "requested_teams": [
47
-
48
- ],
49
- "labels": [
50
-
51
- ],
52
- "milestone": null,
53
- "commits_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/1/commits",
54
- "review_comments_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/1/comments",
55
- "review_comment_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/comments{/number}",
56
- "comments_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/1/comments",
57
- "statuses_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/statuses/0338aa3df2e9f435d224f5dd31641e90d31a0b5a",
58
- "head": {
59
- "label": "ted3x:checkstyle_format_other",
60
- "ref": "checkstyle_format_other",
61
- "sha": "0338aa3df2e9f435d224f5dd31641e90d31a0b5a",
62
- "user": {
63
- "login": "ted3x",
64
- "id": 4340693,
65
- "node_id": "MDQ6VXNlcjQzNDA2OTM=",
66
- "avatar_url": "https://avatars0.githubusercontent.com/u/4340693?v=4",
67
- "gravatar_id": "",
68
- "url": "https://api.github.com/users/ted3x",
69
- "html_url": "https://github.com/ted3x",
70
- "followers_url": "https://api.github.com/users/ted3x/followers",
71
- "following_url": "https://api.github.com/users/ted3x/following{/other_user}",
72
- "gists_url": "https://api.github.com/users/ted3x/gists{/gist_id}",
73
- "starred_url": "https://api.github.com/users/ted3x/starred{/owner}{/repo}",
74
- "subscriptions_url": "https://api.github.com/users/ted3x/subscriptions",
75
- "organizations_url": "https://api.github.com/users/ted3x/orgs",
76
- "repos_url": "https://api.github.com/users/ted3x/repos",
77
- "events_url": "https://api.github.com/users/ted3x/events{/privacy}",
78
- "received_events_url": "https://api.github.com/users/ted3x/received_events",
79
- "type": "User",
80
- "site_admin": false
81
- },
82
- "repo": {
83
- "id": 152257381,
84
- "node_id": "MDEwOlJlcG9zaXRvcnkxNTIyNTczODE=",
85
- "name": "my-danger-test-sample",
86
- "full_name": "ted3x/my-danger-test-sample",
87
- "private": false,
88
- "owner": {
89
- "login": "ted3x",
90
- "id": 4340693,
91
- "node_id": "MDQ6VXNlcjQzNDA2OTM=",
92
- "avatar_url": "https://avatars0.githubusercontent.com/u/4340693?v=4",
93
- "gravatar_id": "",
94
- "url": "https://api.github.com/users/ted3x",
95
- "html_url": "https://github.com/ted3x",
96
- "followers_url": "https://api.github.com/users/ted3x/followers",
97
- "following_url": "https://api.github.com/users/ted3x/following{/other_user}",
98
- "gists_url": "https://api.github.com/users/ted3x/gists{/gist_id}",
99
- "starred_url": "https://api.github.com/users/ted3x/starred{/owner}{/repo}",
100
- "subscriptions_url": "https://api.github.com/users/ted3x/subscriptions",
101
- "organizations_url": "https://api.github.com/users/ted3x/orgs",
102
- "repos_url": "https://api.github.com/users/ted3x/repos",
103
- "events_url": "https://api.github.com/users/ted3x/events{/privacy}",
104
- "received_events_url": "https://api.github.com/users/ted3x/received_events",
105
- "type": "User",
106
- "site_admin": false
107
- },
108
- "html_url": "https://github.com/ted3x/my-danger-test-sample",
109
- "description": null,
110
- "fork": false,
111
- "url": "https://api.github.com/repos/ted3x/my-danger-test-sample",
112
- "forks_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/forks",
113
- "keys_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/keys{/key_id}",
114
- "collaborators_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/collaborators{/collaborator}",
115
- "teams_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/teams",
116
- "hooks_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/hooks",
117
- "issue_events_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/events{/number}",
118
- "events_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/events",
119
- "assignees_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/assignees{/user}",
120
- "branches_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/branches{/branch}",
121
- "tags_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/tags",
122
- "blobs_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/blobs{/sha}",
123
- "git_tags_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/tags{/sha}",
124
- "git_refs_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/refs{/sha}",
125
- "trees_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/trees{/sha}",
126
- "statuses_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/statuses/{sha}",
127
- "languages_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/languages",
128
- "stargazers_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/stargazers",
129
- "contributors_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/contributors",
130
- "subscribers_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/subscribers",
131
- "subscription_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/subscription",
132
- "commits_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/commits{/sha}",
133
- "git_commits_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/commits{/sha}",
134
- "comments_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/comments{/number}",
135
- "issue_comment_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/comments{/number}",
136
- "contents_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/contents/{+path}",
137
- "compare_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/compare/{base}...{head}",
138
- "merges_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/merges",
139
- "archive_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/{archive_format}{/ref}",
140
- "downloads_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/downloads",
141
- "issues_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues{/number}",
142
- "pulls_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls{/number}",
143
- "milestones_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/milestones{/number}",
144
- "notifications_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/notifications{?since,all,participating}",
145
- "labels_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/labels{/name}",
146
- "releases_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/releases{/id}",
147
- "deployments_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/deployments",
148
- "created_at": "2018-10-09T13:37:31Z",
149
- "updated_at": "2018-10-09T14:23:25Z",
150
- "pushed_at": "2018-10-09T14:24:18Z",
151
- "git_url": "git://github.com/ted3x/my-danger-test-sample.git",
152
- "ssh_url": "git@github.com:ted3x/my-danger-test-sample.git",
153
- "clone_url": "https://github.com/ted3x/my-danger-test-sample.git",
154
- "svn_url": "https://github.com/ted3x/my-danger-test-sample",
155
- "homepage": null,
156
- "size": 0,
157
- "stargazers_count": 0,
158
- "watchers_count": 0,
159
- "language": "Java",
160
- "has_issues": true,
161
- "has_projects": true,
162
- "has_downloads": true,
163
- "has_wiki": true,
164
- "has_pages": false,
165
- "forks_count": 0,
166
- "mirror_url": null,
167
- "archived": false,
168
- "open_issues_count": 1,
169
- "license": null,
170
- "forks": 0,
171
- "open_issues": 1,
172
- "watchers": 0,
173
- "default_branch": "checkstyle_format_base"
174
- }
175
- },
176
- "base": {
177
- "label": "ted3x:checkstyle_format_base",
178
- "ref": "checkstyle_format_base",
179
- "sha": "da77d53a73db723cc9c4f78c4a4cd44efa1df85f",
180
- "user": {
181
- "login": "ted3x",
182
- "id": 4340693,
183
- "node_id": "MDQ6VXNlcjQzNDA2OTM=",
184
- "avatar_url": "https://avatars0.githubusercontent.com/u/4340693?v=4",
185
- "gravatar_id": "",
186
- "url": "https://api.github.com/users/ted3x",
187
- "html_url": "https://github.com/ted3x",
188
- "followers_url": "https://api.github.com/users/ted3x/followers",
189
- "following_url": "https://api.github.com/users/ted3x/following{/other_user}",
190
- "gists_url": "https://api.github.com/users/ted3x/gists{/gist_id}",
191
- "starred_url": "https://api.github.com/users/ted3x/starred{/owner}{/repo}",
192
- "subscriptions_url": "https://api.github.com/users/ted3x/subscriptions",
193
- "organizations_url": "https://api.github.com/users/ted3x/orgs",
194
- "repos_url": "https://api.github.com/users/ted3x/repos",
195
- "events_url": "https://api.github.com/users/ted3x/events{/privacy}",
196
- "received_events_url": "https://api.github.com/users/ted3x/received_events",
197
- "type": "User",
198
- "site_admin": false
199
- },
200
- "repo": {
201
- "id": 152257381,
202
- "node_id": "MDEwOlJlcG9zaXRvcnkxNTIyNTczODE=",
203
- "name": "my-danger-test-sample",
204
- "full_name": "ted3x/my-danger-test-sample",
205
- "private": false,
206
- "owner": {
207
- "login": "ted3x",
208
- "id": 4340693,
209
- "node_id": "MDQ6VXNlcjQzNDA2OTM=",
210
- "avatar_url": "https://avatars0.githubusercontent.com/u/4340693?v=4",
211
- "gravatar_id": "",
212
- "url": "https://api.github.com/users/ted3x",
213
- "html_url": "https://github.com/ted3x",
214
- "followers_url": "https://api.github.com/users/ted3x/followers",
215
- "following_url": "https://api.github.com/users/ted3x/following{/other_user}",
216
- "gists_url": "https://api.github.com/users/ted3x/gists{/gist_id}",
217
- "starred_url": "https://api.github.com/users/ted3x/starred{/owner}{/repo}",
218
- "subscriptions_url": "https://api.github.com/users/ted3x/subscriptions",
219
- "organizations_url": "https://api.github.com/users/ted3x/orgs",
220
- "repos_url": "https://api.github.com/users/ted3x/repos",
221
- "events_url": "https://api.github.com/users/ted3x/events{/privacy}",
222
- "received_events_url": "https://api.github.com/users/ted3x/received_events",
223
- "type": "User",
224
- "site_admin": false
225
- },
226
- "html_url": "https://github.com/ted3x/my-danger-test-sample",
227
- "description": null,
228
- "fork": false,
229
- "url": "https://api.github.com/repos/ted3x/my-danger-test-sample",
230
- "forks_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/forks",
231
- "keys_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/keys{/key_id}",
232
- "collaborators_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/collaborators{/collaborator}",
233
- "teams_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/teams",
234
- "hooks_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/hooks",
235
- "issue_events_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/events{/number}",
236
- "events_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/events",
237
- "assignees_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/assignees{/user}",
238
- "branches_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/branches{/branch}",
239
- "tags_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/tags",
240
- "blobs_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/blobs{/sha}",
241
- "git_tags_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/tags{/sha}",
242
- "git_refs_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/refs{/sha}",
243
- "trees_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/trees{/sha}",
244
- "statuses_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/statuses/{sha}",
245
- "languages_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/languages",
246
- "stargazers_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/stargazers",
247
- "contributors_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/contributors",
248
- "subscribers_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/subscribers",
249
- "subscription_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/subscription",
250
- "commits_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/commits{/sha}",
251
- "git_commits_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/git/commits{/sha}",
252
- "comments_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/comments{/number}",
253
- "issue_comment_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/comments{/number}",
254
- "contents_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/contents/{+path}",
255
- "compare_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/compare/{base}...{head}",
256
- "merges_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/merges",
257
- "archive_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/{archive_format}{/ref}",
258
- "downloads_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/downloads",
259
- "issues_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues{/number}",
260
- "pulls_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls{/number}",
261
- "milestones_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/milestones{/number}",
262
- "notifications_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/notifications{?since,all,participating}",
263
- "labels_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/labels{/name}",
264
- "releases_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/releases{/id}",
265
- "deployments_url": "https://api.github.com/repos/ted3x/my-danger-test-sample/deployments",
266
- "created_at": "2018-10-09T13:37:31Z",
267
- "updated_at": "2018-10-09T14:23:25Z",
268
- "pushed_at": "2018-10-09T14:24:18Z",
269
- "git_url": "git://github.com/ted3x/my-danger-test-sample.git",
270
- "ssh_url": "git@github.com:ted3x/my-danger-test-sample.git",
271
- "clone_url": "https://github.com/ted3x/my-danger-test-sample.git",
272
- "svn_url": "https://github.com/ted3x/my-danger-test-sample",
273
- "homepage": null,
274
- "size": 0,
275
- "stargazers_count": 0,
276
- "watchers_count": 0,
277
- "language": "Java",
278
- "has_issues": true,
279
- "has_projects": true,
280
- "has_downloads": true,
281
- "has_wiki": true,
282
- "has_pages": false,
283
- "forks_count": 0,
284
- "mirror_url": null,
285
- "archived": false,
286
- "open_issues_count": 1,
287
- "license": null,
288
- "forks": 0,
289
- "open_issues": 1,
290
- "watchers": 0,
291
- "default_branch": "checkstyle_format_base"
292
- }
293
- },
294
- "_links": {
295
- "self": {
296
- "href": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/1"
297
- },
298
- "html": {
299
- "href": "https://github.com/ted3x/my-danger-test-sample/pull/1"
300
- },
301
- "issue": {
302
- "href": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/1"
303
- },
304
- "comments": {
305
- "href": "https://api.github.com/repos/ted3x/my-danger-test-sample/issues/1/comments"
306
- },
307
- "review_comments": {
308
- "href": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/1/comments"
309
- },
310
- "review_comment": {
311
- "href": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/comments{/number}"
312
- },
313
- "commits": {
314
- "href": "https://api.github.com/repos/ted3x/my-danger-test-sample/pulls/1/commits"
315
- },
316
- "statuses": {
317
- "href": "https://api.github.com/repos/ted3x/my-danger-test-sample/statuses/0338aa3df2e9f435d224f5dd31641e90d31a0b5a"
318
- }
319
- },
320
- "author_association": "OWNER",
321
- "merged": false,
322
- "mergeable": true,
323
- "rebaseable": true,
324
- "mergeable_state": "clean",
325
- "merged_by": null,
326
- "comments": 0,
327
- "review_comments": 0,
328
- "maintainer_can_modify": false,
329
- "commits": 2,
330
- "additions": 22,
331
- "deletions": 8,
332
- "changed_files": 3
333
- }