-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#243: svn_log task - use log as attachment
Fixed #243
- Loading branch information
Showing
7 changed files
with
189 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<style> | ||
/* CSS styles taken from https://github.com/yegor256/tacit */ | ||
pre, code, kbd, samp, var, output { | ||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace; | ||
font-size: 14.4px | ||
} | ||
|
||
pre code { | ||
background: none; | ||
border: 0; | ||
line-height: 29.7px; | ||
padding: 0 | ||
} | ||
|
||
code, kbd { | ||
background: #daf1e0; | ||
border-radius: 3.6px; | ||
color: #2a6f3b; | ||
display: inline-block; | ||
line-height: 18px; | ||
padding: 3.6px 6.3px 2.7px | ||
} | ||
|
||
a { | ||
color: #275a90; | ||
text-decoration: none | ||
} | ||
|
||
a:hover { | ||
text-decoration: underline | ||
} | ||
|
||
* { | ||
border: 0; | ||
border-collapse: separate; | ||
border-spacing: 0; | ||
box-sizing: border-box; | ||
margin: 0; | ||
max-width: 100%; | ||
padding: 0; | ||
vertical-align: baseline; | ||
font-family: system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
font-size: 13px; | ||
font-stretch: normal; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 29.7px | ||
} | ||
|
||
html, body { | ||
width: 100% | ||
} | ||
|
||
html { | ||
height: 100% | ||
} | ||
|
||
body { | ||
background: #fff; | ||
color: #1a1919; | ||
padding: 36px | ||
} | ||
|
||
.commit { | ||
min-width: 100%; | ||
border-radius: 3.5px; | ||
overflow: hidden; | ||
display: inline-block; | ||
line-height: 15px; | ||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace; | ||
border: 1px solid #BCC6CC; | ||
} | ||
|
||
.commit * { | ||
padding-left: 4px; | ||
font-size: 8px; | ||
line-height: 15px; | ||
} | ||
</style> | ||
<title>SVN log</title> | ||
</head> | ||
<body> | ||
<p>Hi,</p> | ||
<p>The following file(s) changed since <code><%= since_rev %></code> rev in <a href="<%= svn_url %>"><%= svn_url %></a>:</p> | ||
<% stdout.split("------------------------------------------------------------------------").reject(&:blank?).reverse.each do |commit| %> | ||
<div class="commit"> | ||
<% commit.split("\n").reject(&:blank?).each_with_index do |line, index| %> | ||
<% if index.zero? %> | ||
<% details = line.split("|").map(&:strip).reject(&:blank?) %> | ||
<p style="background: gainsboro;"> | ||
<a href="<%= commit_url %><%= details[0][1 .. -1] %>"><%= details[0] %></a> | ||
by <a href="<%= user %><%= details[1] %>"><%= details[1] %></a> | ||
at <span style="color: #275a90;"><%= details[2] %></span> | ||
</p> | ||
<% else %> | ||
<% if line.start_with?("+++") || line.start_with?("---") %> | ||
<p style="background: gainsboro;"><%= line.gsub(/[<>]/, '<' => '<', '>' => '>') %></p> | ||
<% elsif line.start_with?("+") %> | ||
<p style="<%= "background: darkseagreen;" %>"><%= line.gsub(/[<>]/, '<' => '<', '>' => '>') %></p> | ||
<% elsif line.start_with?("-") %> | ||
<p style="<%= "background: lightsalmon;" %>"><%= line.gsub(/[<>]/, '<' => '<', '>' => '>') %></p> | ||
<% else %> | ||
<p style="background: gainsboro;"><%= line.gsub(/[<>]/,'<' => '<', '>' => '>') %></p> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<br/><br/><br/> | ||
<% end %> | ||
<p>Posted by | ||
<a href="https://github.com/dgroup/lazylead">lazylead v<%= version %></a>. | ||
</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters