Add GitHub Actions workflow to notify MCP server#158
Conversation
WalkthroughAdds a GitHub Actions workflow that triggers on pushes to main when Changes
Sequence Diagram(s)sequenceDiagram
participant Push as Dev push (main)
participant GH as GitHub Actions
participant Runner as Self-hosted runner
participant API as GitHub API (repository_dispatch)
participant MCP as Target repo (mcp-server)
Push->>GH: Push to main modifying api/*.proto
GH->>Runner: Start notify-mcp-server-repo job
Runner->>API: POST /repos/{owner}/{repo}/dispatches\nAuthorization: token PSETHI_GIT_TOKEN\npayload: {event_type:"auth_gateway_proto_changed", client_payload:{ref,sha,repository}}
API->>MCP: Deliver repository_dispatch event
API-->>Runner: 2xx / error response
Runner-->>GH: Job completes (success/failure)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to 📒 Files selected for processing (1)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| run: | | ||
| curl -X POST \ | ||
| -H "Accept: application/vnd.github+json" \ | ||
| -H "Authorization: Bearer ${{ secrets.PSETHI_GIT_TOKEN }}" \ | ||
| https://api.github.com/repos/go-core-stack/mcp-server/dispatches \ |
There was a problem hiding this comment.
Fail workflow when dispatch call is rejected
The notification step uses curl without --fail or any status check (lines 15‑19). When GitHub rejects the request—e.g., a missing/expired PSETHI_GIT_TOKEN, wrong repo name, or network error—curl still exits 0, so the workflow reports success even though no repository_dispatch was sent. The job should surface those failures by enabling --fail (or checking the HTTP code) so missed notifications aren’t silently ignored.
Useful? React with 👍 / 👎.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.