geet 0.11.0 → 0.12.0

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: 5a7aec65502343b49fbb084f6a1d2292ca989fd2808ec2172eac203580bf248a
4
- data.tar.gz: 0fbd2f00cb24732768c54cdcf444e91ecfff4ab9a57e7014584862d4faa317db
3
+ metadata.gz: c4f8d85a0f499afb70bb5a01c5e22664f70fbbc942a42109006bd725a314c8b7
4
+ data.tar.gz: 8b56dc95ce11072b21f4154b39dad49680fcd4f0601dd44bd4e407b7811b9df7
5
5
  SHA512:
6
- metadata.gz: fc20f226671abfba79a1199c61f50f2b9b0a54179d573dc1f323f0aa5292c0c9e465f3d2d904cf28f7206afeaba2d829e27f988d6dc9288ea541c57331e810a9
7
- data.tar.gz: a35e93bfc33fa2a2aa6c51183ac76ec696d2af8e079920368f77c416beadf5ac0232e66924ebad3ba3630a6c4401b3aa47cae596a5f3962090e79abb8a875dbc
6
+ metadata.gz: 9a6126ddc595b50dc9391c547533149d5c67496c1046f61e3173022c5ac143d71e51a0a4ca3c78344917cd2eab6549ca9d080c9d09258ab4c57092cd10db806a
7
+ data.tar.gz: 3a374c0aca85a391457e519caa0be56cc25ab2322f98ed81250792d4ea817865d72b57cc10ef45d09d699f54d1e55231e2ae4677cacc681d4ec8fc255835f9d2
data/geet.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.required_ruby_version = '>= 2.3.0'
12
12
  s.authors = ['Saverio Miroddi']
13
- s.date = '2022-07-27'
13
+ s.date = '2022-08-07'
14
14
  s.email = ['saverio.pub2@gmail.com']
15
15
  s.homepage = 'https://github.com/saveriomiroddi/geet'
16
16
  s.summary = 'Commandline interface for performing SCM host operations, eg. create a PR on GitHub'
@@ -136,28 +136,17 @@ module Geet
136
136
  end
137
137
 
138
138
  def edit_pr(pr, labels, milestone, reviewers)
139
- assign_user_thread = assign_authenticated_user(pr)
140
-
141
139
  # labels/reviewers can be nil (parameter not passed) or empty array (parameter passed, but
142
140
  # nothing selected)
143
141
  add_labels_thread = add_labels(pr, labels) if labels && !labels.empty?
144
142
  set_milestone_thread = set_milestone(pr, milestone) if milestone
145
143
  request_review_thread = request_review(pr, reviewers) if reviewers && !reviewers.empty?
146
144
 
147
- assign_user_thread.join
148
145
  add_labels_thread&.join
149
146
  set_milestone_thread&.join
150
147
  request_review_thread&.join
151
148
  end
152
149
 
153
- def assign_authenticated_user(pr)
154
- @out.puts 'Assigning authenticated user...'
155
-
156
- Thread.new do
157
- pr.assign_users(@repository.authenticated_user.username)
158
- end
159
- end
160
-
161
150
  def add_labels(pr, selected_labels)
162
151
  labels_list = selected_labels.map(&:name).join(', ')
163
152
 
data/lib/geet/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Geet
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
@@ -158,31 +158,32 @@ describe Geet::Services::CreatePr do
158
158
  # expect(actual_output.string).to eql(expected_output)
159
159
  # end
160
160
 
161
- it "should create a remote branch, when there isn't one (is not tracked)" do
162
- allow(git_client).to receive(:working_tree_clean?).and_return(true)
163
- allow(git_client).to receive(:current_branch).and_return('mybranch')
164
- allow(git_client).to receive(:main_branch).and_return('master')
165
- expect(git_client).to receive(:remote_branch).and_return(nil)
166
- expect(git_client).to receive(:push).with(remote_branch: 'mybranch')
167
-
168
- allow(git_client).to receive(:remote).with(no_args).and_return('git@github.com:donaldduck/testrepo_f')
169
-
170
- expected_output = <<~STR
171
- Creating remote branch "mybranch"...
172
- Creating PR...
173
- Assigning authenticated user...
174
- PR address: https://github.com/donaldduck/testrepo_f/pull/4
175
- STR
176
-
177
- actual_output = StringIO.new
178
-
179
- actual_created_pr = VCR.use_cassette('github_com/create_pr_in_auto_mode_create_upstream') do
180
- service_instance = described_class.new(repository, out: actual_output, git_client: git_client)
181
- service_instance.execute('Title', 'Description', output: actual_output, automated_mode: true, no_open_pr: true)
182
- end
183
-
184
- expect(actual_output.string).to eql(expected_output)
185
- end
161
+ it "should create a remote branch, when there isn't one (is not tracked)"
162
+ # do
163
+ # allow(git_client).to receive(:working_tree_clean?).and_return(true)
164
+ # allow(git_client).to receive(:current_branch).and_return('mybranch')
165
+ # allow(git_client).to receive(:main_branch).and_return('master')
166
+ # expect(git_client).to receive(:remote_branch).and_return(nil)
167
+ # expect(git_client).to receive(:push).with(remote_branch: 'mybranch')
168
+ #
169
+ # allow(git_client).to receive(:remote).with(no_args).and_return('git@github.com:donaldduck/testrepo_f')
170
+ #
171
+ # expected_output = <<~STR
172
+ # Creating remote branch "mybranch"...
173
+ # Creating PR...
174
+ # Assigning authenticated user...
175
+ # PR address: https://github.com/donaldduck/testrepo_f/pull/4
176
+ # STR
177
+ #
178
+ # actual_output = StringIO.new
179
+ #
180
+ # actual_created_pr = VCR.use_cassette('github_com/create_pr_in_auto_mode_create_upstream') do
181
+ # service_instance = described_class.new(repository, out: actual_output, git_client: git_client)
182
+ # service_instance.execute('Title', 'Description', output: actual_output, automated_mode: true, no_open_pr: true)
183
+ # end
184
+ #
185
+ # expect(actual_output.string).to eql(expected_output)
186
+ # end
186
187
  end
187
188
  end # context 'with github.com'
188
189
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saverio Miroddi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-27 00:00:00.000000000 Z
11
+ date: 2022-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_scripting