Skip to content

github: support issues and workflow_dispatch events - #6157

Merged
rekram1-node merged 3 commits into
anomalyco:devfrom
elithrar:issues-event-trigger
Dec 26, 2025
Merged

github: support issues and workflow_dispatch events#6157
rekram1-node merged 3 commits into
anomalyco:devfrom
elithrar:issues-event-trigger

Conversation

@elithrar

@elithrarelithrar commented Dec 25, 2025

Copy link
Copy Markdown
Contributor

Adds support for issues (opened, edited) and workflow_dispatch events in the GitHub Action. Picks up from the work in #5810.

I've used this as an opportunity to refactor the event handling to make it easier to read + maintain going forward.

  • categorize events into USER_EVENTS and REPO_EVENTS for clearer routing
  • USER_EVENTS (issue_comment, pull_request_review_comment, issues, pull_request): have actor, support reactions/comments
  • REPO_EVENTS (schedule, workflow_dispatch): no actor, output to logs/PR only
  • require prompt input for issues events (no comment to parse)
  • add reaction to issue itself for issues events (same as pull_request)
  • update docs with new events in supported events table
  • add issues triage workflow example with account age filter
  • fix docs formatting for scheduled workflows note

Event Routing

┌─────────────────────────────────────────────────────────────────────────────┐
│ GithubRunCommand.handler() │
│ 1. Parse context & normalize inputs │
│ 2. Get app token (OIDC or GITHUB_TOKEN) │
│ 3. Configure git │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌─────────────────┴─────────────────┐
isUserEvent isRepoEvent
│ │
▼ ▼
┌───────────────────────────────────┐ ┌───────────────────────────────────┐
│ USER_EVENTS │ │ REPO_EVENTS │
│ - issue_comment │ │ - schedule │
│ - pull_request_review_comment │ │ - workflow_dispatch │
│ - issues (opened, edited) │ │ │
│ - pull_request │ │ │
├───────────────────────────────────┤ ├───────────────────────────────────┤
│ FLOW: │ │ FLOW: │
│ 1. assertPermissions(actor) │ │ 1. (no permission check) │
│ 2. addReaction() │ │ 2. (no reaction) │
│ 3. chat() with context │ │ 3. chat() │
│ 4. createComment(response) │ │ 4. console.log() or createPR() │
│ 5. removeReaction() │ │ │
└───────────────────────────────────┘ └───────────────────────────────────┘

USER vs. REPO event handling

AspectUSER_EVENTSREPO_EVENTS
ActorPresentNone
Issue/PR contextAlways has issueIdNone
Permission checkYesNo
ReactionAdd before, remove afterNone
OutputComment on issue/PRLogs only (+ PR if changes)
Prompt sourceComment body or PROMPT envPROMPT env (required)

- add issues and workflow_dispatch to supported event types
- categorize events into USER_EVENTS and REPO_EVENTS for clearer routing
- USER_EVENTS (issue_comment, pull_request_review_comment, issues, pull_request): have actor, support reactions/comments
- REPO_EVENTS (schedule, workflow_dispatch): no actor, output to logs/PR only
- require PROMPT input for issues events (no comment to parse)
- add reaction to issue itself for issues events
- update docs with new events in supported events table
- add issues triage workflow example with account age filter
- fix docs formatting for scheduled workflows note
- workflow_dispatch now logs actor and includes co-author attribution
- add separate branch prefix 'dispatch' for workflow_dispatch events
- fix docs example to include contents:write and pull-requests:write permissions
@elithrar
elithrar marked this pull request as ready for review December 25, 2025 14:14
@rekram1-node

Copy link
Copy Markdown
Collaborator

/review

@github-actions

Copy link
Copy Markdown
Contributor

lgtm

@rekram1-node
rekram1-node merged commit 1626341 into anomalyco:devDec 26, 2025
2 checks passed
hk9890 pushed a commit to hk9890/opencode that referenced this pull request Jan 1, 2026
triklozoid pushed a commit to triklozoid/opencode that referenced this pull request Feb 2, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
Sign up for freeto 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.

2 participants

@elithrar@rekram1-node