Skip to content

dev -> staging

dev -> staging #6347

name: Merge Reminder
on:
pull_request:
branches:
- develop
- master
- staging
jobs:
remind:
name: To Squash Or Not To Squash
runs-on: ubuntu-latest
steps:
- name: Post Comment
run: |
BASE=$(jq --raw-output .pull_request.base.ref ${GITHUB_EVENT_PATH})
if [[ ${BASE} == master ]] || [[ ${BASE} == staging ]]; then
PAYLOAD='{"body":"**_DO NOT SQUASH MERGE!!!_**"}'
else
PAYLOAD='{"body":"Remember to squash merge!"}'
fi
curl --silent \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d "${PAYLOAD}" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/$(jq --raw-output .pull_request.number ${GITHUB_EVENT_PATH})/comments"