Skip to content

GitHub pull request event - #5335

Merged
rekram1-node merged 16 commits into
anomalyco:devfrom
dbpolito:github_pull_request_event
Dec 22, 2025
Merged

GitHub pull request event#5335
rekram1-node merged 16 commits into
anomalyco:devfrom
dbpolito:github_pull_request_event

Conversation

@dbpolito

Copy link
Copy Markdown
Contributor

This is a follow up of: #4828

So this add proper support for pull request events, allowing you do add automatic reviews for example:

name: opencode-reviewon:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]jobs:
review:
permissions:
id-token: writecontents: readpull-requests: readissues: readsteps:
- uses: actions/checkout@v4
- uses: sst/opencode/github@latestwith:
model: anthropic/claude-opus-4-5prompt: | Review this pull request: - Check for code quality issues - Look for potential bugs - Suggest improvements

Fixed comment filtering logic to handle both comment events and pull_request events:
- Use triggerCommentId which is undefined for pull_request events
- Guard reaction functions to handle undefined triggerCommentId
- Simplify comment filtering to exclude trigger comment only for comment events
- For comment events: add/remove reactions to/from the comment
- For pull_request events: add/remove reactions to/from the PR body
- This ensures reactions work correctly regardless of the trigger event type
@dbpolito

Copy link
Copy Markdown
ContributorAuthor

It seems the action failed due to request timeout, doesn't seem related to this PR... but i can't retry the job...

# Conflicts:
#	packages/opencode/src/cli/cmd/github.ts
@dbpolito

Copy link
Copy Markdown
ContributorAuthor

@rekram1-node i've fixed conflicts... lemme your thoughts or you wanna further discuss this on Discord

@rekram1-node

Copy link
Copy Markdown
Collaborator

/review

Comment threadpackages/opencode/src/cli/cmd/github.ts
@dbpolito

Copy link
Copy Markdown
ContributorAuthor

@rekram1-node i already fixed this comment... i pushed at the same time you commented it seems 😬

@rekram1-node

Copy link
Copy Markdown
Collaborator

/review

@rekram1-node

Copy link
Copy Markdown
Collaborator

sorry that i spam /review it's just helpful because it catches things I miss

@github-actions

Copy link
Copy Markdown
Contributor

lgtm

@rekram1-node
rekram1-node merged commit 0545c5d into anomalyco:devDec 22, 2025
2 checks passed
rekram1-node pushed a commit that referenced this pull request Dec 27, 2025
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 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
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 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

@dbpolito@rekram1-node