Skip to content

Commit

Permalink
Use shorter commit in github link
Browse files Browse the repository at this point in the history
Truncate long branch names
  • Loading branch information
sukrit007 committed Jul 20, 2016
1 parent 4429a9a commit e3ae9d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deployer/templates/slack.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
{% endif %},
"footer":
{% if git.type == 'github' %}
"<https://github.com/{{git.owner}}|{{git.owner or 'NA'}}> / <https://github.com/{{git.owner}}/{{git.repo}}|{{git.repo or 'NA'}}> / <https://github.com/{{git.owner}}/{{git.repo}}/tree/{{git.ref}}|{{git.ref or 'NA'}}> / <https://github.com/{{git.owner}}/{{git.repo}}/commit/{{git.commit or git.ref}}|{{(git.commit or git.ref or 'NA')[0:7]}}>\n"
"<https://github.com/{{git.owner}}|{{git.owner or 'NA'}}> / <https://github.com/{{git.owner}}/{{git.repo}}|{{git.repo or 'NA'}}> / <https://github.com/{{git.owner}}/{{git.repo}}/tree/{{git.ref}}|{{(git.ref or 'NA') | truncate(30)}}> / <https://github.com/{{git.owner}}/{{git.repo}}/commit/{{(git.commit or git.ref or 'NA')[0:7]}}|{{(git.commit or git.ref or 'NA')[0:7]}}>\n"
{% else %}
"{{git.owner or 'NA'}}/{{git.repo or 'NA'}}/{{git.ref or 'NA'}}/{{(git.commit or 'NA')[0:7]}}"
"{{git.owner or 'NA'}}/{{git.repo or 'NA'}}/{{(git.ref or 'NA') | truncate(30)}}/{{(git.commit or 'NA')[0:7]}}"
{% endif %},
"ts": "{{ notification.date }}"
}
Expand Down

0 comments on commit e3ae9d4

Please sign in to comment.