Repository navigation
Description
Problem (confirmed)
feature-ideation's discussion: created single-idea enhancement crashes with:
##[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).
Fix — mirror the initiative-planner #618 bridge
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_discussioninput to the stub'sworkflow_dispatchinputs (string, default ''). - Add a
redispatchjob that runs only ondiscussionevents: guardcategory.slug == 'ideas' && user.type != 'Bot', requireGH_PAT_WORKFLOWS(a dispatch fired withGITHUB_TOKENnever starts a run — same constraint asscripts/initiative-planner/redispatch.sh), thengh workflow run feature-ideation.yml -f target_discussion=${{ github.event.discussion.number }}. - Make the existing
ideatejob (theuses:reusable call) run only onworkflow_dispatch/schedule, and sourcetarget_discussionfrominputs.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: discussioncrash. - Bot-authored / non-
ideasdiscussions are not redispatched (guard holds). batscoverage asserts the redispatch job exists, is guarded, and forwardstarget_discussion.- Re-validates [Phase 2] Validate the folded feature-ideation enhancement mode on real .github-private Discussions (next ring) #875.
Cross-repo follow-on (not this issue)
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.
Blocks #876 (deprecate idea-enhancer). Refs #875, #934, #872.
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…