mt merge final version #8036
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |