lazylead 0.11.4 → 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 -12
- data/.docs/accuracy.sql +35 -0
- data/.github/workflows/build.yml +39 -0
- data/.github/workflows/release.yml +15 -0
- data/.rubocop.yml +11 -2
- data/.rultor.yml +2 -2
- data/Gemfile +1 -1
- data/Rakefile +17 -9
- data/bin/lazylead +5 -5
- data/lazylead.gemspec +22 -25
- 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 +4 -3
- 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 +4 -3
- data/lib/lazylead/opts.rb +1 -1
- data/lib/lazylead/os.rb +2 -1
- data/lib/lazylead/postman.rb +8 -7
- data/lib/lazylead/requires.rb +1 -1
- data/lib/lazylead/salt.rb +1 -1
- data/lib/lazylead/schedule.rb +5 -9
- 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 +9 -2
- 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 +2 -2
- data/lib/lazylead/task/fix_version.rb +1 -1
- data/lib/lazylead/task/git/git.rb +82 -0
- data/lib/lazylead/task/loading.rb +2 -3
- data/lib/lazylead/task/micromanager.rb +1 -1
- data/lib/lazylead/task/missing_comment.rb +1 -1
- data/lib/lazylead/task/propagate_down.rb +3 -3
- 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 +20 -15
- 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 +47 -0
- data/test/lazylead/model_test.rb +2 -2
- data/test/lazylead/opts_test.rb +1 -1
- data/test/lazylead/postman_test.rb +7 -39
- data/test/lazylead/retry_test.rb +12 -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 +48 -0
- 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 +35 -12
- 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 +49 -107
data/lib/lazylead/schedule.rb
CHANGED
@@ -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,14 +47,10 @@ module Lazylead
|
|
47
47
|
raise "ll-002: task can't be a null" if task.nil?
|
48
48
|
@trigger.method(task.type).call(task.unit) do
|
49
49
|
ActiveRecord::Base.connection_pool.with_connection do
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
ORM::Verbose.new(task, @log),
|
55
|
-
@log
|
56
|
-
).exec
|
57
|
-
end
|
50
|
+
t = task
|
51
|
+
t = ORM::Verbose.new(t, @log) unless t.props.key? "no_logs"
|
52
|
+
t = ORM::Retry.new(t, @log)
|
53
|
+
t.exec
|
58
54
|
end
|
59
55
|
end
|
60
56
|
@log.debug "Task scheduled: #{task}"
|
data/lib/lazylead/smtp.rb
CHANGED
@@ -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"),
|
data/lib/lazylead/system/fake.rb
CHANGED
@@ -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"),
|
data/lib/lazylead/system/jira.rb
CHANGED
@@ -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
|
@salt = salt
|
48
48
|
@log = log
|
49
49
|
@log.debug "Initiate a Jira client using following opts: " \
|
50
|
-
"#{@opts.except 'password', :password}
|
51
|
-
"
|
50
|
+
"#{@opts.except 'password', :password} " \
|
51
|
+
"and salt #{@salt.id} (found=#{@salt.specified?})"
|
52
52
|
end
|
53
53
|
|
54
54
|
# Find the jira issues by 'JQL'
|
@@ -132,6 +132,8 @@ module Lazylead
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def email
|
135
|
+
return @usr["emailAddress"] unless @usr["emailAddress"].nil?
|
136
|
+
return id if id.include?("@")
|
135
137
|
@usr["emailAddress"]
|
136
138
|
end
|
137
139
|
|
@@ -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"),
|
@@ -98,8 +98,8 @@ module Lazylead
|
|
98
98
|
comment = [
|
99
99
|
"Hi [~#{reporter}],",
|
100
100
|
"",
|
101
|
-
"The triage accuracy is '{color:#{color}}#{@score}{color}'" \
|
102
|
-
"
|
101
|
+
"The triage accuracy is '{color:#{color}}#{@score}{color}' " \
|
102
|
+
"(~{color:#{color}}#{@accuracy}%{color}), here are the reasons why:",
|
103
103
|
"|| Ticket requirement || Status || Field ||"
|
104
104
|
]
|
105
105
|
@opts[:rules].each do |r|
|
@@ -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"),
|
@@ -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"),
|
@@ -27,9 +27,15 @@ require_relative "attachment"
|
|
27
27
|
module Lazylead
|
28
28
|
# Check that ticket has video record(s) with reproducing results.
|
29
29
|
class Records < Lazylead::Attachment
|
30
|
-
|
30
|
+
# @param ext
|
31
|
+
# The list of video records file extensions.
|
32
|
+
# @param size
|
33
|
+
# The minimum size of video records in bytes.
|
34
|
+
# Default value is 5KB.
|
35
|
+
def initialize(ext = [], size = 5 * 1024)
|
31
36
|
super("Internal reproducing results (video)", 5, "Attachments")
|
32
37
|
@ext = ext
|
38
|
+
@size = size
|
33
39
|
return unless @ext.empty?
|
34
40
|
@ext = %w[.webm .mkv .flv .flv .vob .ogv .ogg .drc .gif .gifv .mng .avi
|
35
41
|
.mts .m2ts .ts .mov .qt .wmv .yuv .rm .rmvb .viv .asf .amv .mp4
|
@@ -39,6 +45,7 @@ module Lazylead
|
|
39
45
|
|
40
46
|
# Ensure that ticket has an attachment with video-file extension
|
41
47
|
def matches?(attach)
|
48
|
+
return false if attach.attrs["size"].to_i < @size
|
42
49
|
return true if @ext.any? { |e| e.eql? File.extname(attach.attrs["filename"]).downcase }
|
43
50
|
return false if attach.attrs["mimeType"].nil?
|
44
51
|
@ext.any? { |e| attach.attrs["mimeType"].end_with? "/#{e[1..]}" }
|
@@ -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"),
|
@@ -78,7 +78,7 @@ module Lazylead
|
|
78
78
|
words.each_with_index do |e, i|
|
79
79
|
next unless e.start_with? text
|
80
80
|
pair = snippets.last
|
81
|
-
pair << i if pair.
|
81
|
+
pair << i if pair.empty? || pair.size == 1
|
82
82
|
snippets[-1] = pair
|
83
83
|
snippets << [] if pair.size == 2
|
84
84
|
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"),
|
@@ -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"),
|
data/lib/lazylead/task/echo.rb
CHANGED
@@ -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"),
|
@@ -53,7 +53,7 @@ module Lazylead
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def run(_, _, _)
|
56
|
-
File.
|
56
|
+
File.write(@path, Time.now)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
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"),
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require "forwardable"
|
26
|
+
|
27
|
+
module Lazylead
|
28
|
+
# @todo #533/DEV Git `grep` command is required like Lazylead::SVN::Grep
|
29
|
+
#
|
30
|
+
# @todo #533/DEV Git `touch` command is required like Lazylead::SVN::Touch
|
31
|
+
#
|
32
|
+
# @todo #533/DEV Git `diff` command is required like Lazylead::SVN::Diff
|
33
|
+
module Git
|
34
|
+
#
|
35
|
+
# SVN commit built from command-line stdout (OS#run).
|
36
|
+
#
|
37
|
+
class Commit
|
38
|
+
def initialize(raw)
|
39
|
+
@raw = raw
|
40
|
+
end
|
41
|
+
|
42
|
+
def to_s
|
43
|
+
"#{id} #{msg}"
|
44
|
+
end
|
45
|
+
|
46
|
+
# @todo #/DEV Git Commit#id implementation is required based on `git` ruby gem
|
47
|
+
def id; end
|
48
|
+
|
49
|
+
# @todo #/DEV Git Commit#author implementation is required based on `git` ruby gem
|
50
|
+
def author; end
|
51
|
+
|
52
|
+
# @todo #/DEV Git Commit#time implementation is required based on `git` ruby gem
|
53
|
+
def time; end
|
54
|
+
|
55
|
+
# @todo #/DEV Git Commit#msg implementation is required based on `git` ruby gem
|
56
|
+
def msg; end
|
57
|
+
|
58
|
+
# @todo #/DEV Git Commit#lines implementation is required based on `git` ruby gem
|
59
|
+
def lines; end
|
60
|
+
|
61
|
+
# @todo #/DEV Git Commit#header implementation is required based on `git` ruby gem
|
62
|
+
def header; end
|
63
|
+
|
64
|
+
# The modified lines contains expected text
|
65
|
+
# @todo #/DEV Git Commit#includes? implementation is required based on `git` ruby gem
|
66
|
+
def includes?(text); end
|
67
|
+
end
|
68
|
+
|
69
|
+
#
|
70
|
+
# Git commits built from command-line stdout (OS#run).
|
71
|
+
#
|
72
|
+
# @todo #/DEV Git Commits implementation is required based on `git` ruby gem
|
73
|
+
class Commits
|
74
|
+
extend Forwardable
|
75
|
+
def_delegators :@all, :each, :map, :select, :empty?
|
76
|
+
|
77
|
+
def initialize(stdout)
|
78
|
+
@stdout = stdout
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
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"),
|
@@ -38,8 +38,7 @@ module Lazylead
|
|
38
38
|
def run(sys, postman, opts)
|
39
39
|
assignments = sys.issues(opts["jql"], opts.jira_defaults)
|
40
40
|
.group_by(&:assignee)
|
41
|
-
.
|
42
|
-
.to_h
|
41
|
+
.to_h { |user, tasks| [user.id, Teammate.new(user, tasks)] }
|
43
42
|
opts.slice("team", ",")
|
44
43
|
.map { |m| m.split(":") }
|
45
44
|
.each { |id, name| assignments[id] = Free.new(id, name) unless assignments.key? id }
|
@@ -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"),
|
@@ -87,9 +87,9 @@ module Lazylead
|
|
87
87
|
# Fill pre-defined fields for sub-tasks from parent ticket
|
88
88
|
# and post comment to ticket with clarification.
|
89
89
|
def propagate
|
90
|
-
expected = @fields.
|
90
|
+
expected = @fields.to_h { |f| [f, @issue.fields[f]] }
|
91
91
|
@subtasks.each do |subtask|
|
92
|
-
actual = @fields.
|
92
|
+
actual = @fields.to_h { |f| [f, subtask.fields[f]] }
|
93
93
|
diff = diff(expected, actual)
|
94
94
|
next if diff.empty?
|
95
95
|
subtask.save(fields: diff)
|
@@ -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"),
|