lazylead 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.0pdd.yml +3 -0
- data/.circleci/config.yml +0 -13
- data/.github/workflows/build.yml +39 -0
- data/.github/workflows/release.yml +15 -0
- data/.rubocop.yml +5 -1
- data/.rultor.yml +2 -2
- data/Gemfile +1 -1
- data/Rakefile +17 -9
- data/bin/lazylead +5 -5
- data/lazylead.gemspec +16 -20
- data/lib/lazylead/allocated.rb +1 -1
- data/lib/lazylead/cc.rb +1 -1
- data/lib/lazylead/cli/app.rb +3 -3
- data/lib/lazylead/confluence.rb +1 -1
- data/lib/lazylead/email.rb +1 -1
- data/lib/lazylead/exchange.rb +3 -3
- data/lib/lazylead/home.rb +2 -2
- data/lib/lazylead/log.rb +1 -1
- data/lib/lazylead/model.rb +2 -2
- data/lib/lazylead/opts.rb +1 -1
- data/lib/lazylead/os.rb +2 -1
- data/lib/lazylead/postman.rb +4 -4
- data/lib/lazylead/requires.rb +1 -1
- data/lib/lazylead/salt.rb +1 -1
- data/lib/lazylead/schedule.rb +1 -1
- data/lib/lazylead/smtp.rb +1 -1
- data/lib/lazylead/system/empty.rb +1 -1
- data/lib/lazylead/system/fake.rb +1 -1
- data/lib/lazylead/system/jira.rb +5 -3
- data/lib/lazylead/system/synced.rb +1 -1
- data/lib/lazylead/task/accuracy/accuracy.rb +3 -3
- data/lib/lazylead/task/accuracy/affected_build.rb +1 -1
- data/lib/lazylead/task/accuracy/attachment.rb +1 -1
- data/lib/lazylead/task/accuracy/environment.rb +1 -1
- data/lib/lazylead/task/accuracy/has_label.rb +1 -1
- data/lib/lazylead/task/accuracy/logs.rb +1 -1
- data/lib/lazylead/task/accuracy/logs_link.rb +1 -1
- data/lib/lazylead/task/accuracy/memes.rb +1 -1
- data/lib/lazylead/task/accuracy/onlyll.rb +1 -1
- data/lib/lazylead/task/accuracy/records.rb +1 -1
- data/lib/lazylead/task/accuracy/records_link.rb +1 -1
- data/lib/lazylead/task/accuracy/required.rb +1 -1
- data/lib/lazylead/task/accuracy/requirement.rb +1 -1
- data/lib/lazylead/task/accuracy/screenshots.rb +1 -1
- data/lib/lazylead/task/accuracy/servers.rb +1 -1
- data/lib/lazylead/task/accuracy/stacktrace.rb +2 -2
- data/lib/lazylead/task/accuracy/testcase.rb +1 -1
- data/lib/lazylead/task/accuracy/wiki.rb +1 -1
- data/lib/lazylead/task/accuracy/wiki_url.rb +1 -1
- data/lib/lazylead/task/alert/alert.rb +1 -1
- data/lib/lazylead/task/alert/alertif.rb +1 -1
- data/lib/lazylead/task/alert/changed_to.rb +1 -1
- data/lib/lazylead/task/assignment.rb +1 -1
- data/lib/lazylead/task/confluence_ref.rb +1 -1
- data/lib/lazylead/task/echo.rb +1 -1
- data/lib/lazylead/task/fix_version.rb +1 -1
- data/lib/lazylead/task/git/git.rb +1 -1
- data/lib/lazylead/task/loading.rb +1 -1
- data/lib/lazylead/task/micromanager.rb +1 -1
- data/lib/lazylead/task/missing_comment.rb +1 -1
- data/lib/lazylead/task/propagate_down.rb +1 -1
- data/lib/lazylead/task/savepoint.rb +1 -1
- data/lib/lazylead/task/svn/diff.rb +1 -1
- data/lib/lazylead/task/svn/grep.rb +1 -1
- data/lib/lazylead/task/svn/svn.rb +1 -1
- data/lib/lazylead/task/svn/touch.rb +42 -14
- data/lib/lazylead/version.rb +2 -2
- data/lib/lazylead.rb +1 -1
- data/license.txt +1 -1
- data/readme.md +14 -12
- data/test/lazylead/allocated_test.rb +1 -1
- data/test/lazylead/cc_test.rb +7 -7
- data/test/lazylead/cli/app_test.rb +1 -1
- data/test/lazylead/confluence_test.rb +1 -1
- data/test/lazylead/exchange_test.rb +10 -10
- data/test/lazylead/file_postman_test.rb +1 -1
- data/test/lazylead/model_test.rb +2 -2
- data/test/lazylead/opts_test.rb +1 -1
- data/test/lazylead/postman_test.rb +7 -7
- data/test/lazylead/retry_test.rb +1 -1
- data/test/lazylead/salt_test.rb +1 -1
- data/test/lazylead/smoke_test.rb +2 -2
- data/test/lazylead/smtp_test.rb +7 -7
- data/test/lazylead/stdout_postman_test.rb +1 -1
- data/test/lazylead/system/jira_test.rb +53 -54
- data/test/lazylead/task/accuracy/accuracy_test.rb +11 -11
- data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
- data/test/lazylead/task/accuracy/attachment_test.rb +4 -4
- data/test/lazylead/task/accuracy/environment_test.rb +1 -1
- data/test/lazylead/task/accuracy/has_label_test.rb +1 -1
- data/test/lazylead/task/accuracy/logs_link_test.rb +1 -1
- data/test/lazylead/task/accuracy/logs_test.rb +1 -1
- data/test/lazylead/task/accuracy/memes_test.rb +1 -1
- data/test/lazylead/task/accuracy/onlyll_test.rb +21 -21
- data/test/lazylead/task/accuracy/records_llink_test.rb +1 -1
- data/test/lazylead/task/accuracy/records_test.rb +1 -1
- data/test/lazylead/task/accuracy/score_test.rb +4 -4
- data/test/lazylead/task/accuracy/screenshots_test.rb +3 -3
- data/test/lazylead/task/accuracy/servers_test.rb +1 -1
- data/test/lazylead/task/accuracy/stacktrace_test.rb +1 -1
- data/test/lazylead/task/accuracy/testcase_test.rb +1 -1
- data/test/lazylead/task/accuracy/wiki_test.rb +1 -1
- data/test/lazylead/task/accuracy/wiki_url_test.rb +1 -1
- data/test/lazylead/task/alert/alertif_test.rb +5 -5
- data/test/lazylead/task/alert/assignee_alert_test.rb +1 -1
- data/test/lazylead/task/alert/changed_to_test.rb +5 -5
- data/test/lazylead/task/assignment_test.rb +5 -5
- data/test/lazylead/task/confluence_ref_test.rb +8 -8
- data/test/lazylead/task/created_recently_test.rb +4 -4
- data/test/lazylead/task/duedate_test.rb +14 -14
- data/test/lazylead/task/echo_test.rb +1 -1
- data/test/lazylead/task/fix_version_test.rb +6 -5
- data/test/lazylead/task/loading_test.rb +7 -7
- data/test/lazylead/task/micromanager_test.rb +5 -5
- data/test/lazylead/task/missing_comment_test.rb +4 -4
- data/test/lazylead/task/propagate_down_test.rb +1 -1
- data/test/lazylead/task/savepoint_test.rb +1 -1
- data/test/lazylead/task/svn/diff_test.rb +14 -15
- data/test/lazylead/task/svn/grep_test.rb +4 -3
- data/test/lazylead/task/svn/touch_test.rb +74 -6
- data/test/lazylead/version_test.rb +1 -1
- data/test/sqlite_test.rb +1 -1
- data/test/test.rb +10 -3
- metadata +33 -98
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -34,34 +34,34 @@ module Lazylead
|
|
34
34
|
# In current tests the grid label is 'PullRequest'.
|
35
35
|
# The default grid labels are 0%, 10%, 20%, etc., the reason why
|
36
36
|
# 'PullRequest' label is used here as we don't have 0%, 10%, etc.
|
37
|
-
# on https://jira.
|
37
|
+
# on https://jira.mongodb.org.
|
38
38
|
test "grid label found" do
|
39
|
-
|
40
|
-
NoAuthJira.new("https://jira.
|
41
|
-
Opts.new("grid" => "
|
42
|
-
)
|
39
|
+
assert_predicate Labels.new(
|
40
|
+
NoAuthJira.new("https://jira.mongodb.org").issues("key=JAVA-295").first,
|
41
|
+
Opts.new("grid" => "android, ,")
|
42
|
+
), :exists?
|
43
43
|
end
|
44
44
|
|
45
45
|
test "grid label set by ll" do
|
46
|
-
|
47
|
-
NoAuthJira.new("https://jira.
|
48
|
-
.issues("key=
|
46
|
+
assert_predicate Labels.new(
|
47
|
+
NoAuthJira.new("https://jira.mongodb.org")
|
48
|
+
.issues("key=JAVA-4190", expand: "changelog")
|
49
49
|
.first,
|
50
|
-
Opts.new("grid" => "
|
51
|
-
)
|
50
|
+
Opts.new("grid" => "QP-priority", "author" => "JIRAUSER1263031")
|
51
|
+
), :valid?
|
52
52
|
end
|
53
53
|
|
54
54
|
test "email notification" do
|
55
55
|
Lazylead::Smtp.new.enable
|
56
56
|
Lazylead::Task::OnlyLL.new.run(
|
57
|
-
NoAuthJira.new("https://jira.
|
57
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
58
58
|
Postman.new,
|
59
59
|
Opts.new(
|
60
60
|
"from" => "ll@fake.com",
|
61
61
|
"to" => "lead@fake.com",
|
62
|
-
"grid" => "
|
62
|
+
"grid" => "android",
|
63
63
|
"author" => "LL",
|
64
|
-
"jql" => "key=
|
64
|
+
"jql" => "key=JAVA-295",
|
65
65
|
"max_results" => 200,
|
66
66
|
"subject" => "[LL] Only",
|
67
67
|
"fields" => "priority,summary,reporter,labels",
|
@@ -69,18 +69,18 @@ module Lazylead
|
|
69
69
|
)
|
70
70
|
)
|
71
71
|
assert_email "[LL] Only",
|
72
|
-
"
|
72
|
+
"JAVA-295", "Major - P3", "Support Android platform"
|
73
73
|
end
|
74
74
|
|
75
|
-
test "detect score" do
|
76
|
-
assert_equal "
|
75
|
+
test "detect score label" do
|
76
|
+
assert_equal "QP-priority",
|
77
77
|
Labels.new(
|
78
|
-
NoAuthJira.new("https://jira.
|
79
|
-
.issues("key=
|
78
|
+
NoAuthJira.new("https://jira.mongodb.org")
|
79
|
+
.issues("key=JAVA-4190", expand: "changelog")
|
80
80
|
.first,
|
81
81
|
Opts.new(
|
82
|
-
"grid" => "
|
83
|
-
"author" => "
|
82
|
+
"grid" => "QP-priority",
|
83
|
+
"author" => "JIRAUSER1263031"
|
84
84
|
)
|
85
85
|
).score
|
86
86
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -79,10 +79,10 @@ module Lazylead
|
|
79
79
|
end
|
80
80
|
|
81
81
|
test "detect non-system reporter" do
|
82
|
-
assert_equal "
|
82
|
+
assert_equal "tszming",
|
83
83
|
Score.new(
|
84
|
-
NoAuthJira.new("https://jira.
|
85
|
-
.issues("key=
|
84
|
+
NoAuthJira.new("https://jira.mongodb.org")
|
85
|
+
.issues("key=JAVA-151", expand: "changelog")
|
86
86
|
.first,
|
87
87
|
Opts.new("system-users" => "abilan")
|
88
88
|
).reporter
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -47,8 +47,8 @@ module Lazylead
|
|
47
47
|
|
48
48
|
test "issue has several .png attachments mentioned using !xxx|thumbnail! option" do
|
49
49
|
assert Screenshots.new.passed(
|
50
|
-
NoAuthJira.new("https://jira.
|
51
|
-
.issues("key=
|
50
|
+
NoAuthJira.new("https://jira.mongodb.org")
|
51
|
+
.issues("key=JAVA-4903", fields: %w[attachment description])
|
52
52
|
.first
|
53
53
|
)
|
54
54
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -36,20 +36,20 @@ module Lazylead
|
|
36
36
|
test "last change to Done" do
|
37
37
|
Smtp.new.enable
|
38
38
|
Lazylead::Task::AlertIf.new.run(
|
39
|
-
NoAuthJira.new("https://jira.
|
39
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
40
40
|
Postman.new,
|
41
41
|
Opts.new(
|
42
|
-
"to_status" => "
|
42
|
+
"to_status" => "Closed",
|
43
43
|
"to" => "lead@company.com",
|
44
44
|
"from" => "ll@company.com",
|
45
45
|
"rules" => "Lazylead::ToStatus",
|
46
|
-
"jql" => "key=
|
46
|
+
"jql" => "key=JAVA-500",
|
47
47
|
"subject" => "[LL] alert if",
|
48
48
|
"template" => "lib/messages/alertif.erb"
|
49
49
|
)
|
50
50
|
)
|
51
51
|
assert_email "[LL] alert if",
|
52
|
-
"
|
52
|
+
"JAVA-500", "Major - P3", "Closed", "Uladzimir Mihura", "Jeffrey Yemin", "m/r out:db and out:sharded options"
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -30,12 +30,12 @@ require_relative "../../../../lib/lazylead/task/alert/changed_to"
|
|
30
30
|
|
31
31
|
module Lazylead
|
32
32
|
class ToStatusTest < Lazylead::Test
|
33
|
-
test "last change to
|
33
|
+
test "last change to Closed" do
|
34
34
|
assert Lazylead::ToStatus.new.passed(
|
35
|
-
NoAuthJira.new("https://jira.
|
36
|
-
.issues("key=
|
35
|
+
NoAuthJira.new("https://jira.mongodb.org")
|
36
|
+
.issues("key=JAVA-151", Opts.new.jira_defaults.merge(expand: "changelog"))
|
37
37
|
.first,
|
38
|
-
Opts.new("to_status" => "
|
38
|
+
Opts.new("to_status" => "Closed")
|
39
39
|
)
|
40
40
|
end
|
41
41
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,20 +35,20 @@ module Lazylead
|
|
35
35
|
test "alert in case assignee changed by not authorized person" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::Assignment.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key
|
43
|
+
"jql" => "key=JAVA-4190",
|
44
44
|
"allowed" => "tom,mike,bob",
|
45
45
|
"subject" => "Assignment: How dare you?",
|
46
46
|
"template" => "lib/messages/illegal_assignee_change.erb"
|
47
47
|
)
|
48
48
|
)
|
49
49
|
assert_email "Assignment: How dare you?",
|
50
|
-
"
|
51
|
-
"
|
50
|
+
"JAVA-4190", "Jeffrey Yemin", "Valentin Kavalenka",
|
51
|
+
"Client side builder for operators supported by $search", "Nihal Jain"
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -47,17 +47,17 @@ module Lazylead
|
|
47
47
|
"JIRA_PASS"
|
48
48
|
Task::ConfluenceRef.new.run(
|
49
49
|
Jira.new(
|
50
|
-
username: ENV
|
51
|
-
password: ENV
|
52
|
-
site: ENV
|
50
|
+
username: ENV.fetch("JIRA_USER", nil),
|
51
|
+
password: ENV.fetch("JIRA_PASS", nil),
|
52
|
+
site: ENV.fetch("JIRA_URL", nil),
|
53
53
|
context_path: ""
|
54
54
|
), "",
|
55
|
-
"jql" => ENV
|
55
|
+
"jql" => ENV.fetch("CONFLUENCE_JQL", nil),
|
56
56
|
"confluences" => [
|
57
57
|
{
|
58
|
-
"url" => ENV
|
59
|
-
"name" => ENV
|
60
|
-
"user" => ENV
|
58
|
+
"url" => ENV.fetch("CONFLUENCE_URL", nil), "app" => ENV.fetch("CONFLUENCE_APP_ID", nil),
|
59
|
+
"name" => ENV.fetch("CONFLUENCE_NAME", nil), "type" => "com.atlassian.confluence",
|
60
|
+
"user" => ENV.fetch("CONFLUENCE_USER", nil), "pass" => ENV.fetch("CONFLUENCE_PASS", nil)
|
61
61
|
}
|
62
62
|
].to_json
|
63
63
|
)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -37,18 +37,18 @@ module Lazylead
|
|
37
37
|
test "issues were fetched" do
|
38
38
|
Smtp.new.enable
|
39
39
|
Task::Alert.new.run(
|
40
|
-
NoAuthJira.new("https://jira.
|
40
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
41
41
|
Postman.new,
|
42
42
|
Opts.new(
|
43
43
|
"from" => "fake@email.com",
|
44
44
|
"to" => "my@team.com",
|
45
|
-
"sql" => "
|
45
|
+
"sql" => "key in (JAVA-4403, JAVA-4417)",
|
46
46
|
"subject" => "[CR] 20min ago!",
|
47
47
|
"template" => "lib/messages/created_recently.erb"
|
48
48
|
)
|
49
49
|
)
|
50
50
|
assert_email "[CR] 20min ago!",
|
51
|
-
"
|
51
|
+
"JAVA-4403", "JAVA-4417"
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -39,16 +39,16 @@ module Lazylead
|
|
39
39
|
test "issues were fetched" do
|
40
40
|
Smtp.new.enable
|
41
41
|
Task::AssigneeAlert.new.run(
|
42
|
-
NoAuthJira.new("https://jira.
|
42
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
43
43
|
Postman.new,
|
44
44
|
Opts.new(
|
45
45
|
"from" => "fake@email.com",
|
46
|
-
"sql" => "
|
46
|
+
"sql" => "key in (JAVA-151,JAVA-469,JAVA-468,JAVA-500)",
|
47
47
|
"subject" => "[DD] PDTN!",
|
48
48
|
"template" => "lib/messages/due_date_expired.erb"
|
49
49
|
)
|
50
50
|
)
|
51
|
-
|
51
|
+
greater_or_eq(1, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "[DD] PDTN!" })
|
52
52
|
end
|
53
53
|
|
54
54
|
test "configuration properties merged successfully" do
|
@@ -72,27 +72,27 @@ module Lazylead
|
|
72
72
|
test "html msg has ticket details" do
|
73
73
|
Smtp.new.enable
|
74
74
|
Task::AssigneeAlert.new.run(
|
75
|
-
NoAuthJira.new("https://jira.
|
75
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
76
76
|
Postman.new,
|
77
77
|
Opts.new(
|
78
78
|
"from" => "fake@email.com",
|
79
|
-
"sql" => "key
|
79
|
+
"sql" => "key=VSCODE-333",
|
80
80
|
"subject" => "[DD] HMCHT!",
|
81
81
|
"template" => "lib/messages/due_date_expired.erb"
|
82
82
|
)
|
83
83
|
)
|
84
84
|
assert_email "[DD] HMCHT!",
|
85
|
-
"
|
85
|
+
"VSCODE-333", "2023-06-28", "Major - P3", "Rhys Howell", "Renew VSCODE automated publishing token"
|
86
86
|
end
|
87
87
|
|
88
88
|
test "send notification about bunch of tickets" do
|
89
89
|
Smtp.new.enable
|
90
90
|
Task::Alert.new.run(
|
91
|
-
NoAuthJira.new("https://jira.
|
91
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
92
92
|
Postman.new,
|
93
93
|
Opts.new(
|
94
94
|
"from" => "fake@email.com",
|
95
|
-
"sql" => "key
|
95
|
+
"sql" => "key=DOCS-19",
|
96
96
|
"subject" => "ALRT: Frozen",
|
97
97
|
"template" => "lib/messages/due_date_expired.erb",
|
98
98
|
"to" => "big.boss@example.com",
|
@@ -100,17 +100,17 @@ module Lazylead
|
|
100
100
|
)
|
101
101
|
)
|
102
102
|
assert_email "ALRT: Frozen",
|
103
|
-
"Hi Boss", "
|
103
|
+
"Hi Boss", "DOCS-19", "2012-09-28", "Major - P3", "Michael Conigliaro", "MongoDB exit code reference"
|
104
104
|
end
|
105
105
|
|
106
106
|
test "cc got notification" do
|
107
107
|
Smtp.new.enable
|
108
108
|
Task::Alert.new.run(
|
109
|
-
NoAuthJira.new("https://jira.
|
109
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
110
110
|
Postman.new,
|
111
111
|
Opts.new(
|
112
112
|
"from" => "fake@email.com",
|
113
|
-
"sql" => "key
|
113
|
+
"sql" => "key=JAVA-295",
|
114
114
|
"subject" => "CC: Watching",
|
115
115
|
"template" => "lib/messages/due_date_expired.erb",
|
116
116
|
"to" => "big.boss@example.com",
|
@@ -126,11 +126,11 @@ module Lazylead
|
|
126
126
|
test "reporter got alert about his/her tickets with expired DD" do
|
127
127
|
Smtp.new.enable
|
128
128
|
Task::ReporterAlert.new.run(
|
129
|
-
NoAuthJira.new("https://jira.
|
129
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
130
130
|
Postman.new,
|
131
131
|
Opts.new(
|
132
132
|
"from" => "fake@email.com",
|
133
|
-
"sql" => "
|
133
|
+
"sql" => "key in (JAVA-151,JAVA-469,JAVA-468,JAVA-500)",
|
134
134
|
"subject" => "DD Expired!",
|
135
135
|
"template" => "lib/messages/due_date_expired.erb"
|
136
136
|
)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,12 +35,12 @@ module Lazylead
|
|
35
35
|
test "alert in case fixvesion changed by not authorized person" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::FixVersion.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key
|
43
|
+
"jql" => "key=JAVA-5020",
|
44
44
|
"allowed" => "tom,mike,bob",
|
45
45
|
"fields" => "description,reporter,priority,summary,created,fixVersions",
|
46
46
|
"subject" => "FixVersion: How dare you?",
|
@@ -48,8 +48,9 @@ module Lazylead
|
|
48
48
|
)
|
49
49
|
)
|
50
50
|
assert_email "FixVersion: How dare you?",
|
51
|
-
"
|
52
|
-
"
|
51
|
+
"JAVA-5020", "Minor - P4", "4.10.0", "16-Jun-2023 04:53:47 PM",
|
52
|
+
"Replace @Evolving with @Sealed where appropriate and possible",
|
53
|
+
"tom,mike,bob"
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,15 +35,15 @@ module Lazylead
|
|
35
35
|
test "notify about team loading" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::Loading.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key in (
|
44
|
-
"team" => "
|
43
|
+
"jql" => "key in (JAVA-2515, JAVA-2514, JAVA-2142, JAVA-2139, JAVA-2137)",
|
44
|
+
"team" => "ross@mongodb.com:Ross Lawley,jeff.yemin@mongodb.com:Jeffrey Yemin,mclaren:Tom McLaren",
|
45
45
|
"user_link" => "https://user.com?id=",
|
46
|
-
"search_link" => "https://jira.
|
46
|
+
"search_link" => "https://jira.mongodb.org/issues/?jql=",
|
47
47
|
"fields" => "assignee,duedate,customfield_10480",
|
48
48
|
"sprint" => "customfield_10480",
|
49
49
|
"subject" => "[LL] Team loading",
|
@@ -51,8 +51,8 @@ module Lazylead
|
|
51
51
|
)
|
52
52
|
)
|
53
53
|
assert_email "[LL] Team loading",
|
54
|
-
"
|
55
|
-
"
|
54
|
+
"ross@mongodb.com", "Ross Lawley", "No sprint: 1",
|
55
|
+
"jeff.yemin@mongodb.com", "Jeffrey Yemin", "No sprint: 4",
|
56
56
|
"Tom McLaren", "0"
|
57
57
|
end
|
58
58
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,14 +35,14 @@ module Lazylead
|
|
35
35
|
test "alert in case duedate changed by not authorized person" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::Micromanager.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key in (
|
43
|
+
"jql" => "duedate is not EMPTY and key in (DOCS-194, DOCS-144, DOCS-143)",
|
44
44
|
"fields" => "assignee,duedate,priority,created,summary,reporter",
|
45
|
-
"allowed" => "
|
45
|
+
"allowed" => "matulef,mike,bob",
|
46
46
|
"period" => "86400",
|
47
47
|
"now" => "2009-12-10T00:04:00.000+0000",
|
48
48
|
"subject" => "DD: How dare you?",
|
@@ -50,7 +50,7 @@ module Lazylead
|
|
50
50
|
)
|
51
51
|
)
|
52
52
|
assert_email "DD: How dare you?",
|
53
|
-
"
|
53
|
+
"DOCS-144", "Major - P3", "2012-03-01", "New Documentation Review: Glossary", "matulef,mike,bob"
|
54
54
|
end
|
55
55
|
|
56
56
|
test "since for past 1 min" do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,13 +35,13 @@ module Lazylead
|
|
35
35
|
test "alert in case missing comment" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::MissingComment.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"addressee" => "Tom",
|
43
43
|
"from" => "ll@company.com",
|
44
|
-
"jql" => "key=
|
44
|
+
"jql" => "key=JAVA-65",
|
45
45
|
"text" => "ftp.com/demo.avi",
|
46
46
|
"details" => "reference to <code>ftp.com/demo.avi</code>",
|
47
47
|
"subject" => "Expected ftp link is missing",
|
@@ -50,7 +50,7 @@ module Lazylead
|
|
50
50
|
)
|
51
51
|
)
|
52
52
|
assert_email "Expected ftp link is missing",
|
53
|
-
"
|
53
|
+
"JAVA-65", "Minor - P4", "http://github.com/mongodb/mongo-java-driver/commit/729fc494e5305d362eea95b01c381f2a7daf2652"
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|