git_reflow 0.8.4 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +1 -1
  3. data/Gemfile.lock +17 -17
  4. data/git_reflow.gemspec +1 -1
  5. data/lib/git_reflow/config.rb +1 -1
  6. data/lib/git_reflow/git_helpers.rb +2 -2
  7. data/lib/git_reflow/git_server/bit_bucket/pull_request.rb +1 -1
  8. data/lib/git_reflow/git_server/git_hub/pull_request.rb +11 -10
  9. data/lib/git_reflow/git_server/pull_request.rb +18 -4
  10. data/lib/git_reflow/rspec/command_line_helpers.rb +9 -9
  11. data/lib/git_reflow/version.rb +1 -1
  12. data/lib/git_reflow/workflow.rb +6 -1
  13. data/lib/git_reflow/workflows/core.rb +1 -3
  14. data/lib/git_reflow/workflows/flat_merge.rb +10 -0
  15. data/lib/git_reflow.rb +9 -1
  16. metadata +7 -70
  17. data/spec/fixtures/git/git_config +0 -7
  18. data/spec/fixtures/issues/comment.json.erb +0 -27
  19. data/spec/fixtures/issues/comments.json +0 -29
  20. data/spec/fixtures/issues/comments.json.erb +0 -15
  21. data/spec/fixtures/pull_requests/comment.json.erb +0 -45
  22. data/spec/fixtures/pull_requests/comments.json +0 -47
  23. data/spec/fixtures/pull_requests/comments.json.erb +0 -15
  24. data/spec/fixtures/pull_requests/commits.json +0 -29
  25. data/spec/fixtures/pull_requests/external_pull_request.json +0 -145
  26. data/spec/fixtures/pull_requests/pull_request.json +0 -142
  27. data/spec/fixtures/pull_requests/pull_request.json.erb +0 -142
  28. data/spec/fixtures/pull_requests/pull_request_exists_error.json +0 -32
  29. data/spec/fixtures/pull_requests/pull_requests.json +0 -136
  30. data/spec/fixtures/repositories/commit.json +0 -53
  31. data/spec/fixtures/repositories/commit.json.erb +0 -53
  32. data/spec/fixtures/repositories/commits.json.erb +0 -13
  33. data/spec/fixtures/repositories/statuses.json +0 -31
  34. data/spec/lib/git_reflow/config_spec.rb +0 -74
  35. data/spec/lib/git_reflow/git_helpers_spec.rb +0 -182
  36. data/spec/lib/git_reflow/git_server_spec.rb +0 -101
  37. data/spec/lib/git_reflow/workflow_spec.rb +0 -56
  38. data/spec/lib/git_reflow/workflows/core_spec.rb +0 -665
  39. data/spec/lib/git_reflow_spec.rb +0 -39
  40. data/spec/lib/git_server/bit_bucket_spec.rb +0 -81
  41. data/spec/lib/git_server/git_hub/pull_request_spec.rb +0 -472
  42. data/spec/lib/git_server/git_hub_spec.rb +0 -221
  43. data/spec/lib/git_server/pull_request_spec.rb +0 -583
  44. data/spec/spec_helper.rb +0 -38
  45. data/spec/support/fake_github.rb +0 -128
  46. data/spec/support/fixtures.rb +0 -54
  47. data/spec/support/github_helpers.rb +0 -109
  48. data/spec/support/web_mocks.rb +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34e27773b70add5bd01632ee991dda30f839404e
4
- data.tar.gz: 499009182bc3266f823a20fb82149c595d1d5f6f
3
+ metadata.gz: aff579a99bf1d2fba19d695f83b74b4ec60f1d96
4
+ data.tar.gz: 2b88a4354dcdc7ec81716811c47c85629b406d3a
5
5
  SHA512:
6
- metadata.gz: 15bd0fdd708a8f75caff0dbcb68330b5958de09fc763b50e48b264070508844ac63f2b006b33130b326ce365fa674bb1db18f9dafaf5a77f4acfa74812bb69aa
7
- data.tar.gz: 1efb8f91ea481b608320f0284717f303b36d21392966c344aff27215bd3a7791cd40a54093e55c9ba860a2e6eec0c6b3836eccf94b8930cbbb4483e55c578982
6
+ metadata.gz: 9472643e0738ee67fa1e2b31a55462f7d8feb41b7f632fca576427bb073230373c46fea61866e5ce4aef633f48ed7d14552bd1114f657fa88f7db78617bad742
7
+ data.tar.gz: 918cef6fb2a1e3bf8279a95c5ee07802557e3f98faa378680bc6492c54ba85a832d39466fcd8805311cba09abeef48854d4a77a3248f2dd30caf185d63141ebb
data/Appraisals CHANGED
@@ -8,5 +8,5 @@ end
8
8
 
9
9
  appraise "current-reflow-locked-versions" do
10
10
  gem "gli", "2.14.0"
11
- gem "github_api", "0.14.0"
11
+ gem "github_api", "0.15.0"
12
12
  end
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_reflow (0.8.4)
4
+ git_reflow (0.8.6)
5
5
  colorize (>= 0.7.0)
6
- github_api (= 0.14.0)
6
+ github_api (= 0.15.0)
7
7
  gli (= 2.14.0)
8
8
  highline
9
9
  httpclient
@@ -21,7 +21,7 @@ GEM
21
21
  byebug (9.0.4)
22
22
  chronic (0.10.2)
23
23
  coderay (1.1.1)
24
- colorize (0.7.7)
24
+ colorize (0.8.1)
25
25
  crack (0.4.3)
26
26
  safe_yaml (~> 1.0.0)
27
27
  descendants_tracker (0.0.4)
@@ -31,34 +31,34 @@ GEM
31
31
  multipart-post (>= 1.2, < 3)
32
32
  faraday_middleware (0.9.2)
33
33
  faraday (>= 0.7.4, < 0.10)
34
- github_api (0.14.0)
34
+ github_api (0.15.0)
35
35
  addressable (~> 2.4.0)
36
36
  descendants_tracker (~> 0.0.4)
37
37
  faraday (~> 0.8, < 0.10)
38
38
  hashie (>= 3.4)
39
- oauth2
39
+ mime-types (>= 1.16, < 3.0)
40
+ oauth2 (~> 1.0)
40
41
  gli (2.14.0)
41
42
  hashdiff (0.3.0)
42
- hashie (3.4.4)
43
+ hashie (3.5.5)
43
44
  highline (1.7.8)
44
- httpclient (2.8.0)
45
+ httpclient (2.8.3)
45
46
  json (1.8.3)
46
- jwt (1.5.4)
47
+ jwt (1.5.6)
47
48
  method_source (0.8.2)
49
+ mime-types (2.99.3)
48
50
  mini_portile2 (2.1.0)
49
51
  multi_json (1.12.1)
50
- multi_xml (0.5.5)
52
+ multi_xml (0.6.0)
51
53
  multipart-post (2.0.0)
52
- nokogiri (1.6.8)
54
+ nokogiri (1.7.1)
53
55
  mini_portile2 (~> 2.1.0)
54
- pkg-config (~> 1.1.7)
55
- oauth2 (1.2.0)
56
- faraday (>= 0.8, < 0.10)
56
+ oauth2 (1.3.1)
57
+ faraday (>= 0.8, < 0.12)
57
58
  jwt (~> 1.0)
58
59
  multi_json (~> 1.3)
59
60
  multi_xml (~> 0.5)
60
61
  rack (>= 1.2, < 3)
61
- pkg-config (1.1.7)
62
62
  pry (0.10.3)
63
63
  coderay (~> 1.1.0)
64
64
  method_source (~> 0.8.1)
@@ -66,7 +66,7 @@ GEM
66
66
  pry-byebug (3.4.0)
67
67
  byebug (~> 9.0)
68
68
  pry (~> 0.10)
69
- rack (1.6.4)
69
+ rack (1.6.5)
70
70
  rake (11.1.2)
71
71
  rdoc (4.2.2)
72
72
  json (~> 1.4)
@@ -94,7 +94,7 @@ GEM
94
94
  simple_oauth (0.3.1)
95
95
  slop (3.6.0)
96
96
  thor (0.19.1)
97
- thread_safe (0.3.5)
97
+ thread_safe (0.3.6)
98
98
  webmock (2.0.3)
99
99
  addressable (>= 2.3.6)
100
100
  crack (>= 0.3.2)
@@ -117,4 +117,4 @@ DEPENDENCIES
117
117
  wwtd (= 1.3.0)
118
118
 
119
119
  BUNDLED WITH
120
- 1.12.5
120
+ 1.14.3
data/git_reflow.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency('gli', '2.14.0')
34
34
  s.add_dependency('highline')
35
35
  s.add_dependency('httpclient')
36
- s.add_dependency('github_api', '0.14.0')
36
+ s.add_dependency('github_api', '0.15.0')
37
37
  # rack is a dependency of oauth2, which is a dependency of github_api
38
38
  # The latest rack only supports ruby > 2.2.2, so we lock this down until
39
39
  # support for ruby 2.1.x is dropped
@@ -2,7 +2,7 @@ module GitReflow
2
2
  module Config
3
3
  extend self
4
4
 
5
- CONFIG_FILE_PATH = "$HOME/.gitconfig.reflow".freeze
5
+ CONFIG_FILE_PATH = "#{ENV['HOME']}/.gitconfig.reflow".freeze
6
6
 
7
7
  def get(key, reload: false, all: false, local: false)
8
8
  if reload == false and cached_key_value = instance_variable_get(:"@#{key.tr('.-', '_')}")
@@ -34,8 +34,8 @@ module GitReflow
34
34
  end
35
35
 
36
36
  def pull_request_template
37
- filenames_to_try = %w( github/PULL_REQUEST_TEMPLATE.md
38
- github/PULL_REQUEST_TEMPLATE
37
+ filenames_to_try = %w( .github/PULL_REQUEST_TEMPLATE.md
38
+ .github/PULL_REQUEST_TEMPLATE
39
39
  PULL_REQUEST_TEMPLATE.md
40
40
  PULL_REQUEST_TEMPLATE ).map do |file|
41
41
  "#{git_root_dir}/#{file}"
@@ -10,7 +10,7 @@ module GitReflow
10
10
  self.html_url = "#{attributes.source.repository.links.html.href}/pull-request/#{self.number}"
11
11
  self.feature_branch_name = attributes.source.branch.name[/[^:]+$/]
12
12
  self.base_branch_name = attributes.destination.branch.name[/[^:]+$/]
13
- self.build_status = nil
13
+ self.build = Build.new
14
14
  self.source_object = attributes
15
15
  end
16
16
 
@@ -11,7 +11,7 @@ module GitReflow
11
11
  self.feature_branch_name = attributes.head.label[/[^:]+$/]
12
12
  self.base_branch_name = attributes.base.label[/[^:]+$/]
13
13
  self.source_object = attributes
14
- self.build_status = build.state
14
+ self.build = Build.new(state: build.state, description: build.description, url: build.url)
15
15
  end
16
16
 
17
17
  def self.create(options = {})
@@ -116,15 +116,17 @@ module GitReflow
116
116
  GitReflow.say "--------\n"
117
117
  end
118
118
 
119
+ options[:body] = "#{options[:message]}\n" if options[:body].nil? and "#{options[:message]}".length > 0
120
+
119
121
  merge_response = GitReflow::GitServer::GitHub.connection.pull_requests.merge(
120
122
  "#{GitReflow.git_server.class.remote_user}",
121
123
  "#{GitReflow.git_server.class.remote_repo_name}",
122
124
  "#{self.number}",
123
125
  {
124
- "commit_title" => "#{options[:title]}",
126
+ "commit_title" => "#{options[:title]}",
125
127
  "commit_message" => "#{options[:body]}",
126
- "sha" => "#{self.head.sha}",
127
- "squash" => true
128
+ "sha" => "#{self.head.sha}",
129
+ "squash" => !(options[:squash] == false)
128
130
  }
129
131
  )
130
132
 
@@ -153,15 +155,14 @@ module GitReflow
153
155
 
154
156
  def build
155
157
  github_build_status = GitReflow.git_server.get_build_status(self.head.sha)
156
- build_status_object = Struct.new(:state, :description, :url)
157
158
  if github_build_status
158
- build_status_object.new(
159
- github_build_status.state,
160
- github_build_status.description,
161
- github_build_status.target_url
159
+ Build.new(
160
+ state: github_build_status.state,
161
+ description: github_build_status.description,
162
+ url: github_build_status.target_url
162
163
  )
163
164
  else
164
- build_status_object.new
165
+ Build.new
165
166
  end
166
167
  end
167
168
 
@@ -1,10 +1,20 @@
1
1
  module GitReflow
2
2
  module GitServer
3
3
  class PullRequest
4
- attr_accessor :description, :html_url, :feature_branch_name, :base_branch_name, :build_status, :source_object, :number
4
+ attr_accessor :description, :html_url, :feature_branch_name, :base_branch_name, :build, :source_object, :number
5
5
 
6
6
  DEFAULT_APPROVAL_REGEX = /(?i-mx:lgtm|looks good to me|:\+1:|:thumbsup:|:shipit:)/
7
7
 
8
+ class Build
9
+ attr_accessor :state, :description, :url
10
+
11
+ def initialize(state: nil, description: nil, url: nil)
12
+ self.state = state
13
+ self.description = description
14
+ self.url = url
15
+ end
16
+ end
17
+
8
18
  def self.minimum_approvals
9
19
  "#{GitReflow::Config.get('constants.minimumApprovals')}"
10
20
  end
@@ -34,7 +44,7 @@ module GitReflow
34
44
  end
35
45
 
36
46
  def last_comment
37
- raise "#{self.class.to_s}#last_comment_for method must be implemented"
47
+ raise "#{self.class.to_s}#last_comment method must be implemented"
38
48
  end
39
49
 
40
50
  def reviewers
@@ -63,6 +73,10 @@ module GitReflow
63
73
  end
64
74
  end
65
75
 
76
+ def build_status
77
+ build.nil? ? nil : build.state
78
+ end
79
+
66
80
  def rejection_message
67
81
  if !build_status.nil? and build_status != "success"
68
82
  "#{build.description}: #{build.url}"
@@ -83,7 +97,7 @@ module GitReflow
83
97
  end
84
98
 
85
99
  def all_comments_addressed?
86
- self.class.minimum_approvals.length <= 0 or last_comment.match(self.class.approval_regex)
100
+ self.class.minimum_approvals.length <= 0 or !last_comment.match(self.class.approval_regex).nil?
87
101
  end
88
102
 
89
103
  def good_to_merge?(force: false)
@@ -186,7 +200,7 @@ module GitReflow
186
200
 
187
201
  GitReflow.run_command_with_label "git checkout #{self.base_branch_name}"
188
202
  GitReflow.run_command_with_label "git pull origin #{self.base_branch_name}"
189
- GitReflow.run_command_with_label "git merge --squash #{self.feature_branch_name}"
203
+ GitReflow.run_command_with_label "git merge #{options[:squash] == false ? '' : '--squash '}#{self.feature_branch_name}"
190
204
 
191
205
  GitReflow.append_to_squashed_commit_message(message) if message.length > 0
192
206
 
@@ -101,20 +101,20 @@ end
101
101
  RSpec::Matchers.define :have_run_commands_in_order do |commands|
102
102
  match do |block|
103
103
  block.call
104
- command_count = commands.count
105
- command_start_index = $commands_ran.reverse.find_index {|c| c.command == commands.first }
104
+ remaining_commands = commands
105
+ command_start_index = $commands_ran.find_index {|c| c.command == commands.first }
106
106
  return false unless command_start_index
107
107
 
108
- $commands_ran.reverse.each_with_index do |command_ran, index|
109
- next unless command_start_index
110
- if command_count >= 1
111
- current_command = commands[command_count - 1]
112
- expect(current_command).to eq(command_ran.command)
113
- command_count -= 1
108
+ $commands_ran.each_with_index do |command_ran, index|
109
+ # seek to starting point of first command to match
110
+ next unless index >= command_start_index
111
+ if remaining_commands.size > 0
112
+ expect(remaining_commands[0]).to eq(command_ran.command)
113
+ remaining_commands.shift
114
114
  end
115
115
  end
116
116
 
117
- return command_count == 0
117
+ return remaining_commands.count == 0
118
118
  end
119
119
 
120
120
  supports_block_expectations
@@ -1,3 +1,3 @@
1
1
  module GitReflow
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.6"
3
3
  end
@@ -9,7 +9,12 @@ module GitReflow
9
9
 
10
10
  # @nodoc
11
11
  def self.current
12
- GitReflow::Workflows::Core
12
+ workflow_file = GitReflow::Config.get('reflow.workflow')
13
+ if workflow_file.length > 0 and File.exists?(workflow_file)
14
+ eval(File.read(workflow_file))
15
+ else
16
+ GitReflow::Workflows::Core
17
+ end
13
18
  end
14
19
 
15
20
  module ClassMethods
@@ -5,11 +5,9 @@ module GitReflow
5
5
  module Workflows
6
6
  # This class contains the core workflow for git-reflow. Going forward, this
7
7
  # will act as the base class for customizing and extending git-reflow.
8
- module Core
8
+ class Core
9
9
  include GitReflow::Workflow
10
10
 
11
- extend self
12
-
13
11
  # Sets up the required git configurations that git-reflow depends on.
14
12
  #
15
13
  # @param local [Boolean] whether to configure git-reflow specific to the current project
@@ -0,0 +1,10 @@
1
+ class FlatMerge < GitReflow::Workflows::Core
2
+ def self.deliver(**params)
3
+ base_branch = params[:base] || 'master'
4
+ params[:squash] = false
5
+
6
+ super(**params)
7
+ end
8
+ end
9
+
10
+ FlatMerge
data/lib/git_reflow.rb CHANGED
@@ -1,11 +1,19 @@
1
1
  require 'rubygems'
2
2
  require 'open-uri'
3
+ require 'github_api'
3
4
  require "highline/import"
4
5
  require 'httpclient'
5
- require 'github_api'
6
6
  require 'json'
7
7
  require 'colorize'
8
8
 
9
+ # XXX: work around logger spam from hashie (required by github api)
10
+ # https://github.com/intridea/hashie/issues/394
11
+ require "hashie"
12
+ require "hashie/logger"
13
+ Hashie.logger = Logger.new(nil)
14
+
15
+
16
+ require 'github_api'
9
17
  require 'git_reflow/version.rb' unless defined?(GitReflow::VERSION)
10
18
  require 'git_reflow/config'
11
19
  require 'git_reflow/git_helpers'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_reflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentino Stoll
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2016-08-22 00:00:00.000000000 Z
13
+ date: 2017-03-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: appraisal
@@ -200,14 +200,14 @@ dependencies:
200
200
  requirements:
201
201
  - - '='
202
202
  - !ruby/object:Gem::Version
203
- version: 0.14.0
203
+ version: 0.15.0
204
204
  type: :runtime
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - '='
209
209
  - !ruby/object:Gem::Version
210
- version: 0.14.0
210
+ version: 0.15.0
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: rack
213
213
  requirement: !ruby/object:Gem::Requirement
@@ -291,38 +291,7 @@ files:
291
291
  - lib/git_reflow/version.rb
292
292
  - lib/git_reflow/workflow.rb
293
293
  - lib/git_reflow/workflows/core.rb
294
- - spec/fixtures/git/git_config
295
- - spec/fixtures/issues/comment.json.erb
296
- - spec/fixtures/issues/comments.json
297
- - spec/fixtures/issues/comments.json.erb
298
- - spec/fixtures/pull_requests/comment.json.erb
299
- - spec/fixtures/pull_requests/comments.json
300
- - spec/fixtures/pull_requests/comments.json.erb
301
- - spec/fixtures/pull_requests/commits.json
302
- - spec/fixtures/pull_requests/external_pull_request.json
303
- - spec/fixtures/pull_requests/pull_request.json
304
- - spec/fixtures/pull_requests/pull_request.json.erb
305
- - spec/fixtures/pull_requests/pull_request_exists_error.json
306
- - spec/fixtures/pull_requests/pull_requests.json
307
- - spec/fixtures/repositories/commit.json
308
- - spec/fixtures/repositories/commit.json.erb
309
- - spec/fixtures/repositories/commits.json.erb
310
- - spec/fixtures/repositories/statuses.json
311
- - spec/lib/git_reflow/config_spec.rb
312
- - spec/lib/git_reflow/git_helpers_spec.rb
313
- - spec/lib/git_reflow/git_server_spec.rb
314
- - spec/lib/git_reflow/workflow_spec.rb
315
- - spec/lib/git_reflow/workflows/core_spec.rb
316
- - spec/lib/git_reflow_spec.rb
317
- - spec/lib/git_server/bit_bucket_spec.rb
318
- - spec/lib/git_server/git_hub/pull_request_spec.rb
319
- - spec/lib/git_server/git_hub_spec.rb
320
- - spec/lib/git_server/pull_request_spec.rb
321
- - spec/spec_helper.rb
322
- - spec/support/fake_github.rb
323
- - spec/support/fixtures.rb
324
- - spec/support/github_helpers.rb
325
- - spec/support/web_mocks.rb
294
+ - lib/git_reflow/workflows/flat_merge.rb
326
295
  homepage: http://github.com/reenhanced/gitreflow
327
296
  licenses:
328
297
  - MIT
@@ -350,40 +319,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
319
  version: '0'
351
320
  requirements: []
352
321
  rubyforge_project:
353
- rubygems_version: 2.5.1
322
+ rubygems_version: 2.5.2
354
323
  signing_key:
355
324
  specification_version: 4
356
325
  summary: A better git process
357
- test_files:
358
- - spec/fixtures/git/git_config
359
- - spec/fixtures/issues/comment.json.erb
360
- - spec/fixtures/issues/comments.json
361
- - spec/fixtures/issues/comments.json.erb
362
- - spec/fixtures/pull_requests/comment.json.erb
363
- - spec/fixtures/pull_requests/comments.json
364
- - spec/fixtures/pull_requests/comments.json.erb
365
- - spec/fixtures/pull_requests/commits.json
366
- - spec/fixtures/pull_requests/external_pull_request.json
367
- - spec/fixtures/pull_requests/pull_request.json
368
- - spec/fixtures/pull_requests/pull_request.json.erb
369
- - spec/fixtures/pull_requests/pull_request_exists_error.json
370
- - spec/fixtures/pull_requests/pull_requests.json
371
- - spec/fixtures/repositories/commit.json
372
- - spec/fixtures/repositories/commit.json.erb
373
- - spec/fixtures/repositories/commits.json.erb
374
- - spec/fixtures/repositories/statuses.json
375
- - spec/lib/git_reflow/config_spec.rb
376
- - spec/lib/git_reflow/git_helpers_spec.rb
377
- - spec/lib/git_reflow/git_server_spec.rb
378
- - spec/lib/git_reflow/workflow_spec.rb
379
- - spec/lib/git_reflow/workflows/core_spec.rb
380
- - spec/lib/git_reflow_spec.rb
381
- - spec/lib/git_server/bit_bucket_spec.rb
382
- - spec/lib/git_server/git_hub/pull_request_spec.rb
383
- - spec/lib/git_server/git_hub_spec.rb
384
- - spec/lib/git_server/pull_request_spec.rb
385
- - spec/spec_helper.rb
386
- - spec/support/fake_github.rb
387
- - spec/support/fixtures.rb
388
- - spec/support/github_helpers.rb
389
- - spec/support/web_mocks.rb
326
+ test_files: []
@@ -1,7 +0,0 @@
1
- [user]
2
- name = Reenhanced
3
- email = dev@reenhanced.com
4
- [github]
5
- user = reenhanced
6
- token = 123456
7
- oauth-token = 123456
@@ -1,27 +0,0 @@
1
- {
2
- "id": <%= id || 1 %>,
3
- "url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/issues/comments/<%= pull_request_number %>",
4
- "html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/issues/<%= pull_request_number %>#issuecomment-1",
5
- "body": "<%= body || "Hmmm..." %>",
6
- "user": {
7
- "login": "<%= author %>",
8
- "id": 1,
9
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
10
- "gravatar_id": "somehexcode",
11
- "url": "https://api.github.com/users/<%= author %>",
12
- "html_url": "https://github.com/<%= author %>",
13
- "followers_url": "https://api.github.com/users/<%= author %>/followers",
14
- "following_url": "https://api.github.com/users/<%= author %>/following{/other_user}",
15
- "gists_url": "https://api.github.com/users/<%= author %>/gists{/gist_id}",
16
- "starred_url": "https://api.github.com/users/<%= author %>/starred{/owner}{/repo}",
17
- "subscriptions_url": "https://api.github.com/users/<%= author %>/subscriptions",
18
- "organizations_url": "https://api.github.com/users/<%= author %>/orgs",
19
- "repos_url": "https://api.github.com/users/<%= author %>/repos",
20
- "events_url": "https://api.github.com/users/<%= author %>/events{/privacy}",
21
- "received_events_url": "https://api.github.com/users/<%= author %>/received_events",
22
- "type": "User",
23
- "site_admin": false
24
- },
25
- "created_at": "<%= created_at %>",
26
- "updated_at": "2011-04-14T16:00:49Z"
27
- }
@@ -1,29 +0,0 @@
1
- [
2
- {
3
- "id": 1,
4
- "url": "https://api.github.com/repos/reenhanced/repo/issues/comments/1",
5
- "html_url": "https://github.com/reenhanced/repo/issues/1#issuecomment-1",
6
- "body": "Me too",
7
- "user": {
8
- "login": "reenhanced",
9
- "id": 1,
10
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
11
- "gravatar_id": "somehexcode",
12
- "url": "https://api.github.com/users/reenhanced",
13
- "html_url": "https://github.com/reenhanced",
14
- "followers_url": "https://api.github.com/users/reenhanced/followers",
15
- "following_url": "https://api.github.com/users/reenhanced/following{/other_user}",
16
- "gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
17
- "starred_url": "https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
18
- "subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
19
- "organizations_url": "https://api.github.com/users/reenhanced/orgs",
20
- "repos_url": "https://api.github.com/users/reenhanced/repos",
21
- "events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
22
- "received_events_url": "https://api.github.com/users/reenhanced/received_events",
23
- "type": "User",
24
- "site_admin": false
25
- },
26
- "created_at": "2011-04-14T16:00:49Z",
27
- "updated_at": "2011-04-14T16:00:49Z"
28
- }
29
- ]
@@ -1,15 +0,0 @@
1
- [
2
- <% comment_json = [] %>
3
- <% comments.each_with_index do |comment, index| %>
4
- <% comment_json << Fixture.new('issues/comment.json.erb',
5
- id: comment[:id] || index + 1,
6
- author: comment[:author],
7
- pull_request_number: pull_request_number,
8
- repo_owner: repo_owner,
9
- repo_name: repo_name,
10
- body: comment[:body] || 'Hmmm...',
11
- created_at: comment[:created_at] || '2011-04-14T16:00:49Z'
12
- ).to_s %>
13
- <% end %>
14
- <%= comment_json.join(", ") %>
15
- ]
@@ -1,45 +0,0 @@
1
- {
2
- "url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= id || 1 %>",
3
- "id": <%= id || 1 %>,
4
- "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
5
- "path": "file1.txt",
6
- "position": 1,
7
- "original_position": 4,
8
- "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
9
- "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
10
- "user": {
11
- "login": "<%= author %>",
12
- "id": 1,
13
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
14
- "gravatar_id": "somehexcode",
15
- "url": "https://api.github.com/users/<%= author %>",
16
- "html_url": "https://github.com/<%= author %>",
17
- "followers_url": "https://api.github.com/users/<%= author %>/followers",
18
- "following_url": "https://api.github.com/users/<%= author %>/following{/other_user}",
19
- "gists_url": "https://api.github.com/users/<%= author %>/gists{/gist_id}",
20
- "starred_url": "https://api.github.com/users/<%= author %>/starred{/owner}{/repo}",
21
- "subscriptions_url": "https://api.github.com/users/<%= author %>/subscriptions",
22
- "organizations_url": "https://api.github.com/users/<%= author %>/orgs",
23
- "repos_url": "https://api.github.com/users/<%= author %>/repos",
24
- "events_url": "https://api.github.com/users/<%= author %>/events{/privacy}",
25
- "received_events_url": "https://api.github.com/users/<%= author %>/received_events",
26
- "type": "User",
27
- "site_admin": false
28
- },
29
- "body": "<%= body || "Great stuff" %>",
30
- "created_at": "<%= created_at || "2011-04-14T16:00:49Z" %>",
31
- "updated_at": "<%= updated_at || created_at || "2011-04-14T16:00:49Z" %>",
32
- "html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>",
33
- "pull_request_url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>",
34
- "_links": {
35
- "self": {
36
- "href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= pull_request_number %>"
37
- },
38
- "html": {
39
- "href": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>"
40
- },
41
- "pull_request": {
42
- "href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>"
43
- }
44
- }
45
- }