Skip to content

Commit 12b8341

Browse files
[generate-manifest] add repository_dispatch Trigger (#234)
* [generate-manifest] add repository_dispatch Trigger * [generate_manifest] use MCPM_PERSONAL_ACCESS_TOKEN to create PR
1 parent 8915d2c commit 12b8341

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/generate-manifest.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
description: 'Repository URL to generate manifest for'
88
required: true
99
type: string
10+
repository_dispatch:
11+
types: [generate-manifest]
1012

1113
jobs:
1214
generate-manifest:
@@ -35,24 +37,25 @@ jobs:
3537
env:
3638
ANYON_API_KEY: ${{ secrets.ANYON_API_KEY }}
3739
run: |
38-
python scripts/get_manifest.py "${{ github.event.inputs.repo_url }}"
40+
REPO_URL="${{ github.event.inputs.repo_url || github.event.client_payload.repo_url }}"
41+
python scripts/get_manifest.py "$REPO_URL"
3942
4043
- name: Extract repo name for branch
4144
id: repo-info
4245
run: |
43-
REPO_URL="${{ github.event.inputs.repo_url }}"
46+
REPO_URL="${{ github.event.inputs.repo_url || github.event.client_payload.repo_url }}"
4447
REPO_NAME=$(echo "$REPO_URL" | sed 's/.*github\.com[:/]//' | sed 's/\.git$//' | tr '/' '-')
4548
echo "repo_name=$REPO_NAME" >> $GITHUB_OUTPUT
4649
echo "branch_name=add-manifest-$REPO_NAME" >> $GITHUB_OUTPUT
4750
4851
- name: Create Pull Request
4952
uses: peter-evans/create-pull-request@v5
5053
with:
51-
token: ${{ secrets.GITHUB_TOKEN }}
54+
token: ${{ secrets.MCPM_PERSONAL_ACCESS_TOKEN }}
5255
commit-message: |
5356
feat: add manifest for ${{ steps.repo-info.outputs.repo_name }}
5457
55-
Generated manifest JSON for repository: ${{ github.event.inputs.repo_url }}
58+
Generated manifest JSON for repository: ${{ github.event.inputs.repo_url || github.event.client_payload.repo_url }}
5659
5760
🤖 Generated with [Claude Code](https://claude.ai/code)
5861
@@ -61,7 +64,7 @@ jobs:
6164
body: |
6265
## Summary
6366
64-
This PR adds a new MCP server manifest generated from the repository: ${{ github.event.inputs.repo_url }}
67+
This PR adds a new MCP server manifest generated from the repository: ${{ github.event.inputs.repo_url || github.event.client_payload.repo_url }}
6568
6669
## Changes
6770

0 commit comments

Comments
 (0)