master_to_main 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/Gemfile.lock +2 -2
- data/lib/master_to_main/cli.rb +8 -5
- data/lib/master_to_main/version.rb +1 -1
- data/master_to_main.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fb2f41e4ae9e2f7ea6020cd1c6611aef54bea9a48c183007677a690accb06ae
|
4
|
+
data.tar.gz: cfc7140a1df1464f8f95f76ea21f015e8c7586a5bd669d50df73462ed1c1a434
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0274dd4547324aeb997b5b3fd2d4ebbfbb36c04709b5577ae37a6523584b472f479ec9a7773a4413caa97d0163f4c4b963fe1f36c70174b5ae140286f4d8f597
|
7
|
+
data.tar.gz: 4d933a38ef6fbbf26b4ed8977f3dbc61f9b05641d6debe0d47d3710c1ebeedcababc00a09d1161f813726a18135b2442bdc1f54328c50e51224fabbdf00a959b
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
# 0.0.
|
1
|
+
# 0.0.3 - 2020-06-17
|
2
|
+
|
3
|
+
- Only set api endpoint if not using "github.com"
|
4
|
+
- Bump rake version
|
5
|
+
- Typos
|
6
|
+
- Fetch before checking out main
|
7
|
+
|
8
|
+
# 0.0.2 - 2020-06-17
|
2
9
|
|
3
10
|
Fix checkout of local branch, add local master branch deletion
|
4
11
|
|
data/Gemfile.lock
CHANGED
@@ -18,7 +18,7 @@ GEM
|
|
18
18
|
faraday (>= 0.9)
|
19
19
|
sawyer (~> 0.8.0, >= 0.5.3)
|
20
20
|
public_suffix (4.0.5)
|
21
|
-
rake (
|
21
|
+
rake (13.0.1)
|
22
22
|
rspec (3.9.0)
|
23
23
|
rspec-core (~> 3.9.0)
|
24
24
|
rspec-expectations (~> 3.9.0)
|
@@ -43,5 +43,5 @@ PLATFORMS
|
|
43
43
|
DEPENDENCIES
|
44
44
|
bundler (~> 1.17)
|
45
45
|
master_to_main!
|
46
|
-
rake (~>
|
46
|
+
rake (~> 13.0)
|
47
47
|
rspec (~> 3.0)
|
data/lib/master_to_main/cli.rb
CHANGED
@@ -36,8 +36,10 @@ module MasterToMain
|
|
36
36
|
|
37
37
|
no_commands do
|
38
38
|
def create_client
|
39
|
-
|
40
|
-
|
39
|
+
if @repo.github != "github.com"
|
40
|
+
Octokit.configure do |c|
|
41
|
+
c.api_endpoint = @repo.api_endpoint
|
42
|
+
end
|
41
43
|
end
|
42
44
|
token = ask("What is your GitHub Personal Access Token?")
|
43
45
|
|
@@ -55,7 +57,7 @@ module MasterToMain
|
|
55
57
|
{
|
56
58
|
github: "github." + github_suffix,
|
57
59
|
user: user,
|
58
|
-
repo: repo.chomp,
|
60
|
+
repo: repo.gsub(/\.git/, "").chomp,
|
59
61
|
}
|
60
62
|
else
|
61
63
|
{
|
@@ -70,7 +72,7 @@ module MasterToMain
|
|
70
72
|
github_info = get_github_info
|
71
73
|
github_url = ask("What is your github url?", default: github_info[:github]).gsub(/https:\/\//, "")
|
72
74
|
user = ask("What is your github user?", default: github_info[:user])
|
73
|
-
github_repo = ask("What is your github repo?", default: github_info[:repo])
|
75
|
+
github_repo = ask("What is your github repo?", default: github_info[:repo]).gsub(/\.git/, "")
|
74
76
|
old_branch = ask("What is your current primary branch?", default: "master")
|
75
77
|
new_branch = ask("What is your desired primary branch?", default: "main")
|
76
78
|
|
@@ -123,7 +125,7 @@ module MasterToMain
|
|
123
125
|
end
|
124
126
|
|
125
127
|
def rebase_pull_requests
|
126
|
-
if yes?("Would you like to rebase all requests based on #{@repo.old_branch} to #{@repo.new_branch}?")
|
128
|
+
if yes?("Would you like to rebase all pull requests based on #{@repo.old_branch} to #{@repo.new_branch}?")
|
127
129
|
prs = @client.pull_requests(@repo.name)
|
128
130
|
prs.each do |pr|
|
129
131
|
if pr[:base][:ref] == @repo.old_branch
|
@@ -141,6 +143,7 @@ module MasterToMain
|
|
141
143
|
|
142
144
|
def change_origin
|
143
145
|
if yes?("Would you like to change origin to point to #{@repo.new_branch}?")
|
146
|
+
`git fetch`
|
144
147
|
`git checkout #{@repo.new_branch}`
|
145
148
|
`git push -u origin #{@repo.new_branch}`
|
146
149
|
else
|
data/master_to_main.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.require_paths = ["lib"]
|
37
37
|
|
38
38
|
spec.add_development_dependency "bundler", "~> 1.17"
|
39
|
-
spec.add_development_dependency "rake", "~>
|
39
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
40
40
|
spec.add_development_dependency "rspec", "~> 3.0"
|
41
41
|
|
42
42
|
spec.add_dependency "thor", "~> 1.0.1"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: master_to_main
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John DeWyze
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
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: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|