feat: Add release notification workflow#1457
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: SethCohen/github-releases-to-discord@v1.15.1 | ||
| with: | ||
| webhook_url: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 12 hours ago
In general, the fix is to explicitly declare permissions for the workflow/job so that the GITHUB_TOKEN has the least privilege required. Since this workflow only posts to Discord using a secret and does not need to modify repository contents, a minimal permissions block granting contents: read (or even permissions: {} if no GitHub API access is needed) is appropriate.
The best minimally invasive fix is to add a permissions block to the notify job in .github/workflows/code-discord-release.yml. Place it under runs-on: ubuntu-latest and above steps:. To keep functionality unchanged but explicit, set contents: read, which is sufficient for most actions that might need to read basic repository metadata yet prevents unintended write operations. No imports or additional methods are needed; this is purely a YAML configuration change within the existing workflow.
| @@ -7,6 +7,8 @@ | ||
| jobs: | ||
| notify: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: SethCohen/github-releases-to-discord@v1.15.1 | ||
| with: |
45eb2e8 to
c44de3e
Compare
c44de3e to
4d102da
Compare
4d102da to
71bb2b4
Compare
5f00dfb to
af8a31c
Compare
71bb2b4 to
71de004
Compare
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: SethCohen/github-releases-to-discord@v1.15.1 | ||
| with: | ||
| webhook_url: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }} |
Merge activity
|
224e51e to
d1481c7
Compare

Problem
No automated way to notify the Discord community when a new app release is published.
This will play nicely when we have proper release changelogs as well.
Changes
How did you test this?
I tested the webhook and set the secret, but not this action.