fix: 🐛 Make Commit Author envs optional
All checks were successful
ci/woodpecker/push/scans Pipeline was successful
ci/woodpecker/push/build Pipeline was successful

In some pipelines the commit author is not available (i.e. cron). Use "Woodpecker" and Woodpecker's Favicon as a placeholder if the author is missing
This commit is contained in:
Radek Goláň jr. 2025-04-18 11:42:21 +02:00
parent a84fc769ac
commit cc640700a4
Signed by: shield
GPG Key ID: D86423BFC31F3591

View File

@ -77,8 +77,8 @@ webhook.add_embed(DiscordEmbed(
"url": environ["CI_REPO_URL"]
},
footer={
"text": environ["CI_COMMIT_AUTHOR"],
"icon_url": environ["CI_COMMIT_AUTHOR_AVATAR"]
"text": environ.get("CI_COMMIT_AUTHOR", "Woodpecker"),
"icon_url": environ.get("CI_COMMIT_AUTHOR_AVATAR", "https://ci.shielddagger.com/favicons/favicon-dark-default.png")
},
thumbnail={
"url": getenv("PLUGIN_ICON_URL"),