Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
🔄 Synced file(s) with WordPress/openverse (#294)
Dhruv Bhanushalifb05e35b06d9
diff --git a/.github/workflows/pr_ping.yml b/.github/workflows/pr_ping.ymlindex 46070b91c..e34a1d6d7 100644--- a/.github/workflows/pr_ping.yml+++ b/.github/workflows/pr_ping.yml@@ -5,26 +5,40 @@ on:pull_request_target:types:- opened+ - ready_for_reviewjobs:send_message:- name: Send message+ name: Send Slack messageif: |github.actor != 'dependabot[bot]' &&!startsWith(github.event.pull_request.title, '🔄')runs-on: ubuntu-latest+ env:+ slack_url: ${{ secrets.SLACK_WEBHOOK_URL }}+ pr_url: ${{ github.event.pull_request.html_url }}+ pr_number: ${{ github.event.pull_request.number }}+ pr_title: ${{ github.event.pull_request.title }}+ pr_author: ${{ github.event.pull_request.user.login }}+ pr_repo: ${{ github.event.pull_request.base.repo.full_name }}steps:- - name: Send Slack notification+ - name: Send notification for new PR+ if: github.event.action == 'opened'+ env:+ pr_status: ${{ github.event.pull_request.draft && ' draft ' || ' ' }}+ pr_icon: ${{ github.event.pull_request.draft && ':pr-draft:' || ':pull-request:' }}run: |curl \$slack_url \-X POST \-H 'Content-Type: application/json' \- -d '{"text":"New PR by '"$pr_author"' in '"$pr_repo"': #'"$pr_number"' - '"$pr_title"'","blocks":[{"type":"section","text":{"type":"mrkdwn","text":":pull-request: New PR by *'"$pr_author"'* in `'"$pr_repo"'`:\n<'"$pr_url"'|#'"$pr_number"' - '"$pr_title"'>"}}]}'- env:- slack_url: ${{ secrets.SLACK_WEBHOOK_URL }}- pr_url: ${{ github.event.pull_request.html_url }}- pr_number: ${{ github.event.pull_request.number }}- pr_title: ${{ github.event.pull_request.title }}- pr_author: ${{ github.event.pull_request.user.login }}- pr_repo: ${{ github.event.pull_request.base.repo.full_name }}+ -d '{"text":"New'"$pr_status"'PR opened by '"$pr_author"' in '"$pr_repo"': #'"$pr_number"' - '"$pr_title"'","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"'"$pr_icon"' New'"$pr_status"'PR opened by *'"$pr_author"'* in `'"$pr_repo"'`:\n<'"$pr_url"'|#'"$pr_number"' - '"$pr_title"'>"}}]}'++ - name: Send notification for PR marked ready+ if: github.event.action == 'ready_for_review'+ run: |+ curl \+ $slack_url \+ -X POST \+ -H 'Content-Type: application/json' \+ -d '{"text":"PR by '"$pr_author"' in '"$pr_repo"' marked ready for review: #'"$pr_number"' - '"$pr_title"'","blocks":[{"type":"section","text":{"type":"mrkdwn","text":":pull-request: PR by *'"$pr_author"'* in `'"$pr_repo"'` marked ready for review:\n<'"$pr_url"'|#'"$pr_number"' - '"$pr_title"'>"}}]}'