Fix pipeline status check
This commit is contained in:
parent
924360246b
commit
4c5f4a5312
@ -5,7 +5,7 @@ from pprint import pprint
|
||||
|
||||
webhook = DiscordWebhook(environ["PLUGIN_WEBHOOK_URL"])
|
||||
|
||||
success = environ["CI_PIPELINE_STATUS"] != "failed"
|
||||
success = environ["CI_PIPELINE_STATUS"] != "failure"
|
||||
|
||||
webhook.username = "Woodpecker CI"
|
||||
webhook.avatar_url = "https://ci.shielddagger.com/favicons/favicon-dark-success.png" if success else \
|
||||
@ -13,7 +13,7 @@ webhook.avatar_url = "https://ci.shielddagger.com/favicons/favicon-dark-success.
|
||||
|
||||
webhook.add_embed(DiscordEmbed(
|
||||
"Pipeline Failed" if not success else "Pipeline Succeeded",
|
||||
color="ED4245" if environ["CI_PIPELINE_STATUS"] == "failed" else "57F287",
|
||||
color="ED4245" if not success else "57F287",
|
||||
url=environ["CI_PIPELINE_URL"],
|
||||
timestamp=datetime.now(UTC),
|
||||
author={
|
||||
|
Loading…
x
Reference in New Issue
Block a user