Skip to content

Instantly share code, notes, and snippets.

@blues-man
Last active June 10, 2021 13:44
Show Gist options
  • Select an option

  • Save blues-man/1cbdc0430a25ae7a9f2f59672597f716 to your computer and use it in GitHub Desktop.

Select an option

Save blues-man/1cbdc0430a25ae7a9f2f59672597f716 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Run this in your katacoda scenario git repo: https://www.katacoda.community/
# Requires setup of Incoming Webhook on Slack: https://api.slack.com/messaging/webhooks
SCENARIO_URL='https://katacoda.com/<USER>/courses/<NAME>'
SLACK_WEBHOOK_URL='https://hooks.slack.com/services/<YOUR_INCOMING_WEBHOOK_PATH'
commit_id=`git log --pretty=format:'%H' -n 1`
echo "Checking if scenario has been updated on Katacoda.."
until curl -s $SCENARIO_URL | grep $commit_id > /dev/null 2>&1
do
sleep 1
done
curl -X POST --data-urlencode "payload={\"text\": \"Hey @<USER> Katacoda env Ready\", \"channel\": \"team-dev\", \"link_names\": \"1\"}" $SLACK_WEBHOOK_URL
@bttnns
Copy link

bttnns commented Jun 9, 2021

@blues-man we need to make this a go app.

@blues-man
Copy link
Author

Unfortunately it doesn't work anymore because Katacoda removed the commit Sha in the HTML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment