Create LEGACY-Platform_Migration_Inventory.sql #130
Workflow file for this run
This file contains 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: Check pull request description checkbox and send notify to Slack | |
on: | |
pull_request: | |
types: | |
- closed | |
env: | |
checkbox: "should this be added to delinea marketplace?" | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if "should this be added to delinea marketplace?" is checked | |
env: | |
BODY: ${{ github.event.pull_request.body }} | |
run: | | |
UNCHECKED="\[ \] $checkbox" | |
MARKED="\[x\] $checkbox" | |
if echo ${BODY,,} | grep -q "$MARKED"; then | |
curl -X POST -H 'Content-type: application/json' --data '{"text":"New PR: ${{ github.event.pull_request.title }}${{ github.event.pull_request.html_url }} by ${{ github.actor }}"}' "$SLACK_WEBHOOK_URL" | |
exit 0 | |
elif echo ${BODY,,} | grep -q "$UNCHECKED"; then | |
echo "Checkbox is not checked" | |
exit 1 | |
else | |
echo "Checkbox not found in pull request description" | |
exit 1 | |
fi |