diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index e2ca9baa..33fe3b28 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -11,39 +11,27 @@ jobs: runs-on: ubuntu-latest steps: - name: Slack Notification + if: steps.filter.outputs.is_pull_request == 'true' + env: + TITLE: "{{ github.event.pull_request.title }}" + LINK: "github.com/${{ github.event.repository.name }}/pulls/${{ github.event.pull_request.id }}" run: | curl -X POST "${{ secrets.SLACK_INCOMING_WEBHOOK }}" -H "Content-type: application/json" -d '{ - "text": "New ${{ github.event_name }}", + "text": "New Pull Request", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": "{{ github.event.issue.title }}{{ github.event.pull_request.title }}\n\n$github.com/${{ github.event.repository.name }}/issues/${{ github.event.issue.id }}" + "text": "New Pull Request: ${TITLE}" } }, { "type": "section", - "block_id": "section567", "text": { "type": "mrkdwn", - "text": " \n :star: \n Doors had too many axe holes, guest in room 237 was far too rowdy, whole place felt stuck in the 1920s." + "text": "$LINK" }, - "accessory": { - "type": "image", - "image_url": "https://is5-ssl.mzstatic.com/image/thumb/Purple3/v4/d3/72/5c/d3725c8f-c642-5d69-1904-aa36e4297885/source/256x256bb.jpg", - "alt_text": "Haunted hotel image" - } }, - { - "type": "section", - "block_id": "section789", - "fields": [ - { - "type": "mrkdwn", - "text": "*Average Rating*\n1.0" - } - ] - } ] }'