Commit d1937408 by Dimitris Sotirakis Committed by GitHub

Replace PR with Commit truncated hash when build fails (#31177)

* Replace PR with Commit truncated hash when build fails

* Make commit literal lower case
parent 100e7eb9
...@@ -690,7 +690,7 @@ steps: ...@@ -690,7 +690,7 @@ steps:
image: plugins/slack image: plugins/slack
settings: settings:
channel: grafana-ci-notifications channel: grafana-ci-notifications
template: "Build {{build.number}} failed for PR {{build.pull}}: {{build.link}}\nAuthor: {{build.author}}" template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
webhook: webhook:
from_secret: slack_webhook from_secret: slack_webhook
...@@ -1609,7 +1609,7 @@ steps: ...@@ -1609,7 +1609,7 @@ steps:
image: plugins/slack image: plugins/slack
settings: settings:
channel: grafana-ci-notifications channel: grafana-ci-notifications
template: "Build {{build.number}} failed for PR {{build.pull}}: {{build.link}}\nAuthor: {{build.author}}" template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
webhook: webhook:
from_secret: slack_webhook from_secret: slack_webhook
...@@ -2511,7 +2511,7 @@ steps: ...@@ -2511,7 +2511,7 @@ steps:
image: plugins/slack image: plugins/slack
settings: settings:
channel: grafana-ci-notifications channel: grafana-ci-notifications
template: "Build {{build.number}} failed for PR {{build.pull}}: {{build.link}}\nAuthor: {{build.author}}" template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
webhook: webhook:
from_secret: slack_webhook from_secret: slack_webhook
...@@ -3309,7 +3309,7 @@ steps: ...@@ -3309,7 +3309,7 @@ steps:
image: plugins/slack image: plugins/slack
settings: settings:
channel: grafana-ci-notifications channel: grafana-ci-notifications
template: "Build {{build.number}} failed for PR {{build.pull}}: {{build.link}}\nAuthor: {{build.author}}" template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
webhook: webhook:
from_secret: slack_webhook from_secret: slack_webhook
......
...@@ -71,7 +71,7 @@ def slack_step(channel): ...@@ -71,7 +71,7 @@ def slack_step(channel):
'from_secret': 'slack_webhook', 'from_secret': 'slack_webhook',
}, },
'channel': channel, 'channel': channel,
'template': 'Build {{build.number}} failed for PR {{build.pull}}: {{build.link}}\nAuthor: {{build.author}}', 'template': 'Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}',
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment