neetob 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/lib/neetob/cli/base.rb +12 -10
- data/lib/neetob/cli/fetchorupdate_repos/execute.rb +3 -4
- data/lib/neetob/cli/github/base.rb +0 -7
- data/lib/neetob/cli/github/commands.rb +5 -5
- data/lib/neetob/cli/github/issues/commands.rb +1 -1
- data/lib/neetob/cli/github/labels/commands.rb +8 -12
- data/lib/neetob/cli/github/labels/delete.rb +15 -10
- data/lib/neetob/cli/github/labels/delete_all.rb +3 -5
- data/lib/neetob/cli/github/labels/list.rb +3 -5
- data/lib/neetob/cli/github/labels/show.rb +3 -5
- data/lib/neetob/cli/github/labels/update.rb +3 -5
- data/lib/neetob/cli/github/labels/upsert.rb +3 -5
- data/lib/neetob/cli/github/protect_branch.rb +3 -5
- data/lib/neetob/cli/users/commands.rb +2 -5
- data/lib/neetob/cli/users/commits.rb +3 -4
- data/lib/neetob/cli.rb +1 -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: 7fa4fc2f085419e84e0bbacf6cec1e365a60e276c26583dfc7fbebe969d49d8c
|
4
|
+
data.tar.gz: c45d3baa3ff401dec0fad7335f136242023ff031f377591e03ce9773545b7fb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01c2ddc361ec88eb2aaa4c84ed4485db66950a87dc572e7a1d705b35a95b92ea6311f736100add1c7938b050d68e37c0db5286c819ff9ef6537e7f81f27bc16d
|
7
|
+
data.tar.gz: 503235621a7d75727728500fcd51c238332ff39c05323b3a3d8e160b4c13fd792d77516f1ff9de215154a3ea1446b92af5ed9acf6a1ecc4784f1b8267524416c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
### [0.2.4](https://www.github.com/bigbinary/neetob/compare/v0.2.3...v0.2.4) (2023-03-14)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Fixed commands to execute only for instances mentioned in the single source of truth file ([#206](https://www.github.com/bigbinary/neetob/issues/206)) ([e79a341](https://www.github.com/bigbinary/neetob/commit/e79a3414ad4ed4790333cff42b5376cf1660c47d))
|
9
|
+
* Fixed label delete command to skip deletion of labels that aren't found in the repo ([#195](https://www.github.com/bigbinary/neetob/issues/195)) ([d48626b](https://www.github.com/bigbinary/neetob/commit/d48626b1997a60c58e0fb023c3fb2e491e67a4da))
|
10
|
+
* Replaced `--all-neeto-repos` flag with the format `--apps "all"` ([#212](https://www.github.com/bigbinary/neetob/issues/212)) ([8c656cd](https://www.github.com/bigbinary/neetob/commit/8c656cd11ba1721a8b68e6e40d3ec439e93977ef))
|
11
|
+
|
3
12
|
### [0.2.3](https://www.github.com/bigbinary/neetob/compare/v0.2.2...v0.2.3) (2023-03-10)
|
4
13
|
|
5
14
|
|
data/Gemfile.lock
CHANGED
data/lib/neetob/cli/base.rb
CHANGED
@@ -19,12 +19,13 @@ module Neetob
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
-
def find_all_matching_apps_or_repos(apps, platform_name, sandbox_mode, quiet = false
|
22
|
+
def find_all_matching_apps_or_repos(apps, platform_name, sandbox_mode, quiet = false)
|
23
|
+
all_neeto_repos = apps == ["all"]
|
23
24
|
inform_about_current_working_mode(sandbox_mode, quiet)
|
24
25
|
all_available_apps = sandbox_mode ?
|
25
26
|
testing_apps(platform_name) :
|
26
27
|
build_app_list_from_neeto_compliance(platform_name, all_neeto_repos)
|
27
|
-
matching_apps = match_apps(apps || ["*"], all_available_apps)
|
28
|
+
matching_apps = all_neeto_repos ? all_available_apps : match_apps(apps || ["*"], all_available_apps)
|
28
29
|
if matching_apps.length == 0
|
29
30
|
error_msg = sandbox_mode ?
|
30
31
|
"Only \"neeto-dummy\" app is available for sandbox mode. Remove the \"--sandbox\" flag to run the given command for all the neeto applications." :
|
@@ -49,19 +50,20 @@ module Neetob
|
|
49
50
|
end
|
50
51
|
|
51
52
|
def build_app_list_from_neeto_compliance(platform_name, all_neeto_repos)
|
52
|
-
|
53
|
-
|
53
|
+
neeto_products = NeetoCompliance::NeetoRepos.products
|
54
|
+
apps = all_neeto_repos ? fetch_all_neeto_repos : neeto_products.keys
|
55
|
+
platform_name == :heroku ? add_env_suffix(apps, neeto_products) : prefix_org_name(apps)
|
54
56
|
end
|
55
57
|
|
56
|
-
def add_env_suffix(apps)
|
58
|
+
def add_env_suffix(apps, neeto_products)
|
57
59
|
[
|
58
|
-
suffix_slug(apps, :staging),
|
59
|
-
suffix_slug(apps, :production)
|
60
|
-
].flatten.sort
|
60
|
+
suffix_slug(apps, :staging, neeto_products),
|
61
|
+
suffix_slug(apps, :production, neeto_products)
|
62
|
+
].flatten.compact.sort
|
61
63
|
end
|
62
64
|
|
63
|
-
def suffix_slug(apps, suffix)
|
64
|
-
apps.map { |app| "#{app}-#{suffix}" }
|
65
|
+
def suffix_slug(apps, suffix, neeto_products)
|
66
|
+
apps.map { |app| neeto_products.dig(app, suffix.to_s) ? "#{app}-#{suffix}" : nil }
|
65
67
|
end
|
66
68
|
|
67
69
|
def prefix_org_name(apps)
|
@@ -6,17 +6,16 @@ module Neetob
|
|
6
6
|
class CLI
|
7
7
|
module FetchorupdateRepos
|
8
8
|
class Execute < Base
|
9
|
-
attr_accessor :sandbox, :apps
|
9
|
+
attr_accessor :sandbox, :apps
|
10
10
|
|
11
|
-
def initialize(sandbox = false,
|
11
|
+
def initialize(sandbox = false, apps = ["*"])
|
12
12
|
super()
|
13
13
|
@sandbox = sandbox
|
14
14
|
@apps = apps
|
15
|
-
@all_neeto_repos = all_neeto_repos
|
16
15
|
end
|
17
16
|
|
18
17
|
def run
|
19
|
-
neeto_apps = find_all_matching_apps_or_repos(apps, :github, sandbox
|
18
|
+
neeto_apps = find_all_matching_apps_or_repos(apps, :github, sandbox)
|
20
19
|
neeto_apps.each do |app|
|
21
20
|
app_name = app.split("/").last
|
22
21
|
ui.info("\nWorking on #{app_name}\n")
|
@@ -23,13 +23,6 @@ module Neetob
|
|
23
23
|
@client = Octokit::Client.new(access_token: auth_client.access_token)
|
24
24
|
end
|
25
25
|
|
26
|
-
def check_for_apps_and_all_neeto_repos_option(repos, all_neeto_repos)
|
27
|
-
if (repos.nil? && !all_neeto_repos) || (!repos.nil? && all_neeto_repos)
|
28
|
-
ui.error("Please provide either \"repos\" or \"all-neeto-repos\" option.")
|
29
|
-
exit
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
26
|
private
|
34
27
|
|
35
28
|
def read_and_parse_auth_params_from_env
|
@@ -44,13 +44,13 @@ module Neetob
|
|
44
44
|
desc: "Name of the branch whose protections rules needs to be updated", required: true
|
45
45
|
option :path, type: :string, aliases: "-p",
|
46
46
|
desc: "The JSON file path which specify all the required rules for branch protection"
|
47
|
-
option :repos, type: :array, aliases: "-r",
|
48
|
-
|
49
|
-
|
47
|
+
option :repos, type: :array, aliases: "-r",
|
48
|
+
desc:
|
49
|
+
"Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\", also providing \"all\" as value matches all neeto repos.",
|
50
|
+
required: true
|
50
51
|
def protect_branch
|
51
52
|
ProtectBranch.new(
|
52
|
-
options[:branch], options[:repos], options[:path], options[:sandbox]
|
53
|
-
options[:all_neeto_repos]).run
|
53
|
+
options[:branch], options[:repos], options[:path], options[:sandbox]).run
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -14,7 +14,7 @@ module Neetob
|
|
14
14
|
class_option :repos,
|
15
15
|
{
|
16
16
|
type: :array, aliases: "-r", required: true,
|
17
|
-
desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\""
|
17
|
+
desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\", also providing \"all\" as value matches all neeto repos."
|
18
18
|
}
|
19
19
|
|
20
20
|
desc "list", "List the issues in the Github repos"
|
@@ -16,21 +16,18 @@ module Neetob
|
|
16
16
|
module Labels
|
17
17
|
class Commands < SubCommandBase
|
18
18
|
class_option :repos,
|
19
|
-
type: :array, aliases: "-r",
|
20
|
-
desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\""
|
21
|
-
class_option :all_neeto_repos,
|
22
|
-
type: :boolean, aliases: "--all", default: false,
|
23
|
-
desc: "Use this flag for working with all neeto repos"
|
19
|
+
type: :array, aliases: "-r", required: true,
|
20
|
+
desc: "Github repo names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\", also providing \"all\" as value matches all neeto repos."
|
24
21
|
|
25
22
|
desc "list", "List all the labels in the Github repos"
|
26
23
|
def list
|
27
|
-
List.new(options[:repos], options[:sandbox]
|
24
|
+
List.new(options[:repos], options[:sandbox]).run
|
28
25
|
end
|
29
26
|
|
30
27
|
desc "show", "Show details about the given label in the Github repos"
|
31
28
|
option :name, type: :string, aliases: "-n", required: true, desc: "Name of the label"
|
32
29
|
def show
|
33
|
-
Show.new(options[:repos], options[:name], options[:sandbox]
|
30
|
+
Show.new(options[:repos], options[:name], options[:sandbox]).run
|
34
31
|
end
|
35
32
|
|
36
33
|
desc "upsert", "Create and update labels in the Github repos"
|
@@ -40,19 +37,19 @@ module Neetob
|
|
40
37
|
option :description, type: :string, desc: "Description of the label you want to upsert"
|
41
38
|
def upsert
|
42
39
|
Upsert.new(
|
43
|
-
options[:repos], options[:path], options[:sandbox], options[:
|
40
|
+
options[:repos], options[:path], options[:sandbox], options[:name],
|
44
41
|
options[:color], options[:description]).run
|
45
42
|
end
|
46
43
|
|
47
44
|
desc "delete_all", "Delete all the labels from the Github repos"
|
48
45
|
def delete_all
|
49
|
-
DeleteAll.new(options[:repos], options[:sandbox]
|
46
|
+
DeleteAll.new(options[:repos], options[:sandbox]).run
|
50
47
|
end
|
51
48
|
|
52
49
|
desc "delete", "Delete some labels from the Github repos"
|
53
50
|
option :labels, type: :array, required: true, desc: "Labels you want to delete from the repos."
|
54
51
|
def delete
|
55
|
-
Delete.new(options[:repos], options[:labels], options[:sandbox]
|
52
|
+
Delete.new(options[:repos], options[:labels], options[:sandbox]).run
|
56
53
|
end
|
57
54
|
|
58
55
|
desc "update", "Update a label name in Github repos"
|
@@ -60,8 +57,7 @@ module Neetob
|
|
60
57
|
option :new_name, type: :string, required: true, desc: "New name for the updated label"
|
61
58
|
def update
|
62
59
|
Update.new(
|
63
|
-
options[:repos], options[:old_name], options[:new_name], options[:sandbox]
|
64
|
-
options[:all_neeto_repos]).run
|
60
|
+
options[:repos], options[:old_name], options[:new_name], options[:sandbox]).run
|
65
61
|
end
|
66
62
|
end
|
67
63
|
end
|
@@ -9,34 +9,39 @@ module Neetob
|
|
9
9
|
module Github
|
10
10
|
module Labels
|
11
11
|
class Delete < Base
|
12
|
-
attr_accessor :repos, :sandbox, :labels
|
12
|
+
attr_accessor :repos, :sandbox, :labels
|
13
13
|
|
14
|
-
def initialize(repos, labels, sandbox = false
|
14
|
+
def initialize(repos, labels, sandbox = false)
|
15
15
|
super()
|
16
16
|
@labels = labels
|
17
17
|
@repos = repos
|
18
18
|
@sandbox = sandbox
|
19
|
-
@all_neeto_repos = all_neeto_repos
|
20
19
|
end
|
21
20
|
|
22
21
|
def run
|
23
|
-
|
24
|
-
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos)
|
22
|
+
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
|
25
23
|
matching_repos.each do |repo|
|
26
|
-
ui.info("\
|
24
|
+
ui.info("\nDeleting labels from #{repo} repo \n")
|
27
25
|
labels.each do |label|
|
28
|
-
|
26
|
+
begin
|
27
|
+
check_if_label_exist!(repo, label)
|
28
|
+
delete_label(repo, label)
|
29
|
+
rescue Octokit::NotFound
|
30
|
+
ui.say(" ↳The repo doesn't have the label \"#{label}\"")
|
31
|
+
end
|
29
32
|
end
|
30
33
|
end
|
31
34
|
end
|
32
35
|
|
33
36
|
private
|
34
37
|
|
38
|
+
def check_if_label_exist!(repo, label)
|
39
|
+
client.label(repo, label)
|
40
|
+
end
|
41
|
+
|
35
42
|
def delete_label(repo, label)
|
36
43
|
if client.delete_label!(repo, label)
|
37
|
-
ui.success("The \"#{label}\" label deleted successfully")
|
38
|
-
else
|
39
|
-
ui.error("The \"#{label}\" label can't be deleted. Please check and try again")
|
44
|
+
ui.success(" ↳The \"#{label}\" label deleted successfully")
|
40
45
|
end
|
41
46
|
end
|
42
47
|
end
|
@@ -9,18 +9,16 @@ module Neetob
|
|
9
9
|
module Github
|
10
10
|
module Labels
|
11
11
|
class DeleteAll < Base
|
12
|
-
attr_accessor :repos, :sandbox
|
12
|
+
attr_accessor :repos, :sandbox
|
13
13
|
|
14
|
-
def initialize(repos, sandbox = false
|
14
|
+
def initialize(repos, sandbox = false)
|
15
15
|
super()
|
16
16
|
@repos = repos
|
17
17
|
@sandbox = sandbox
|
18
|
-
@all_neeto_repos = all_neeto_repos
|
19
18
|
end
|
20
19
|
|
21
20
|
def run
|
22
|
-
|
23
|
-
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos)
|
21
|
+
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
|
24
22
|
matching_repos.each do |repo|
|
25
23
|
ui.info("\n Working on #{repo} repo \n")
|
26
24
|
begin
|
@@ -9,18 +9,16 @@ module Neetob
|
|
9
9
|
module Github
|
10
10
|
module Labels
|
11
11
|
class List < Base
|
12
|
-
attr_accessor :repos, :sandbox
|
12
|
+
attr_accessor :repos, :sandbox
|
13
13
|
|
14
|
-
def initialize(repos, sandbox = false
|
14
|
+
def initialize(repos, sandbox = false)
|
15
15
|
super()
|
16
16
|
@repos = repos
|
17
17
|
@sandbox = sandbox
|
18
|
-
@all_neeto_repos = all_neeto_repos
|
19
18
|
end
|
20
19
|
|
21
20
|
def run
|
22
|
-
|
23
|
-
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos)
|
21
|
+
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
|
24
22
|
matching_repos.each do |repo|
|
25
23
|
ui.info("\n Labels of #{repo} \n")
|
26
24
|
begin
|
@@ -9,19 +9,17 @@ module Neetob
|
|
9
9
|
module Github
|
10
10
|
module Labels
|
11
11
|
class Show < Base
|
12
|
-
attr_accessor :repos, :label_name, :sandbox
|
12
|
+
attr_accessor :repos, :label_name, :sandbox
|
13
13
|
|
14
|
-
def initialize(repos, label_name, sandbox = false
|
14
|
+
def initialize(repos, label_name, sandbox = false)
|
15
15
|
super()
|
16
16
|
@repos = repos
|
17
17
|
@label_name = label_name
|
18
18
|
@sandbox = sandbox
|
19
|
-
@all_neeto_repos = all_neeto_repos
|
20
19
|
end
|
21
20
|
|
22
21
|
def run
|
23
|
-
|
24
|
-
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos)
|
22
|
+
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
|
25
23
|
matching_repos.each do |repo|
|
26
24
|
ui.info("\n \"#{label_name}\" label details from #{repo} \n")
|
27
25
|
begin
|
@@ -9,20 +9,18 @@ module Neetob
|
|
9
9
|
module Github
|
10
10
|
module Labels
|
11
11
|
class Update < Base
|
12
|
-
attr_accessor :repos, :sandbox, :old_name, :new_name
|
12
|
+
attr_accessor :repos, :sandbox, :old_name, :new_name
|
13
13
|
|
14
|
-
def initialize(repos, old_name, new_name, sandbox = false
|
14
|
+
def initialize(repos, old_name, new_name, sandbox = false)
|
15
15
|
super()
|
16
16
|
@repos = repos
|
17
17
|
@sandbox = sandbox
|
18
18
|
@old_name = old_name
|
19
19
|
@new_name = new_name
|
20
|
-
@all_neeto_repos = all_neeto_repos
|
21
20
|
end
|
22
21
|
|
23
22
|
def run
|
24
|
-
|
25
|
-
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos)
|
23
|
+
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
|
26
24
|
matching_repos.each do |repo|
|
27
25
|
ui.info("\nUpdating label for #{repo} repo \n")
|
28
26
|
begin
|
@@ -11,23 +11,21 @@ module Neetob
|
|
11
11
|
class Upsert < Base
|
12
12
|
WHITE_COLOR_HEX_CODE = "ffffff"
|
13
13
|
|
14
|
-
attr_accessor :repos, :required_labels_json_file_path, :sandbox, :
|
14
|
+
attr_accessor :repos, :required_labels_json_file_path, :sandbox, :name, :color, :description
|
15
15
|
|
16
|
-
def initialize(repos, required_labels_json_file_path = "", sandbox = false,
|
16
|
+
def initialize(repos, required_labels_json_file_path = "", sandbox = false,
|
17
17
|
name = "", color = "", description = "")
|
18
18
|
super()
|
19
19
|
@repos = repos
|
20
20
|
@required_labels_json_file_path = required_labels_json_file_path
|
21
21
|
@sandbox = sandbox
|
22
|
-
@all_neeto_repos = all_neeto_repos
|
23
22
|
@name = name
|
24
23
|
@color = color
|
25
24
|
@description = description
|
26
25
|
end
|
27
26
|
|
28
27
|
def run
|
29
|
-
|
30
|
-
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos)
|
28
|
+
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
|
31
29
|
inform_about_default_labels_file
|
32
30
|
matching_repos.each do |repo|
|
33
31
|
ui.info("\nWorking on #{repo} repo\n")
|
@@ -6,20 +6,18 @@ module Neetob
|
|
6
6
|
class CLI
|
7
7
|
module Github
|
8
8
|
class ProtectBranch < Base
|
9
|
-
attr_accessor :branch_name, :required_rules_json_file_path, :repos, :sandbox
|
9
|
+
attr_accessor :branch_name, :required_rules_json_file_path, :repos, :sandbox
|
10
10
|
|
11
|
-
def initialize(branch_name, repos, required_rules_json_file_path = "", sandbox = false
|
11
|
+
def initialize(branch_name, repos, required_rules_json_file_path = "", sandbox = false)
|
12
12
|
super()
|
13
13
|
@branch_name = branch_name
|
14
14
|
@required_rules_json_file_path = required_rules_json_file_path
|
15
15
|
@repos = repos
|
16
16
|
@sandbox = sandbox
|
17
|
-
@all_neeto_repos = all_neeto_repos
|
18
17
|
end
|
19
18
|
|
20
19
|
def run
|
21
|
-
|
22
|
-
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos)
|
20
|
+
matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
|
23
21
|
inform_about_default_rules_file
|
24
22
|
matching_repos.each do |repo|
|
25
23
|
ui.info("\n Working on \"#{repo}\" repo")
|
@@ -14,15 +14,12 @@ module Neetob
|
|
14
14
|
end
|
15
15
|
|
16
16
|
desc "commits", "List the commits of a user across the neeto apps"
|
17
|
-
option :apps, type: :array, aliases: "-a", default: ["*"], desc: "Github app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\""
|
17
|
+
option :apps, type: :array, aliases: "-a", default: ["*"], desc: "Github app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web\", also providing \"all\" as value matches all neeto repos."
|
18
18
|
option :author, type: :string, required: true, desc: "Github username of the person whose commits you want to list"
|
19
19
|
option :duration, type: :string, required: true, desc: "Duration for which you want to list the commits. Example: \"6.months\" \"10.days\""
|
20
|
-
option :all_neeto_repos, type: :boolean, aliases: "--all",
|
21
|
-
desc: "Use this flag for working with all neeto repos", default: false
|
22
20
|
def commits
|
23
21
|
Commits.new(
|
24
|
-
options[:author], options[:duration], options[:apps],
|
25
|
-
options[:sandbox], options[:all_neeto_repos]).run
|
22
|
+
options[:author], options[:duration], options[:apps], options[:sandbox]).run
|
26
23
|
end
|
27
24
|
end
|
28
25
|
end
|
@@ -11,15 +11,14 @@ module Neetob
|
|
11
11
|
class Commits < Github::Base
|
12
12
|
include ActionView::Helpers::DateHelper
|
13
13
|
|
14
|
-
attr_accessor :sandbox, :apps, :author, :duration
|
14
|
+
attr_accessor :sandbox, :apps, :author, :duration
|
15
15
|
|
16
|
-
def initialize(author, duration, apps = ["*"], sandbox = false
|
16
|
+
def initialize(author, duration, apps = ["*"], sandbox = false)
|
17
17
|
super()
|
18
18
|
@sandbox = sandbox
|
19
19
|
@apps = apps
|
20
20
|
@author = author
|
21
21
|
@duration = duration
|
22
|
-
@all_neeto_repos = all_neeto_repos
|
23
22
|
end
|
24
23
|
|
25
24
|
def run
|
@@ -32,7 +31,7 @@ module Neetob
|
|
32
31
|
private
|
33
32
|
|
34
33
|
def build_commit_rows
|
35
|
-
commits = find_all_matching_apps_or_repos(apps, :github, sandbox, true
|
34
|
+
commits = find_all_matching_apps_or_repos(apps, :github, sandbox, true).map do |app|
|
36
35
|
commits = commits_within_range(app)
|
37
36
|
if commits&.empty?
|
38
37
|
ui.info("No commits found in \"#{app}\" for the given author and duration.")
|
data/lib/neetob/cli.rb
CHANGED
@@ -33,10 +33,8 @@ module Neetob
|
|
33
33
|
subcommand "local", Local::Commands
|
34
34
|
|
35
35
|
desc "make_repos_uptodate", "Uptodate all neeto repos"
|
36
|
-
option :all_neeto_repos, type: :boolean, aliases: "--all", desc: "Use this flag for working with all neeto repos",
|
37
|
-
default: false
|
38
36
|
def make_repos_uptodate
|
39
|
-
FetchorupdateRepos::Execute.new(options[:sandbox]
|
37
|
+
FetchorupdateRepos::Execute.new(options[:sandbox]).run
|
40
38
|
end
|
41
39
|
end
|
42
40
|
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.2.
|
4
|
+
version: 0.2.4
|
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-03-
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|