ci(workflow): add reusable Discord notification workflow#54
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR introduces a GitHub→Discord notification system consisting of two new workflows and comprehensive documentation. A reusable workflow ( ChangesDiscord Notifications
🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
896bcef to
9bc35d2
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
README.md (1)
262-262: ⚡ Quick winPin the reusable workflow to an immutable ref in the example.
Using
@mainis mutable; prefer a commit SHA (or a version tag) so consumers don’t pick up unexpected changes.Proposed fix
- uses: DEVtheOPS/opencode-plugin-otel/.github/workflows/discord-notify.yml@main + uses: DEVtheOPS/opencode-plugin-otel/.github/workflows/discord-notify.yml@<commit-sha>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 262, Update the README example that currently uses the mutable ref "uses: DEVtheOPS/opencode-plugin-otel/.github/workflows/discord-notify.yml@main" to pin the reusable workflow to an immutable ref (e.g., a commit SHA or a released tag such as `@v1.0.0` or @<commit-sha>); replace the "`@main`" suffix in that uses line with the chosen immutable ref and optionally include a brief note in the example explaining that consumers should pin to a SHA or tag to avoid unexpected changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/discord-events.yml:
- Around line 7-9: The workflow must skip forked pull requests (which lack repo
secrets) while still running for issues, releases, and non-fork PRs; modify the
notification job(s) to only run when the event is not a pull_request or when the
PR head repo is not a fork by adding a job-level if like: github.event_name !=
'pull_request' || github.event.pull_request.head.repo.fork == false (use the
GitHub Actions expression syntax ${{ ... }} in the job's if). Apply the same
conditional to any other notify jobs referenced in the diff (the pull_request
trigger block and the other blocks mentioned around lines 15-18) so forked PRs
are skipped but issues/releases and base-repo PRs still trigger the workflow.
In @.github/workflows/discord-notify.yml:
- Around line 153-156: The curl invocation that posts the Discord webhook (the
command using "$DISCORD_PAYLOAD" and "$DISCORD_WEBHOOK") lacks timeout and retry
flags; update that curl line to add connection and total timeouts and retry
behavior (e.g., include --connect-timeout 10, --max-time 30, --retry 3 and
--retry-delay 2) so the workflow is resilient to transient network/API slowness
while still preserving --fail --silent --show-error and the existing headers and
data.
---
Nitpick comments:
In `@README.md`:
- Line 262: Update the README example that currently uses the mutable ref "uses:
DEVtheOPS/opencode-plugin-otel/.github/workflows/discord-notify.yml@main" to pin
the reusable workflow to an immutable ref (e.g., a commit SHA or a released tag
such as `@v1.0.0` or @<commit-sha>); replace the "`@main`" suffix in that uses line
with the chosen immutable ref and optionally include a brief note in the example
explaining that consumers should pin to a SHA or tag to avoid unexpected
changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e2363684-38b2-4beb-bf3b-17c4c5714874
📒 Files selected for processing (3)
.github/workflows/discord-events.yml.github/workflows/discord-notify.ymlREADME.md
Summary
Summary by CodeRabbit
New Features
Documentation