neetob 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +2 -2
- data/README.md +3 -0
- data/lib/neetob/cli/base.rb +1 -1
- data/lib/neetob/cli/github/make_pr/commands.rb +4 -2
- data/lib/neetob/cli/github/make_pr/compliance_fix.rb +4 -2
- data/lib/neetob/cli/github/make_pr/script.rb +6 -3
- data/lib/neetob/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 606aa096ff45c6dd1024738a608b607608baf9a9d9cb62111722c89c4fd30887
|
4
|
+
data.tar.gz: ba0fdbae18b2d77a9a6bbc6f99e2d8eeb4b455656e8a657f7b463a6873128590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10a7ee29781e225be76678b8be259a3fdc0cd2decad3209e3ab43daa5405b00bc07fcda651a6cb167a2b58e851c7862993b1c96edc39547745165a5fd61137b3
|
7
|
+
data.tar.gz: f2d96ae3df227be16d29e660cf142df9c9aa5535799072922a4a0f9f29d23935e0085a3da6d08acfe796acef9508220920257d610b685bfaa79e9a2071ad74d0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
### [0.4.5](https://www.github.com/bigbinary/neetob/compare/v0.4.4...v0.4.5) (2023-06-05)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Updated make pr command to accept labels ([#265](https://www.github.com/bigbinary/neetob/issues/265)) ([d2b2315](https://www.github.com/bigbinary/neetob/commit/d2b23158a82570168974d5b4f42ebcda1689f994))
|
9
|
+
|
3
10
|
### [0.4.4](https://www.github.com/bigbinary/neetob/compare/v0.4.3...v0.4.4) (2023-05-24)
|
4
11
|
|
5
12
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
neetob (0.4.
|
4
|
+
neetob (0.4.5)
|
5
5
|
brakeman (~> 5.0)
|
6
6
|
chronic
|
7
7
|
dotenv (~> 2.8.1)
|
@@ -13,7 +13,7 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://O6Ts9-SVDaUZpHMRs2CpJp22RwbETDE@gems.neeto.com/
|
15
15
|
specs:
|
16
|
-
neeto-compliance (1.0.
|
16
|
+
neeto-compliance (1.0.68)
|
17
17
|
colorize
|
18
18
|
deep_merge
|
19
19
|
hashdiff
|
data/README.md
CHANGED
@@ -240,6 +240,9 @@ neetob github make-pr compliance-fix
|
|
240
240
|
# Fix compliance for nanos
|
241
241
|
neetob github make-pr compliance-fix --nanos
|
242
242
|
|
243
|
+
# Add labels to PRs
|
244
|
+
neetob github make-pr compliance-fix --labels "bug,priority"
|
245
|
+
|
243
246
|
# The `script` command runs the given script for each product and create a PR
|
244
247
|
neetob github make-pr script --path ~/Desktop/fix-folders.sh --branch "neetob-test" \
|
245
248
|
--title "PR title" --description "PR description"
|
data/lib/neetob/cli/base.rb
CHANGED
@@ -74,7 +74,7 @@ module Neetob
|
|
74
74
|
platform_name == :heroku ? ["neeto-dummy"] : ["bigbinary/neeto-dummy"]
|
75
75
|
end
|
76
76
|
|
77
|
-
def inform_about_current_working_mode(sandbox_mode, quiet)
|
77
|
+
def inform_about_current_working_mode(sandbox_mode, quiet = false)
|
78
78
|
return if quiet
|
79
79
|
|
80
80
|
callout_message = "Running in the sandbox mode. \nOnly \"neeto-dummy\" app will be available."
|
@@ -15,10 +15,12 @@ module Neetob
|
|
15
15
|
desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\""
|
16
16
|
class_option :nanos, type: :boolean, aliases: "-n", default: false,
|
17
17
|
desc: "Use this flag to make PRs for the neeto gems"
|
18
|
+
class_option :labels, type: :string, default: "",
|
19
|
+
desc: "Labels you want to add in the PRs. Example: --labels \"bug,priority\""
|
18
20
|
|
19
21
|
desc "compliance-fix", "Create PRs for fixing neeto compliance in all products"
|
20
22
|
def compliance_fix
|
21
|
-
ComplianceFix.new(options[:repos], options[:nanos], options[:sandbox]).run
|
23
|
+
ComplianceFix.new(options[:repos], options[:nanos], options[:sandbox], options[:labels]).run
|
22
24
|
end
|
23
25
|
|
24
26
|
desc "script", "Create PRs after running the given script for each product."
|
@@ -31,7 +33,7 @@ module Neetob
|
|
31
33
|
def script
|
32
34
|
Script.new(
|
33
35
|
options[:repos], options[:path], options[:title], options[:branch], options[:description],
|
34
|
-
options[:nanos], options[:frontend_packages], options[:sandbox]).run
|
36
|
+
options[:nanos], options[:frontend_packages], options[:sandbox], options[:labels]).run
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|
@@ -9,14 +9,15 @@ module Neetob
|
|
9
9
|
module Github
|
10
10
|
module MakePr
|
11
11
|
class ComplianceFix < Base
|
12
|
-
attr_accessor :repos, :sandbox, :should_fix_nanos
|
12
|
+
attr_accessor :repos, :sandbox, :should_fix_nanos, :labels
|
13
13
|
|
14
|
-
def initialize(repos, should_fix_nanos = false, sandbox = false)
|
14
|
+
def initialize(repos, should_fix_nanos = false, sandbox = false, labels = "")
|
15
15
|
super()
|
16
16
|
@repos = repos
|
17
17
|
@sandbox = sandbox
|
18
18
|
@should_fix_nanos = should_fix_nanos
|
19
19
|
@failed_repos = []
|
20
|
+
@labels = labels
|
20
21
|
end
|
21
22
|
|
22
23
|
def run
|
@@ -34,6 +35,7 @@ module Neetob
|
|
34
35
|
delete_local_feature_branch(repo)
|
35
36
|
pull_request = client.create_pull_request(repo, "main", BRANCH_NAME, PR_TITLE)
|
36
37
|
ui.success("PR created in \"#{repo}\" project successfully.")
|
38
|
+
client.add_labels_to_an_issue(repo, pull_request[:number], labels.split(","))
|
37
39
|
@failed_repos.delete(repo)
|
38
40
|
rescue StandardError => e
|
39
41
|
ExceptionHandler.new(e).process
|
@@ -10,10 +10,11 @@ module Neetob
|
|
10
10
|
module MakePr
|
11
11
|
class Script < Base
|
12
12
|
attr_accessor :repos, :sandbox, :path_to_the_script_file, :pr_description, :should_fix_nanos,
|
13
|
-
:should_fix_frontend_packages
|
13
|
+
:should_fix_frontend_packages, :labels
|
14
14
|
|
15
15
|
def initialize(repos, path_to_the_script_file, pr_title,
|
16
|
-
branch_name, pr_description, should_fix_nanos,
|
16
|
+
branch_name, pr_description, should_fix_nanos,
|
17
|
+
should_fix_frontend_packages = false, sandbox = false, labels = "")
|
17
18
|
super(pr_title, branch_name)
|
18
19
|
@repos = repos
|
19
20
|
@sandbox = sandbox
|
@@ -21,6 +22,7 @@ module Neetob
|
|
21
22
|
@pr_description = pr_description
|
22
23
|
@should_fix_nanos = should_fix_nanos
|
23
24
|
@should_fix_frontend_packages = should_fix_frontend_packages
|
25
|
+
@labels = labels
|
24
26
|
end
|
25
27
|
|
26
28
|
def run
|
@@ -35,8 +37,9 @@ module Neetob
|
|
35
37
|
execute_script(repo)
|
36
38
|
ui.info(add_commmit_and_push_changes(repo))
|
37
39
|
delete_local_feature_branch(repo)
|
38
|
-
|
40
|
+
pull_request = client.create_pull_request(repo, "main", branch_name, pr_title, pr_description)
|
39
41
|
ui.success("PR created in \"#{repo}\" project successfully.")
|
42
|
+
client.add_labels_to_an_issue(repo, pull_request[:number], labels.split(","))
|
40
43
|
rescue StandardError => e
|
41
44
|
ExceptionHandler.new(e).process
|
42
45
|
end
|
data/lib/neetob/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neetob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Udai Gupta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05
|
11
|
+
date: 2023-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|