ci: ignore vendored JavaScript in CodeQL #218
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: Notify Discord | |
| "on": | |
| pull_request: | |
| types: | |
| - opened | |
| - ready_for_review | |
| permissions: | |
| contents: read | |
| jobs: | |
| notify-discord: | |
| # Draft pull requests wait until ready_for_review so Discord only receives | |
| # notifications for PRs that are ready for broader attention. | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| # actions/checkout v6.0.2 | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| with: | |
| persist-credentials: false | |
| - name: Resolve Discord webhook URL | |
| id: webhook | |
| run: | | |
| webhook_url='${{ secrets.DISCORD_WEBHOOK_URL }}' | |
| if [ -z "$webhook_url" ]; then | |
| # Local act dry runs can pass this as an environment variable. | |
| webhook_url="${DISCORD_WEBHOOK_URL:-}" | |
| fi | |
| echo "url=$webhook_url" >> "$GITHUB_OUTPUT" | |
| - name: Skip when webhook is not configured | |
| if: ${{ steps.webhook.outputs.url == '' }} | |
| run: > | |
| echo "DISCORD_WEBHOOK_URL is not configured; | |
| skipping Discord notification." | |
| - name: Send Discord Message | |
| if: ${{ steps.webhook.outputs.url != '' }} | |
| uses: ./.github/actions/discord-webhook | |
| with: | |
| webhook-url: ${{ steps.webhook.outputs.url }} | |
| pr-title: ${{ github.event.pull_request.title }} | |
| pr-body: ${{ github.event.pull_request.body }} | |
| pr-url: ${{ github.event.pull_request.html_url }} |