neetob 0.4.4 → 0.4.6

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: ebb57b0b47cb37a66163c3f96c333379baaed5d0bfcded23e28dcbcfe5040862
4
- data.tar.gz: 9edb8a2330e9f1f3db1f9ad270c329f8b4cfe2ef67f9ff8d49598ca5ab3c82fe
3
+ metadata.gz: f2564fe05bb59da098c016b856bb7d1312264297f6d6368b2d21f6e910b1d1a5
4
+ data.tar.gz: de8a95729d8bdb7a485773e9f0ee01d9fc5084d04c6cef6597b60eb5894d5103
5
5
  SHA512:
6
- metadata.gz: c3a3f3d127543236625384f4d8656ddcf0034cd546153ea230274b3f31044542662bf978ccfd9b9cee0706333985272be3470ed420e497a2203a8905fda23c86
7
- data.tar.gz: 18bcc76972590fe942c543860c8a3890b625cad999c9eccf6addc6594113f2a75e19cb1ef66f74f7f4493d0c213cb8ad7e20b0081ecb1ec535c46aba622ef0ab
6
+ metadata.gz: 617a7cf01f06bb405fdc8b0d015e15630f4b2e1f7482be3bdc8d8e1a82941167216031c6167c25a6a2fdb89a119fd2785908559449e195b8fe0c71a7460e28bf
7
+ data.tar.gz: 656a228e21d84f5792df78b89990d2dd87184dbca632aaa46375489f75bef692ffad046f0ad61e41a4f7faf3c35190ff59614fdcac2a23bc4002d0ba4c6a2ec1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### [0.4.6](https://www.github.com/bigbinary/neetob/compare/v0.4.5...v0.4.6) (2023-06-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Updated Readme ([#267](https://www.github.com/bigbinary/neetob/issues/267)) ([6e110f5](https://www.github.com/bigbinary/neetob/commit/6e110f5c164f68929c44e11a63c9021cffbf3a12))
9
+
10
+ ### [0.4.5](https://www.github.com/bigbinary/neetob/compare/v0.4.4...v0.4.5) (2023-06-05)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * 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))
16
+
3
17
  ### [0.4.4](https://www.github.com/bigbinary/neetob/compare/v0.4.3...v0.4.4) (2023-05-24)
4
18
 
5
19
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neetob (0.4.4)
4
+ neetob (0.4.6)
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.59)
16
+ neeto-compliance (1.0.68)
17
17
  colorize
18
18
  deep_merge
19
19
  hashdiff
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # neetob
2
2
 
3
- The `neetob` gem gives a different set of commands for interacting with Github repos, Heroku instances and other tools to manage the workflow of neeto products.
3
+ The `neetob` gem gives a different set of commands for interacting with Github repos, Heroku instances, neetoDeploy instances and other tools to manage the workflow of neeto products.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -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"
@@ -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, should_fix_frontend_packages = false, sandbox = false)
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
- res = client.create_pull_request(repo, "main", branch_name, pr_title, pr_description)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Neetob
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.6"
5
5
  end
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
4
+ version: 0.4.6
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-25 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor