diff --git a/.github/workflows/doc-changes-workflow.yml b/.github/workflows/doc-changes-workflow.yml index f4ce55fd1..7026c4e4f 100644 --- a/.github/workflows/doc-changes-workflow.yml +++ b/.github/workflows/doc-changes-workflow.yml @@ -6,7 +6,7 @@ name: Documentation Changes on: # Schedule job to run at midnight UTC every Saturday schedule: - - cron: "0 0 * * 6" + - cron: "0 0 * * *" jobs: diff --git a/github-support/notify-documentation-changes.sh b/github-support/notify-documentation-changes.sh index 2a7341857..af59792b5 100755 --- a/github-support/notify-documentation-changes.sh +++ b/github-support/notify-documentation-changes.sh @@ -2,24 +2,29 @@ set -ouo > /dev/null 2>&1 -GIT_SINCE="1.weeks" +GIT_SINCE="24 hours ago" GITHUB_COMMIT_URL="https://github.com/debezium/debezium/commit/" OUTPUT="documentation_changes.txt" GIT_OUTPUT_FILE="git_history.txt" GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Get the history from Git -git log --pretty=oneline --follow --since=$GIT_SINCE -- documentation > $GIT_OUTPUT_FILE +git log --pretty=oneline --follow --since="$GIT_SINCE" -- documentation > $GIT_OUTPUT_FILE rm -f $OUTPUT -echo "The following Debezium documentation changes have been made in the last 7 days on branch \"$GIT_BRANCH\":" >> $OUTPUT +echo "The following Debezium documentation changes have been made in the last 24 hours on branch \"$GIT_BRANCH\":" >> $OUTPUT echo "" >> $OUTPUT -while IFS=" " read -r COMMIT_SHA COMMIT_MSG -do - echo "* [$COMMIT_SHA]($GITHUB_COMMIT_URL$COMMIT_SHA)" >> $OUTPUT - echo "$COMMIT_MSG" >> $OUTPUT -done < $GIT_OUTPUT_FILE +if [ -s "$GIT_OUTPUT_FILE" ]; then + while IFS=" " read -r COMMIT_SHA COMMIT_MSG + do + echo "* [$COMMIT_SHA]($GITHUB_COMMIT_URL$COMMIT_SHA)" >> $OUTPUT + echo "$COMMIT_MSG" >> $OUTPUT + done < $GIT_OUTPUT_FILE +else + echo "* No changes found" >> $OUTPUT +fi + rm -f $GIT_OUTPUT_FILE cat $OUTPUT \ No newline at end of file