Skip to content

Commit

Permalink
Prevent < and > in commit titles from breaking dag-sync slack message (
Browse files Browse the repository at this point in the history
…#2837)

* Prevent < and > in commit titles from breaking dag-sync slack message

* Use HTML entities rather than odd unicode characters
  • Loading branch information
AetherUnbound authored Aug 17, 2023
1 parent d8574af commit fae7f80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dag-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ have_dag=$(git log -p -1 "$new" --pretty=format: --name-only | grep "catalog/dag

# Pull out the subject from the new commit
subject=$(git log -1 --format='%s')
# Swap the < & > characters for their HTML entities so they aren't
# interpreted as delimiters by Slack
subject=${subject//>/&gt;}
subject=${subject//</&lt;}

if [ -z "$SLACK_URL" ]; then
echo "Slack hook was not supplied! Updates will not be posted"
Expand Down

0 comments on commit fae7f80

Please sign in to comment.