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

* Replace PR with Commit truncated hash when build fails

* Make commit literal lower case
This commit is contained in:
Dimitris Sotirakis 2021-02-12 18:36:15 +02:00 committed by GitHub
parent 100e7eb992
commit d1937408bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -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:
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:
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:
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

View File

@ -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}}',
}, },
} }