Skip to content

Commit

Permalink
Use truncate_no_dots filter
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
  • Loading branch information
cynthia-sg committed Sep 6, 2024
1 parent 5742299 commit 851e855
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions dco2/templates/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@
{%~ include "how_to_fix.md" +%}

{% endif %}

{% let x = "hello".to_string()|truncate_no_dots(2) %}
3 changes: 1 addition & 2 deletions dco2/templates/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
| | Sha | Message | Pass or fail reason |
| -- | ---- | :---- | :---- |
{%+ for entry in commits %}
{% let (sha_truncated, rest) = entry.commit.sha.split_at(8) %}
{% let message = entry.commit.message.split_once('\n') %}
{% let sha_truncated = entry.commit.sha.to_string()|truncate_no_dots(7) %}
{% let subject = entry.commit.message.lines().next().unwrap_or_default() %}
{% if entry.errors.is_empty() %}
| :green_circle: | [{{ sha_truncated }}]({{ entry.commit.html_url }}) | {{ subject|truncate(50) }} | {% if let Some(success_reason) = entry.success_reason %}`{{ success_reason|capitalize }}`{% endif %} |
Expand Down

0 comments on commit 851e855

Please sign in to comment.