@@ -50,11 +50,26 @@ sed -i.bak -e "1s/.*/$RELEASE_HEADER/" "${project_dir}/CHANGELOG.md" || exit 1
5050sed -i.bak -e " /.*\[#????\](https.*/d" " ${project_dir} /CHANGELOG.md"
5151rm " ${project_dir} /CHANGELOG.md.bak" || exit 1
5252
53+ # make the PR description
54+ PR_BODY_FILE=" pr-body.txt"
5355# assumes that tags and history have been fetched
54- echo " commits since last tag:\n" > changes-since-last-tag.txt
55- git log $( git describe --tags --abbrev=0) ..HEAD --oneline --no-merges >> changes-since-last-tag.txt
56- echo changes since last tag are
57- cat changes-since-last-tag.txt
56+ GIT_HASH=$( git rev-parse HEAD)
57+ # if you wish to run this locally you need to install the github cli (https://cli.github.com/manual)
58+ # both the gh and jq are available in github actions natively
59+ GH_STATUS_FOR_COMMIT=$( gh api -H " Accept: application/vnd.github+json" -H " X-GitHub-Api-Version: 2022-11-28" /repos/realm/realm-core/commits/$GIT_HASH /status)
60+ GH_CHECK_STATE=$( echo $GH_STATUS_FOR_COMMIT | jq ' .state' )
61+ echo " CI checks for $GIT_HASH :" > $PR_BODY_FILE
62+ if [ " $GH_CHECK_STATE " = ' "success"' ]; then
63+ echo " succeeded! :white_check_mark:" >> $PR_BODY_FILE
64+ else
65+ echo " failed! :x:" >> $PR_BODY_FILE
66+ fi
67+ echo " You may also want to manually verify the [evergreen checks](https://spruce.mongodb.com/commits/realm-core-stable)" >> $PR_BODY_FILE
68+ echo " " >> $PR_BODY_FILE
69+ echo " commits since last tag:" >> $PR_BODY_FILE
70+ git log $( git describe --tags --abbrev=0) ..HEAD --oneline --no-merges >> $PR_BODY_FILE
71+ echo " The PR body file contains:"
72+ cat $PR_BODY_FILE
5873
5974echo Ready to make " ${realm_version} "
6075
0 commit comments