Skip to content

Commit e137dd3

Browse files
authored
fix(ci): use repository_dispatch for polish release notes (Fission-AI#545)
The GitHub App token doesn't have actions:write permission, which is required for workflow_dispatch. Switch to repository_dispatch which works with existing contents:write permission. Changes: - release-prepare.yml: Use gh api to trigger repository_dispatch - polish-release-notes.yml: Add repository_dispatch trigger type - Delete test workflow (validation complete) Tested via PR Fission-AI#542 - both workflow_dispatch and repository_dispatch triggers work correctly with claude-code-action.
1 parent 2beb8e7 commit e137dd3

3 files changed

Lines changed: 10 additions & 135 deletions

File tree

.github/workflows/polish-release-notes.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Polish Release Notes
33
# Uses Claude to transform raw changelog into polished release notes.
44
# Triggered automatically by release-prepare after publishing, or manually.
55
on:
6+
repository_dispatch:
7+
types: [polish-release-notes]
68
workflow_dispatch:
79
inputs:
810
tag_name:
@@ -11,7 +13,8 @@ on:
1113
type: string
1214

1315
env:
14-
TAG_NAME: ${{ inputs.tag_name }}
16+
# repository_dispatch passes tag via client_payload, workflow_dispatch via inputs
17+
TAG_NAME: ${{ github.event.client_payload.tag_name || inputs.tag_name }}
1518

1619
permissions:
1720
contents: write

.github/workflows/release-prepare.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jobs:
6060
# npm authentication handled via OIDC trusted publishing (no token needed)
6161

6262
# Trigger release notes polishing after a release is published
63+
# Uses repository_dispatch instead of workflow_dispatch because:
64+
# - workflow_dispatch requires actions:write permission (GitHub App doesn't have it)
65+
# - repository_dispatch works with contents:write (which we already have)
6366
- name: Polish release notes
6467
if: steps.changesets.outputs.published == 'true'
6568
env:
@@ -68,4 +71,6 @@ jobs:
6871
# Get version from package.json (just bumped by changesets)
6972
TAG="v$(jq -r .version package.json)"
7073
echo "Triggering polish workflow for $TAG"
71-
gh workflow run polish-release-notes.yml -f tag_name="$TAG"
74+
gh api repos/${{ github.repository }}/dispatches \
75+
--method POST \
76+
--input - <<< "{\"event_type\":\"polish-release-notes\",\"client_payload\":{\"tag_name\":\"$TAG\"}}"

.github/workflows/test-polish-dispatch.yml

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)