You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
##[error]Action failed with error: Unsupported event type: discussion
anthropics/claude-code-action aborts on discussion event contexts, and feature-ideation has no redispatch bridge (unlike initiative-planner). So when a human opens a new Idea, the enhancement crashes before posting anything — no new idea is ever enhanced on creation. Pre-existing (the discussion-trigger enhancement added in #629/#805 never actually worked); surfaced by the #875 validation (failed run: https://github.com/petry-projects/.github-private/actions/runs/28290846519, event=discussion).
The enhance_backlog sweep and scheduled runs are fine (they run under workflow_dispatch).
Restructure the active stub.github/workflows/feature-ideation.yml (this repo) so the discussion: created path re-dispatches to workflow_dispatch instead of calling the reusable directly:
Add a target_discussion input to the stub's workflow_dispatch inputs (string, default '').
Add a redispatch job that runs only on discussion events: guard category.slug == 'ideas' && user.type != 'Bot', require GH_PAT_WORKFLOWS (a dispatch fired with GITHUB_TOKEN never starts a run — same constraint as scripts/initiative-planner/redispatch.sh), then gh workflow run feature-ideation.yml -f target_discussion=${{ github.event.discussion.number }}.
Make the existing ideate job (the uses: reusable call) run only on workflow_dispatch/schedule, and source target_discussion from inputs.target_discussion (so single-idea mode works under the dispatched run, where claude-code-action is supported).
Reference implementation: .github/workflows/initiative-planner.yml (the redispatch job) + scripts/initiative-planner/redispatch.sh.
Acceptance criteria
Creating a new human-authored Ideas Discussion results in exactly one enhancement comment in single-idea mode, carrying the canonical <!-- feature-ideation:enhanced --> marker — with noUnsupported event type: discussion crash.
Bot-authored / non-ideas discussions are not redispatched (guard holds).
bats coverage asserts the redispatch job exists, is guarded, and forwards target_discussion.
The org template petry-projects/.github : standards/workflows/feature-ideation.yml needs the same bridge so other repos inherit it — a maintainer raises that PR (dev-lead can't write the public repo). This issue fixes the next-ring (.github-private) stub, which is what #875 validates.
Thanks for the thorough write-up and for tracking down the failed run — this is clearly documented and the initiative-planner parallel makes the fix path straightforward. Before we proceed: can you confirm that GH_PAT_WORKFLOWS is already provisioned as a repository secret here (as it is for initiative-planner), or will that need to be added as part of this fix?
Restructure the active thin-caller stub .github/workflows/feature-ideation.yml so the discussion: created path re-dispatches to workflow_dispatch (mirroring the initiative-planner #618 bridge) instead of calling the reusable directly — fixing the Unsupported event type: discussion crash so a new human Idea is enhanced exactly once.
Implementation Checklist
Add a target_discussion workflow_dispatch input (string, default '')
Add a redispatch job gated on discussion events: guard category.slug == 'ideas' && user.type != 'Bot', require GH_PAT_WORKFLOWS, then gh workflow run feature-ideation.yml -f target_discussion=<num> (logic kept inline in the stub so it stays drift-free with the org template — no repo-private script the template lacks)
Gate the existing ideate job to workflow_dispatch/schedule only, and source target_discussion from inputs.target_discussion
Tests to Write (tests/test_feature_ideation.bats)
target_discussion declared as a workflow_dispatch input
redispatch job exists and is gated on the discussion event
redispatch guard holds category.slug == 'ideas' and user.type != 'Bot'
redispatch requires GH_PAT_WORKFLOWS
redispatch forwards target_discussion via gh workflow run feature-ideation.yml
ideate job no longer runs on the discussion event
ideate sources target_discussion from inputs.target_discussion
Test Command
bats tests/test_feature_ideation.bats (full: scripts/run-bats.sh ...), then bash .dev-lead/scripts/dev-lead-lint.sh
Added a redispatch job gated on the discussion event (category.slug == 'ideas' && user.type != 'Bot') that requires GH_PAT_WORKFLOWS and re-invokes the stub via gh workflow run feature-ideation.yml -f target_discussion=<num>
Gated the ideate reusable call to workflow_dispatch/schedule only, sourcing target_discussion from inputs.target_discussion
Added bats coverage (redispatch job exists, is guarded, requires the PAT, forwards target_discussion; ideate is off the discussion path and reads the input)
Design notes
The bridge logic is kept inline in the stub (not a scripts/feature-ideation/redispatch.sh) because this file is a thin caller copied into other repos via the org template — a copied stub carries no scripts/ tree, so inlining keeps it drift-free with petry-projects/.github/standards/workflows/feature-ideation.yml.
The redispatch job needs no GITHUB_TOKEN scopes (it dispatches with the PAT and does not checkout), so it pins permissions: {} — tighter than the initiative-planner bridge, which checks out to run its script.
Test Results
bats tests/test_feature_ideation.bats
1..12
ok 1 feature-ideation.yml exists
ok 2 feature-ideation.yml calls the org reusable workflow
ok 3 feature-ideation.yml pins the reusable to the configured channel tag
ok 4 feature-ideation.yml exposes the enhance_backlog backfill-sweep input
ok 5 feature-ideation.yml forwards enhance_backlog to the reusable workflow
ok 6 feature-ideation.yml declares a target_discussion workflow_dispatch input
ok 7 feature-ideation.yml has a redispatch job that runs only on the discussion event
ok 8 feature-ideation.yml redispatch job keeps the ideas-category / non-bot guard
ok 9 feature-ideation.yml redispatch requires GH_PAT_WORKFLOWS (GITHUB_TOKEN won't start a run)
ok 10 feature-ideation.yml redispatch forwards target_discussion via workflow_dispatch
ok 11 feature-ideation.yml ideate job no longer runs on the discussion event
ok 12 feature-ideation.yml sources target_discussion from inputs.target_discussion
Full CI bats list (47 files): 0 failures.
.github/workflows/feature-ideation.yml: new target_discussion dispatch input; new discussion-gated redispatch bridge job (PAT guard + gh workflow run re-dispatch); ideate job restricted to workflow_dispatch/schedule and now reads inputs.target_discussion.
tests/test_feature_ideation.bats: 7 new assertions covering the input, the guarded redispatch job, the PAT requirement, target_discussion forwarding, and the ideate-job rewiring (already wired into lint.yml's bats list).
Cross-repo follow-on (org template petry-projects/.github) is out of scope per the issue — a maintainer raises that PR (dev-lead cannot write the public repo).
Activity
github-actions commentedon Jun 27, 2026
Thanks for the thorough write-up and for tracking down the failed run — this is clearly documented and the initiative-planner parallel makes the fix path straightforward. Before we proceed: can you confirm that
GH_PAT_WORKFLOWSis already provisioned as a repository secret here (as it is forinitiative-planner), or will that need to be added as part of this fix?don-petry commentedon Jun 27, 2026
Dev-Lead Implementation Plan
Issue: #963 — fix(feature-ideation): add discussion→dispatch redispatch bridge
Scope
Restructure the active thin-caller stub
.github/workflows/feature-ideation.ymlso thediscussion: createdpath re-dispatches toworkflow_dispatch(mirroring the initiative-planner #618 bridge) instead of calling the reusable directly — fixing theUnsupported event type: discussioncrash so a new human Idea is enhanced exactly once.Implementation Checklist
target_discussionworkflow_dispatch input (string, default '')redispatchjob gated ondiscussionevents: guardcategory.slug == 'ideas' && user.type != 'Bot', requireGH_PAT_WORKFLOWS, thengh workflow run feature-ideation.yml -f target_discussion=<num>(logic kept inline in the stub so it stays drift-free with the org template — no repo-private script the template lacks)ideatejob toworkflow_dispatch/scheduleonly, and sourcetarget_discussionfrominputs.target_discussionTests to Write (tests/test_feature_ideation.bats)
target_discussiondeclared as a workflow_dispatch inputredispatchjob exists and is gated on thediscussioneventcategory.slug == 'ideas'anduser.type != 'Bot'GH_PAT_WORKFLOWStarget_discussionviagh workflow run feature-ideation.ymlideatejob no longer runs on thediscussioneventideatesourcestarget_discussionfrominputs.target_discussionTest Command
bats tests/test_feature_ideation.bats(full:scripts/run-bats.sh ...), thenbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jun 27, 2026
Dev-Lead: Implementation Complete
Plan Execution
target_discussionworkflow_dispatch input (string, default'')redispatchjob gated on thediscussionevent (category.slug == 'ideas' && user.type != 'Bot') that requiresGH_PAT_WORKFLOWSand re-invokes the stub viagh workflow run feature-ideation.yml -f target_discussion=<num>ideatereusable call toworkflow_dispatch/scheduleonly, sourcingtarget_discussionfrominputs.target_discussiontarget_discussion;ideateis off the discussion path and reads the input)Design notes
scripts/feature-ideation/redispatch.sh) because this file is a thin caller copied into other repos via the org template — a copied stub carries noscripts/tree, so inlining keeps it drift-free withpetry-projects/.github/standards/workflows/feature-ideation.yml.redispatchjob needs noGITHUB_TOKENscopes (it dispatches with the PAT and does not checkout), so it pinspermissions: {}— tighter than the initiative-planner bridge, which checks out to run its script.Test Results
Lint
bash .dev-lead/scripts/dev-lead-lint.sh→ all checks passed (shellcheck 81 files, agent/CODEOWNERS frontmatter)yamllint(CI config) on the workflow → PASSactionlint 1.7.12on the workflow → PASSFiles Changed
.github/workflows/feature-ideation.yml: newtarget_discussiondispatch input; newdiscussion-gatedredispatchbridge job (PAT guard +gh workflow runre-dispatch);ideatejob restricted toworkflow_dispatch/scheduleand now readsinputs.target_discussion.tests/test_feature_ideation.bats: 7 new assertions covering the input, the guarded redispatch job, the PAT requirement, target_discussion forwarding, and the ideate-job rewiring (already wired intolint.yml's bats list).Notes
workflow_dispatch(single-idea mode, noUnsupported event type: discussioncrash); bot/non-ideas discussions fail the guard and are not redispatched; bats asserts the bridge; this is the path [Phase 2] Validate the folded feature-ideation enhancement mode on real .github-private Discussions (next ring) #875 validates.petry-projects/.github) is out of scope per the issue — a maintainer raises that PR (dev-lead cannot write the public repo).feat: implement issue #963 — fix(feature-ideation): add discussion→di…
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
fix(ci): remove duplicated function/variable declarations that broke …
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
fix(ci): remove duplicated function/variable declarations that broke …
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
fix(ci): remove duplicated function/variable declarations that broke …
feat: implement issue #963 — fix(feature-ideation): add discussion→di…
feat: implement issue #963 — fix(feature-ideation): add discussion→di…