Skip to content

Add GitHub Actions workflow to notify MCP server#158

Open
Prabhjot-Sethi wants to merge 2 commits into
mainfrom
notify-mcp-server
Open

Add GitHub Actions workflow to notify MCP server#158
Prabhjot-Sethi wants to merge 2 commits into
mainfrom
notify-mcp-server

Conversation

@Prabhjot-Sethi

@Prabhjot-Sethi Prabhjot-Sethi commented Dec 5, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Added an automated workflow to notify downstream services when API definition files change.
    • Streamlines propagation of API updates and helps keep dependent components in sync.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 5, 2025

Copy link
Copy Markdown

Walkthrough

Adds a GitHub Actions workflow that triggers on pushes to main when api/*.proto files change and sends a repository_dispatch event (event_type: "auth_gateway_proto_changed") to the MCP server repository with ref, sha, and repository in the payload, using the PSETHI_GIT_TOKEN secret.

Changes

Cohort / File(s) Change Summary
GitHub Actions workflow
​.github/workflows/notify-mcp-server-builder.yml
New workflow added. Triggers on push to main with path filter api/*.proto. Runs a job on a self-hosted runner that executes a curl call to GitHub's repository_dispatch API with event_type: "auth_gateway_proto_changed" and client_payload containing ref, sha, and repository. Uses secret PSETHI_GIT_TOKEN for authentication. No explicit error handling in the step.

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)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

  • Verify workflow trigger path filter (api/*.proto) and branch (main) are correct.
  • Validate curl command syntax, headers, and the repository_dispatch endpoint URL.
  • Confirm PSETHI_GIT_TOKEN secret exists and has repo:dispatch or appropriate permissions.
  • Check client_payload fields (ref, sha, repository) match the consumer expectations in the target repository.
  • Consider adding error handling/retries for the curl step or checking non-2xx responses.

Poem

🐰
Nose to the keys, I softly prance,
Watching protos leap and dance,
A tiny dispatch across the night,
So distant servers wake and light,
Hops and bytes—celebrate the chance!


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between f561a97 and 5c1a920.

📒 Files selected for processing (1)
  • .github/workflows/notify-mcp-server-builder.yml (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +15 to +19
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 \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant