lazylead 0.1.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.0pdd.yml +4 -1
- data/.circleci/config.yml +19 -7
- data/.circleci/release_image.sh +6 -3
- data/.docker/Dockerfile +10 -9
- data/.docker/docker-compose.yml +3 -3
- data/.docker/readme.md +24 -21
- data/.docker/vcs.dockerfile +10 -0
- data/.docs/accuracy.md +107 -0
- data/.docs/accuracy_email.jpg +0 -0
- data/.docs/accuracy_jira_comment.jpg +0 -0
- data/.docs/duedate_expired.md +92 -0
- data/.docs/propagate_down.md +89 -0
- data/.pdd +1 -1
- data/.rubocop.yml +7 -1
- data/.rultor.yml +13 -14
- data/.simplecov +0 -6
- data/Rakefile +38 -1
- data/bin/lazylead +13 -5
- data/lazylead.gemspec +6 -17
- data/lib/lazylead/cc.rb +180 -0
- data/lib/lazylead/cli/app.rb +4 -3
- data/lib/lazylead/exchange.rb +15 -2
- data/lib/lazylead/home.rb +38 -0
- data/lib/lazylead/log.rb +30 -8
- data/lib/lazylead/model.rb +60 -16
- data/lib/lazylead/opts.rb +68 -0
- data/lib/lazylead/postman.rb +15 -15
- data/lib/lazylead/schedule.rb +6 -4
- data/lib/lazylead/smtp.rb +1 -1
- data/lib/lazylead/system/fake.rb +1 -1
- data/lib/lazylead/system/jira.rb +55 -12
- data/lib/lazylead/system/synced.rb +2 -1
- data/lib/lazylead/task/accuracy/accuracy.rb +140 -0
- data/lib/lazylead/task/accuracy/affected_build.rb +43 -0
- data/lib/lazylead/task/accuracy/requirement.rb +40 -0
- data/lib/lazylead/task/alert.rb +8 -6
- data/lib/lazylead/task/confluence_ref.rb +4 -3
- data/lib/lazylead/task/echo.rb +4 -0
- data/lib/lazylead/task/fix_version.rb +11 -7
- data/lib/lazylead/task/missing_comment.rb +7 -5
- data/lib/lazylead/task/propagate_down.rb +126 -0
- data/lib/lazylead/task/savepoint.rb +58 -0
- data/lib/lazylead/task/touch.rb +102 -0
- data/lib/lazylead/version.rb +1 -1
- data/lib/messages/accuracy.erb +118 -0
- data/lib/messages/due_date_expired.erb +8 -7
- data/lib/messages/illegal_fixversion_change.erb +9 -8
- data/lib/messages/missing_comment.erb +10 -9
- data/lib/messages/savepoint.erb +43 -0
- data/lib/messages/svn_touch.erb +147 -0
- data/readme.md +90 -80
- data/test/lazylead/cc_test.rb +153 -0
- data/test/lazylead/cli/app_test.rb +3 -4
- data/test/lazylead/exchange_test.rb +22 -2
- data/test/lazylead/model_test.rb +14 -3
- data/test/lazylead/opts_test.rb +66 -0
- data/test/lazylead/postman_test.rb +57 -0
- data/test/lazylead/smtp_test.rb +1 -1
- data/test/lazylead/system/jira_test.rb +43 -1
- data/test/lazylead/task/accuracy/accuracy_test.rb +73 -0
- data/test/lazylead/task/accuracy/affected_build_test.rb +42 -0
- data/test/lazylead/task/assignee_alert_test.rb +47 -0
- data/test/lazylead/task/duedate_test.rb +52 -30
- data/test/lazylead/task/fix_version_test.rb +11 -10
- data/test/lazylead/task/missing_comment_test.rb +13 -13
- data/test/lazylead/task/propagate_down_test.rb +88 -0
- data/test/lazylead/task/savepoint_test.rb +51 -0
- data/test/lazylead/task/touch_test.rb +63 -0
- data/test/test.rb +11 -0
- data/upgrades/sqlite/001-install-main-lazylead-tables.sql +3 -4
- data/upgrades/sqlite/999.testdata.sql +8 -2
- metadata +57 -177
- data/deploy.sh +0 -16
- data/todo.yml +0 -6
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
2
3
|
<head>
|
3
4
|
<style>
|
4
5
|
/* CSS styles taken from https://github.com/yegor256/tacit */
|
@@ -68,13 +69,13 @@
|
|
68
69
|
them accordingly or actualize the
|
69
70
|
<span style="font-weight:bold">"Due date"</span> field for the following
|
70
71
|
ticket(s):</p>
|
71
|
-
<table>
|
72
|
+
<table summary="table with ticket(s) which have expired due dates">
|
72
73
|
<tr>
|
73
|
-
<th>Key</th>
|
74
|
-
<th>Due date</th>
|
75
|
-
<th>Priority</th>
|
76
|
-
<th>Reporter</th>
|
77
|
-
<th>Summary</th>
|
74
|
+
<th id="key">Key</th>
|
75
|
+
<th id="duedate">Due date</th>
|
76
|
+
<th id="priority">Priority</th>
|
77
|
+
<th id="reporter">Reporter</th>
|
78
|
+
<th id="summary">Summary</th>
|
78
79
|
</tr>
|
79
80
|
<% tickets.each do |ticket| %>
|
80
81
|
<tr>
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
2
3
|
<head>
|
3
4
|
<style>
|
4
5
|
/* CSS styles taken from https://github.com/yegor256/tacit */
|
@@ -87,14 +88,14 @@
|
|
87
88
|
|
88
89
|
<p>The <span style='font-weight:bold'>'Fix Version'</span> for the following
|
89
90
|
ticket(s) changed by not authorized person(s):</p>
|
90
|
-
<table>
|
91
|
+
<table summary="ticket(s) where fix version changed">
|
91
92
|
<tr>
|
92
|
-
<th>Key</th>
|
93
|
-
<th>Priority</th>
|
94
|
-
<th>When</th>
|
95
|
-
<th>Who</th>
|
96
|
-
<th>Reporter</th>
|
97
|
-
<th>Summary</th>
|
93
|
+
<th id="key">Key</th>
|
94
|
+
<th id="priority">Priority</th>
|
95
|
+
<th id="when">When</th>
|
96
|
+
<th id="who">Who</th>
|
97
|
+
<th id="reporter">Reporter</th>
|
98
|
+
<th id="summary">Summary</th>
|
98
99
|
</tr>
|
99
100
|
<% versions.each do |v| %>
|
100
101
|
<tr>
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
2
3
|
<head>
|
3
4
|
<style> /* CSS styles taken from https://github.com/yegor256/tacit */
|
4
5
|
th {
|
@@ -95,15 +96,15 @@
|
|
95
96
|
<p>Hi <%= addressee %>,</p>
|
96
97
|
|
97
98
|
<p>The following ticket(s) has missing <%= details %>:</p>
|
98
|
-
<table>
|
99
|
+
<table summary="ticket(s) without expected comment">
|
99
100
|
<tr>
|
100
|
-
<th>Key</th>
|
101
|
-
<th>Due date</th>
|
102
|
-
<th>Priority</th>
|
103
|
-
<th>Assignee</th>
|
104
|
-
<th>Reporter</th>
|
105
|
-
<th>Summary</th>
|
106
|
-
<th>Last comments</th>
|
101
|
+
<th id="key">Key</th>
|
102
|
+
<th id="duedate">Due date</th>
|
103
|
+
<th id="priority">Priority</th>
|
104
|
+
<th id="assignee">Assignee</th>
|
105
|
+
<th id="reporter">Reporter</th>
|
106
|
+
<th id="summary">Summary</th>
|
107
|
+
<th id="comments">Last comments</th>
|
107
108
|
</tr>
|
108
109
|
<% comments.each do |comment| %>
|
109
110
|
<tr>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<style> /* CSS styles taken from https://github.com/yegor256/tacit */
|
5
|
+
a {
|
6
|
+
color: #275a90;
|
7
|
+
text-decoration: none
|
8
|
+
}
|
9
|
+
|
10
|
+
a:hover {
|
11
|
+
text-decoration: underline
|
12
|
+
}
|
13
|
+
|
14
|
+
* {
|
15
|
+
box-sizing: border-box;
|
16
|
+
margin: 0;
|
17
|
+
max-width: 100%;
|
18
|
+
padding: 0;
|
19
|
+
vertical-align: baseline;
|
20
|
+
font-family: system-ui, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
21
|
+
font-size: 13px;
|
22
|
+
font-stretch: normal;
|
23
|
+
font-style: normal;
|
24
|
+
font-weight: 400;
|
25
|
+
line-height: 29.7px
|
26
|
+
}
|
27
|
+
|
28
|
+
body {
|
29
|
+
background: #fff;
|
30
|
+
color: #1a1919;
|
31
|
+
padding: 36px
|
32
|
+
}
|
33
|
+
</style>
|
34
|
+
<title>LL <%= Date.today %></title>
|
35
|
+
</head>
|
36
|
+
<body>
|
37
|
+
<p>Hi,</p>
|
38
|
+
<p>PFA the LL configuration at <%= DateTime.now %>.</p>
|
39
|
+
<p>Posted by
|
40
|
+
<a href="https://github.com/dgroup/lazylead">lazylead v<%= version %></a>.
|
41
|
+
</p>
|
42
|
+
</body>
|
43
|
+
</html>
|
@@ -0,0 +1,147 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<style>
|
5
|
+
/* CSS styles taken from https://github.com/yegor256/tacit */
|
6
|
+
th {
|
7
|
+
font-weight: 600;
|
8
|
+
text-align: left;
|
9
|
+
}
|
10
|
+
|
11
|
+
td {
|
12
|
+
vertical-align: top;
|
13
|
+
}
|
14
|
+
|
15
|
+
table tr {
|
16
|
+
border-bottom-width: 2.16px
|
17
|
+
}
|
18
|
+
|
19
|
+
table tr th {
|
20
|
+
border-bottom-width: 2.16px
|
21
|
+
}
|
22
|
+
|
23
|
+
table tr td, table tr th {
|
24
|
+
overflow: hidden; /*padding: 5.4px 3.6px*/
|
25
|
+
padding-left: 2px;
|
26
|
+
padding-right: 2px;
|
27
|
+
}
|
28
|
+
|
29
|
+
td:nth-child(3) {
|
30
|
+
min-width: 120px;
|
31
|
+
max-width: 200px;
|
32
|
+
}
|
33
|
+
|
34
|
+
td:nth-child(4) {
|
35
|
+
min-width: 300px;
|
36
|
+
max-width: 500px;
|
37
|
+
}
|
38
|
+
|
39
|
+
pre, code, kbd, samp, var, output {
|
40
|
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
41
|
+
font-size: 14.4px
|
42
|
+
}
|
43
|
+
|
44
|
+
pre code {
|
45
|
+
background: none;
|
46
|
+
border: 0;
|
47
|
+
line-height: 29.7px;
|
48
|
+
padding: 0
|
49
|
+
}
|
50
|
+
|
51
|
+
code, kbd {
|
52
|
+
background: #daf1e0;
|
53
|
+
border-radius: 3.6px;
|
54
|
+
color: #2a6f3b;
|
55
|
+
display: inline-block;
|
56
|
+
line-height: 18px;
|
57
|
+
padding: 3.6px 6.3px 2.7px
|
58
|
+
}
|
59
|
+
|
60
|
+
a {
|
61
|
+
color: #275a90;
|
62
|
+
text-decoration: none
|
63
|
+
}
|
64
|
+
|
65
|
+
a:hover {
|
66
|
+
text-decoration: underline
|
67
|
+
}
|
68
|
+
|
69
|
+
* {
|
70
|
+
border: 0;
|
71
|
+
border-collapse: separate;
|
72
|
+
border-spacing: 0;
|
73
|
+
box-sizing: border-box;
|
74
|
+
margin: 0;
|
75
|
+
max-width: 100%;
|
76
|
+
padding: 0;
|
77
|
+
vertical-align: baseline;
|
78
|
+
font-family: system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
79
|
+
font-size: 13px;
|
80
|
+
font-stretch: normal;
|
81
|
+
font-style: normal;
|
82
|
+
font-weight: 400;
|
83
|
+
line-height: 29.7px
|
84
|
+
}
|
85
|
+
|
86
|
+
html, body {
|
87
|
+
width: 100%
|
88
|
+
}
|
89
|
+
|
90
|
+
html {
|
91
|
+
height: 100%
|
92
|
+
}
|
93
|
+
|
94
|
+
body {
|
95
|
+
background: #fff;
|
96
|
+
color: #1a1919;
|
97
|
+
padding: 36px
|
98
|
+
}
|
99
|
+
|
100
|
+
.msg {
|
101
|
+
background: #eff6e8;
|
102
|
+
border-radius: 3.6px;
|
103
|
+
color: #2a6f3b;
|
104
|
+
display: inline-block;
|
105
|
+
line-height: 18px;
|
106
|
+
padding: 3.6px 6.3px 2.7px
|
107
|
+
}
|
108
|
+
</style>
|
109
|
+
<title>RCA</title>
|
110
|
+
</head>
|
111
|
+
<body>
|
112
|
+
<p>Hi,</p>
|
113
|
+
<p>The critical file(s) <code><%= files %></code> have been changed recently:</p>
|
114
|
+
<table summary="table with svn commits where critical files have been changed">
|
115
|
+
<tr>
|
116
|
+
<th id="rev">Revision</th>
|
117
|
+
<th id="author">Author</th>
|
118
|
+
<th id="when">When</th>
|
119
|
+
<th id="files">File(s)</th>
|
120
|
+
<th id="commit_msg">Commit</th>
|
121
|
+
</tr>
|
122
|
+
<% entries.each do |e| %>
|
123
|
+
<tr>
|
124
|
+
<td><a href="<%= commit_url %><%= e.revision %>"><%= e.revision %></a></td>
|
125
|
+
<td><a href="<%= user %><%= e.author %>"><%= e.author %></a></td>
|
126
|
+
<td><%= Time.strptime(e.date, "%Y-%m-%dT%H:%M").strftime("%Y-%m-%d %H:%M") %></td>
|
127
|
+
<td>
|
128
|
+
<% if e.paths.path.respond_to? :join %>
|
129
|
+
<%= e.paths
|
130
|
+
.path
|
131
|
+
.map { |file| "<a href='#{commit_url}#{e.revision}'>#{file}</a>" }
|
132
|
+
.join("<br/>") %>
|
133
|
+
<% else %>
|
134
|
+
<a href="<%= commit_url %><%= e.revision %>"><%= e.paths.path %></a>
|
135
|
+
<% end %>
|
136
|
+
</td>
|
137
|
+
<td>
|
138
|
+
<div class="msg"><%= e.msg %></div>
|
139
|
+
</td>
|
140
|
+
</tr>
|
141
|
+
<% end %>
|
142
|
+
</table>
|
143
|
+
<p>Posted by
|
144
|
+
<a href="https://github.com/dgroup/lazylead">lazylead v<%= version %></a>.
|
145
|
+
</p>
|
146
|
+
</body>
|
147
|
+
</html>
|
data/readme.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
[](https://rubygems.org/gems/lazylead)
|
4
4
|
[](https://hub.docker.com/r/dgroup/lazylead "Image pulls")
|
5
5
|
[](https://microbadger.com/images/dgroup/lazylead "Image layers")
|
6
|
-
[](https://microbadger.com/images/dgroup/lazylead "Image version")
|
7
6
|
[](https://github.com/dgroup/lazylead/graphs/commit-activity)
|
8
7
|
[](https://hitsofcode.com/view/github/dgroup/lazylead)
|
9
8
|
[](./license.txt)
|
@@ -16,64 +15,67 @@
|
|
16
15
|
[](https://www.codacy.com/manual/dgroup/lazylead?utm_source=github.com&utm_medium=referral&utm_content=dgroup/lazylead&utm_campaign=Badge_Grade)
|
17
16
|
[](https://codeclimate.com/github/dgroup/lazylead/maintainability)
|
18
17
|
[](https://codecov.io/gh/dgroup/lazylead)
|
19
|
-
[](https://depshield.github.io)
|
20
18
|
|
21
19
|
[](http://www.rultor.com/p/dgroup/lazylead)
|
22
20
|
[](http://www.elegantobjects.org/#principles)
|
23
21
|
|
22
|
+
⚠️ We're still in a very early alpha version, the API may change frequently until we release version `1.0`.
|
23
|
+
|
24
24
|
### Overview
|
25
25
|
Ticketing systems (Github, Jira, etc.) are strongly integrated into our processes and everyone understands their necessity. As soon as a developer becomes a lead/technical manager, he or she faces a set of routine tasks that are related to ticketing work. On large projects this becomes a problem, more and more you spend time running around on dashboards and tickets, looking for incorrect deviations in tickets and performing routine tasks instead of solving technical problems.
|
26
26
|
|
27
27
|
The idea of automatic management is not new, for example [Zerocracy](https://www.zerocracy.com/) is available on the market.
|
28
28
|
I like this idea, but large companies/projects are not ready yet for such a decisive breakthrough and need step-by-step solutions such as [lazylead](https://github.com/dgroup/lazylead).
|
29
|
-
I think you remember how [static code analysis](https://en.wikipedia.org/wiki/Static_program_analysis) treated at in the past; today we have a huge toolkit (pmd, checkstyle, qulice, rubocop, etc) for each language that allows you to avoid routine issues and remove from the code reviewer the unnecessary load.
|
29
|
+
I think you remember how [static code analysis](https://en.wikipedia.org/wiki/Static_program_analysis) treated at in the past; today we have a huge toolkit (pmd, checkstyle, qulice, rubocop, peon, etc) for each language that allows you to avoid routine issues and remove from the code reviewer the unnecessary load.
|
30
30
|
|
31
|
-
Join our
|
31
|
+
Join our telegram group [lazylead.org](https://t.me/lazyleads) for discussions.
|
32
32
|
|
33
|
-
| Daily annoying task
|
34
|
-
|
|
35
|
-
| [Notify ticket's assignee](lib/lazylead/task/alert.rb)
|
36
|
-
| [Notify ticket's reporter](lib/lazylead/task/alert.rb)
|
37
|
-
| [Notify ticket's manager](lib/lazylead/task/alert.rb)
|
33
|
+
| Daily annoying task | Jira | Github | Trello |
|
34
|
+
| :---------------------------------------------------------------------------------- | :---: | :----: | :----: |
|
35
|
+
| [Notify ticket's assignee](lib/lazylead/task/alert.rb) | ✅ | ⌛ | ⌛ |
|
36
|
+
| [Notify ticket's reporter](lib/lazylead/task/alert.rb) | ✅ | ⌛ | ⌛ |
|
37
|
+
| [Notify ticket's manager](lib/lazylead/task/alert.rb) | ✅ | ⌛ | ⌛ |
|
38
38
|
| [Notify about illegal "Fix Version" modification](lib/lazylead/task/fix_version.rb) | ✅ | ❌ | ❌ |
|
39
|
-
| [Expected comment in ticket is missing](lib/lazylead/task/missing_comment.rb)
|
40
|
-
| Propagate some fields from parent ticket into sub-tasks
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
| Notify about
|
45
|
-
| Notify about
|
46
|
-
| Notify about
|
47
|
-
| Notify about
|
39
|
+
| [Expected comment in ticket is missing](lib/lazylead/task/missing_comment.rb) | ✅ | ⌛ | ⌛ |
|
40
|
+
| [Propagate some fields from parent ticket into sub-tasks](.docs/propagate_down.md) | ✅ | ❌ | ❌ |
|
41
|
+
| [Evaluate the ticket formatting accuracy](.docs/accuracy.md) | ✅ | ⌛ | ⌛ |
|
42
|
+
| Print the current capacity of team into newly created tasks | ⌛ | ⌛ | ⌛ |
|
43
|
+
| Create/retrofit the defect automatically into latest release | ⌛ | ⌛ | ❌ |
|
44
|
+
| [Notify about expired(ing) due dates](.docs/duedate_expired.md) | ✅ | ❌ | ⌛ |
|
45
|
+
| Notify about absent original estimations | ⌛ | ⌛ | ⌛ |
|
46
|
+
| Notify about 'Hot potato' tickets | ⌛ | ⌛ | ⌛ |
|
47
|
+
| Notify about long live tickets (aging) | ⌛ | ⌛ | ⌛ |
|
48
|
+
| Notify about tickets with invalid format (missing url/stacktrace, etc) | ⌛ | ⌛ | ⌛ |
|
48
49
|
| Create a meeting(s) automatically in case some tickets appeared (group by assignee/reporters/component/ticket type/etc) | ⌛ | ⌛ | ⌛ |
|
49
50
|
|
50
51
|
| Integration | Type | Status |
|
51
52
|
| :---------------------------------------------------- | :-----------: | :----: |
|
52
53
|
| [Microsoft Exchange Server](lib/lazylead/exchange.rb) | Emails | ✅ |
|
53
54
|
| [Microsoft Exchange Server](lib/lazylead/exchange.rb) | Calendar | ⌛ |
|
54
|
-
| [mail.yandex.
|
55
|
-
| [mail.google.
|
56
|
-
|
|
55
|
+
| [mail.yandex.com](lib/lazylead/postman.rb) | Emails | ✅ |
|
56
|
+
| [mail.google.com](lib/lazylead/postman.rb) | Emails | 🌵 |
|
57
|
+
| calendar.google.com | Calendar | ⌛ |
|
58
|
+
| slack.com | Notifications | ⌛ |
|
57
59
|
|
58
60
|
✅ - implemented, ⌛ - planned, 🌵 - implemented, but not tested, ❌ - not supported by ticketing system.
|
59
61
|
|
60
62
|
New ideas, bugs, suggestions or questions are welcome [via GitHub issues](https://github.com/dgroup/lazylead/issues/new)!
|
61
63
|
|
62
64
|
### Get started
|
63
|
-
|
65
|
+
⚠️ We're still in a very early alpha version, the API may change frequently until we release version `1.0`.
|
64
66
|
|
65
67
|
Let's assume that:
|
66
68
|
- your team is using jira as a ticketing system
|
67
69
|
- you defined a jira filter with tickets where actions need. The filter id is `555` and it has JQL like
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
70
|
+
```text
|
71
|
+
project=XXXX and type=Bug and status not in (Closed, Cancelled, "Ready For Testing", "On Hold)
|
72
|
+
and parent = YYYY and duedate < startOfDay()
|
73
|
+
```
|
72
74
|
- you have `MS Exchange` server for email notifications
|
73
75
|
- you want to notify your developers during working days at `8am (UTC)` time about tickets where due dates are expired
|
74
76
|
|
75
77
|
For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
76
|
-
1.
|
78
|
+
1. Define yml file with configuration [tasks.yml](.github/tasks.yml)
|
77
79
|
```yml
|
78
80
|
version: '2.3'
|
79
81
|
services:
|
@@ -99,38 +101,41 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
|
99
101
|
- ./:/lazylead/db
|
100
102
|
# db/ll.db is sqlite file with jira related annoying tasks
|
101
103
|
entrypoint: bin/lazylead --sqlite db/ll.db --trace --verbose
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
104
|
+
```
|
105
|
+
or just download the project using git
|
106
|
+
```bash
|
107
|
+
git clone https://github.com/dgroup/lazylead.git ll && cd ll
|
108
|
+
```
|
109
|
+
|
110
|
+
2. Create a container, using `docker-compose -f .github/tasks.yml up`
|
111
|
+
The container will stop as there were no tasks provided:
|
112
|
+
```bash
|
113
|
+
ll > docker-compose -f .github/tasks.yml up
|
114
|
+
Creating lazylead ... done
|
115
|
+
Attaching to lazylead
|
116
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Version: 0.4.0
|
117
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Memory footprint at start is 52MB
|
118
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Database: '/lazylead/db/ll.db', sql migration dir: '/lazylead/upgrades/sqlite'
|
119
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Migration applied to /lazylead/db/ll.db from /lazylead/upgrades/sqlite
|
120
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Database connection established
|
121
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] SMTP connection established with {host} as {user}.
|
122
|
+
lazylead | [2020-08-09T06:17:32] WARN [main] ll-001: No tasks found.
|
123
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Memory footprint at the end is 67MB
|
124
|
+
lazylead exited with code 0
|
125
|
+
ll >
|
126
|
+
```
|
127
|
+
|
128
|
+
3. Define your team and tasks in database.
|
129
|
+
Yes, there are no UI yet, but its planned. Pull requests are welcome!
|
130
|
+
The tables structure defined [here](upgrades/sqlite/001-install-main-lazylead-tables.sql).
|
131
|
+
Modify you [sqlite](https://sqlite.com/index.html) file(`ll.db`) using [DB Browser](https://sqlitebrowser.org/) or any similar tool.
|
132
|
+
Please change the `<youremail.com>` to your email address in order to be in CC when developer get the notification:
|
133
|
+
```sql
|
134
|
+
insert into teams (id, name, properties)
|
130
135
|
values (1, 'Dream team with lazylead', '{}');
|
131
|
-
|
136
|
+
insert into systems(id, properties)
|
132
137
|
values (1,'{"type":"Lazylead::Jira", "username":"${jira_user}", "password":"${jira_password}", "site":"${jira_url}", "context_path":""}');
|
133
|
-
|
138
|
+
insert into tasks (name, cron, enabled, id, system, team_id, action, properties)
|
134
139
|
values ('Expired due dates',
|
135
140
|
'0 8 * * 1-5',
|
136
141
|
'true',
|
@@ -138,30 +143,35 @@ For simplicity, we are using [docker-compose](https://docs.docker.com/compose/):
|
|
138
143
|
'Lazylead::Task::AssigneeAlert',
|
139
144
|
'{"sql":"filter=555", "cc":"<youremail.com>", "subject":"[LL] Expired due dates", "template":"lib/messages/due_date_expired.erb", "postman":"Lazylead::Exchange"}');
|
140
145
|
|
141
|
-
|
142
|
-
|
143
|
-
4. Once you changed `./ll.db`, please restart the container using `docker-compose -f .github/tasks.yml restart`
|
144
|
-
```bash
|
145
|
-
ll > docker-compose -f .github/tasks.yml restart 100% 🔋 14:37:19
|
146
|
-
Restarting lazylead ... done
|
147
|
-
```
|
148
|
-
check the logs and stop container if needed
|
149
|
-
```bash
|
150
|
-
ll > docker logs lazylead
|
151
|
-
2020-06-06T11:37:36] DEBUG Memory footprint at start is 52MB
|
152
|
-
[2020-06-06T11:37:37] DEBUG Database: '/lazylead/db/ll.db', sql migration dir: '/lazylead/upgrades/sqlite'
|
153
|
-
[2020-06-06T11:37:37] DEBUG Migration applied to /lazylead/db/ll.db from /lazylead/upgrades/sqlite
|
154
|
-
[2020-06-06T11:37:37] DEBUG Database connection established
|
155
|
-
[2020-06-06T11:37:37] WARN SMTP connection enabled in test mode.
|
156
|
-
[2020-06-06T11:37:37] DEBUG Task scheduled: id='1', name='Expired due dates', cron='0 8 * * 1-5', system='1', action='Lazylead::Task::AssigneeAlert', team_id='1', description='', enabled='true', properties='{"sql":"filter=555", "cc":"my.email@google.com", "subject":"[LL] Expired due dates", "template":"lib/messages/due_date_expired.erb", "postman":"Lazylead::Exchange"}'
|
157
|
-
ll > docker stop lazylead
|
158
|
-
lazylead
|
159
|
-
```
|
146
|
+
```
|
147
|
+
Yes, for task scheduling we are using [cron](https://crontab.guru).
|
160
148
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
149
|
+
4. Once you changed `./ll.db`, please restart the container using `docker-compose -f .github/tasks.yml restart`
|
150
|
+
```bash
|
151
|
+
ll > docker-compose -f .github/tasks.yml restart
|
152
|
+
Restarting lazylead ... done
|
153
|
+
```
|
154
|
+
check the logs and stop container if needed
|
155
|
+
```bash
|
156
|
+
ll > docker logs lazylead
|
157
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Version: 0.4.0
|
158
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Memory footprint at start is 52MB
|
159
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Database: '/lazylead/db/ll.db', sql migration dir: '/lazylead/upgrades/sqlite'
|
160
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Migration applied to /lazylead/db/ll.db from /lazylead/upgrades/sqlite
|
161
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Database connection established
|
162
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] SMTP connection established with {host} as {user}.
|
163
|
+
lazylead | [2020-08-09T06:17:32] DEBUG [main] Task scheduled: id='1', name='Expired due dates', cron='0 8 * * 1-5', system='1', action='Lazylead::Task::AssigneeAlert', team_id='1', description='', enabled='true', properties='{"sql":"filter=555", "cc":"my.email@google.com", "subject":"[LL] Expired due dates", "template":"lib/messages/due_date_expired.erb", "postman":"Lazylead::Exchange"}'
|
164
|
+
...
|
165
|
+
```
|
166
|
+
|
167
|
+
### How to contribute?
|
168
|
+
[](http://www.elegantobjects.org/#principles)
|
169
|
+
|
170
|
+
Pull requests are welcome! Don't forget to add your name to contribution section and run this, beforehand:
|
171
|
+
```ruby
|
165
172
|
bundle exec rake
|
166
173
|
```
|
167
174
|
Everyone interacting in this project’s codebases, issue trackers, chat rooms is expected to follow the [code of conduct](.github/CODE_OF_CONDUCT.md).
|
175
|
+
|
176
|
+
Contributors:
|
177
|
+
* [dgroup](https://github.com/dgroup) as Yurii Dubinka ([yurii.dubinka@gmail.com](mailto:yurii.dubinka@gmail.com))
|