good_first_issue_notifier.yml

 1name: Good First Issue Notifier
 2
 3on:
 4  issues:
 5    types: [labeled]
 6
 7jobs:
 8  handle-good-first-issue:
 9    if: github.event.label.name == 'good first issue' && github.repository_owner == 'zed-industries'
10    runs-on: ubuntu-latest
11
12    steps:
13      - name: Checkout repository
14        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15
16      - name: Prepare Discord message
17        id: prepare-message
18        env:
19          ISSUE_TITLE: ${{ github.event.issue.title }}
20          ISSUE_NUMBER: ${{ github.event.issue.number }}
21          ISSUE_URL: ${{ github.event.issue.html_url }}
22          ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
23        run: |
24          MESSAGE="[${ISSUE_TITLE} (#${ISSUE_NUMBER})](<${ISSUE_URL}>)"
25
26          {
27            echo "message<<EOF"
28            echo "$MESSAGE"
29            echo "EOF"
30          } >> "$GITHUB_OUTPUT"
31
32      - name: Discord Webhook Action
33        uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164 # v5.3.0
34        with:
35          webhook-url: ${{ secrets.DISCORD_WEBHOOK_GOOD_FIRST_ISSUE }}
36          content: ${{ steps.prepare-message.outputs.message }}