zd_hire 0.0.7 → 0.1.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
- SHA1:
3
- metadata.gz: 4735edf1f2bdf97db3c7265e6b670ec150442e25
4
- data.tar.gz: 435056b7170b02c94028b0f6209fbb50767a42e3
2
+ SHA256:
3
+ metadata.gz: 26efc81116fbb88c56a592f68b3695b25e4900337b36e42d475448bb93888660
4
+ data.tar.gz: eb88660f903a65e7cd0c985342651b5389f80c5c947f1e4177b216098006101d
5
5
  SHA512:
6
- metadata.gz: ba30a72d02291b686cb7df8ec34348832875c4b287ac60fbac7249dda76569f6b4d2e57946b7b14c5b38348892049856ebba1741e97e68c9d12247cbf64c94f0
7
- data.tar.gz: 9dfd746888401c7896172300d5c7bcc24299ddd64b4ce6e73cd95a410ae25fc4a87d0b6c60053fac81c7f1c0b8ea54298a2bbffe09034bd8a0cc59821bd0f1e7
6
+ metadata.gz: e28c6f129fd0923ca720ddd2c8b3ba46019b5fb8117f1a5109c7101ba3c09eda302b2c8b541540835c0bc882c6ed72591c12dfe2ce9f6d2470764112e2b640b8
7
+ data.tar.gz: 7836c3c41c7def886d417fb39254ce0af554c3ecaa9c6a1af7d91e5130263d2dce035057b99a445de4aa56ab91687453506c7020e7225ff840f7cf4160331041
@@ -0,0 +1,17 @@
1
+ name: repo-checks
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ main:
7
+ name: ruby-simple
8
+ runs-on: [self-hosted, zendesk-stable]
9
+ steps:
10
+ - uses: zendesk/checkout@v2
11
+ - uses: zendesk/setup-ruby@v1
12
+ - name: script
13
+ run: |
14
+ gem install bundler -v 2.3.0
15
+ gem uninstall bundler -v '>2.3.0'
16
+ bundle install
17
+ bundle exec rake
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.1.2
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ ![repo-checks](https://github.com/zendesk/zd_hire/workflows/repo-checks/badge.svg)
1
2
  # ZdHire
2
3
 
3
4
  Clone orphaned repositories from a Github origin and copy selected issues to the new repo.
data/bin/zd_hire CHANGED
@@ -23,7 +23,7 @@ POSITION_LEVEL_LABELS = %w{
23
23
  software_engineer
24
24
  senior_software_engineer
25
25
  staff_engineer
26
- senior_staff_engineer
26
+ senior_staff_engineer (please use the staff_engineer test and manually remove the time limit from README)
27
27
  }
28
28
 
29
29
  def token_validator
@@ -49,7 +49,7 @@ def local_origin_validator
49
49
  end
50
50
 
51
51
  def config
52
- @config ||= ZdHire::Config.new
52
+ @config ||= ZdHire::Config.new
53
53
  end
54
54
 
55
55
  def github
@@ -87,7 +87,7 @@ command :init do |c|
87
87
  q.responses.merge!(not_valid: "Couldn't find repo path in local filesystem. E.g (~/Code/myrepo)")
88
88
  end
89
89
 
90
- config.branch = ask("Default branch to export: ") { |q| q.default = 'master' }
90
+ config.branch = ask("Default branch to export: ") { |q| q.default = 'main' }
91
91
  config.serialize_to_file
92
92
  end
93
93
  end
@@ -129,12 +129,12 @@ def create_pr(new_repo)
129
129
  "git pull #{config.local_path} #{branch} --no-edit",
130
130
  "git push origin #{branch}"
131
131
  ].join(' && ')
132
-
132
+
133
133
  say "Pulling from local branch..."
134
134
  execute(command, wait_response: true)
135
135
  sleep 1
136
136
  say "Creating PR in target repository..."
137
- github.create_pull_request(new_repo.full_name, 'master', branch, selected.title, selected.body)
137
+ github.create_pull_request(new_repo.full_name, 'main', branch, selected.title, selected.body)
138
138
  end
139
139
 
140
140
  def origin_default_issue
@@ -220,9 +220,9 @@ end
220
220
  def clone_repository(origin, target)
221
221
  say "Cloning repository..."
222
222
  command = [
223
- "git clone https://github.com/#{origin}.git -b master --single-branch #{target}",
223
+ "git clone https://github.com/#{origin}.git -b main --single-branch #{target}",
224
224
  ].join(' && ')
225
-
225
+
226
226
  execute(command)
227
227
  end
228
228
 
@@ -231,9 +231,9 @@ def setup_remote(target_dir, remote_repo)
231
231
  command = [
232
232
  "cd #{target_dir}",
233
233
  "git remote set-url origin #{remote_repo.ssh_url}",
234
- 'git push -u origin master'
234
+ 'git push -u origin main'
235
235
  ].join(' && ')
236
-
236
+
237
237
  execute(command)
238
238
  end
239
239
 
@@ -286,7 +286,7 @@ def ask_if_custom(question, default)
286
286
  end
287
287
 
288
288
  def agree_if_custom(*args, &block)
289
- raise LocalJumpError unless block_given?
289
+ raise LocalJumpError unless block_given?
290
290
  if $custom
291
291
  yield if agree(*args)
292
292
  else
@@ -299,4 +299,4 @@ def repo_attributes
299
299
  has_issues: true,
300
300
  has_wiki: false
301
301
  }
302
- end
302
+ end
@@ -1,3 +1,3 @@
1
1
  module ZdHire
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0"
3
3
  end
data/zd_hire.gemspec CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_runtime_dependency 'commander', '~> 4.4', '>= 4.4.3'
22
22
  spec.add_runtime_dependency 'octokit', '~> 4.9', '>= 4.9.0'
23
-
24
- spec.add_development_dependency "bundler", "~> 1.12"
23
+
24
+ spec.add_development_dependency "bundler", "~> 2.3"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zd_hire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Angelim
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-04 00:00:00.000000000 Z
11
+ date: 2024-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -56,14 +56,14 @@ dependencies:
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '1.12'
59
+ version: '2.3'
60
60
  type: :development
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: '1.12'
66
+ version: '2.3'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: rake
69
69
  requirement: !ruby/object:Gem::Requirement
@@ -100,9 +100,10 @@ executables:
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
+ - ".github/workflows/actions.yml"
103
104
  - ".gitignore"
104
105
  - ".rspec"
105
- - ".travis.yml"
106
+ - ".ruby-version"
106
107
  - Gemfile
107
108
  - README.md
108
109
  - Rakefile
@@ -116,7 +117,7 @@ files:
116
117
  homepage: http://github.com/angelim/zd_hire
117
118
  licenses: []
118
119
  metadata: {}
119
- post_install_message:
120
+ post_install_message:
120
121
  rdoc_options: []
121
122
  require_paths:
122
123
  - lib
@@ -131,9 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
132
  - !ruby/object:Gem::Version
132
133
  version: '0'
133
134
  requirements: []
134
- rubyforge_project:
135
- rubygems_version: 2.5.1
136
- signing_key:
135
+ rubygems_version: 3.3.7
136
+ signing_key:
137
137
  specification_version: 4
138
138
  summary: Code Challenges made easy
139
139
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.1
5
- before_install: gem install bundler -v 1.12.5