Skip to content

Discord announcement: push only when label "Needs review" is set #55

Discord announcement: push only when label "Needs review" is set

Discord announcement: push only when label "Needs review" is set #55

Workflow file for this run

name: "Announce ready-to-review PR on Discord"
on:
pull_request:
types: [ labeled ]
jobs:
Announce:
permissions:
pull-requests: read
runs-on: ubuntu-latest
if: ${{ github.repository == 'armbian/build' && github.event.label.id, '6210849975' }}

Check failure on line 12 in .github/workflows/pr-announce.yml

View workflow run for this annotation

GitHub Actions / Announce ready-to-review PR on Discord

Invalid workflow file

The workflow is not valid. .github/workflows/pr-announce.yml (Line: 12, Col: 9): Unexpected symbol: ','. Located at position 62 within expression: github.repository == 'armbian/build' && github.event.label.id, '6210849975'
steps:
- name: Get repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Discord webhook
run: |
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data \
"{\"username\": \"Github\", \"avatar_url\": \"${{ secrets.AVATARURL }}\", \"content\": \"\
:arrow_heading_up: **Pull request** to [$GITHUB_REPOSITORY](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY>) by [$GITHUB_ACTOR](<$GITHUB_SERVER_URL/$GITHUB_ACTOR>) - **Please review!** \
:point_right: [Link](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/${{github.event.pull_request.number}}>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}