#!/bin/sh
set -eu

message="$JOB #$RUN: $RESULT
https://ci.tojo.tokyo/jobs/$JOB/$RUN"

if [ "$RESULT" != "$LAST_RESULT" ]; then
   message="@tojoqk@mastodon.tojo.tokyo
$message"
fi

toot post -v unlisted "$message"