Skip to content

Add GitHub PR comment actions and handlers to hackbot - #7360

Open
Foxbolts wants to merge 2 commits into
mozilla:masterfrom
Foxbolts:ml/hackbot-github-comments
Open

Foxbolts wants to merge 2 commits into
mozilla:masterfrom
Foxbolts:ml/hackbot-github-comments

Conversation

@Foxbolts

@Foxbolts Foxbolts commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7056

Description

Add github.add_comment and github.add_inline_comments to the hackbot runtime, with matching handlers in hackbot-api

Agents record proposed comments during a run, and hackbot-api posts them as the GitHub App when the actions are applied. Standalone general comments go in the PR conversation. When general and inline comments for the same PR are applied together, they are combined into one review.

Notes

  • Each action uses a token scoped to its repository with only pull_requests: write.
  • Inline comments support multi-line ranges and an optional review summary.
  • If the GitHub App isn't configured, the action fails (with error)

@Foxbolts
Foxbolts requested a review from a team as a code owner October 30, 2026 16:03
@OrlaM

OrlaM commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@suhaibmujahid Bumping this one, I think it might have fallen off the radar.

@suhaibmujahid suhaibmujahid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OrlaM thank you for the ping!

@Foxbolts LGTM! Thank you! Could you please rebase?

@ayoubdiourin7 please do your pass and merge when it is ready.

)


class AddInlineCommentsHandler:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there are normal comments and inline comments, we might want to merge them together to be submitted at once so we trigger a single notification email. If it not a simple change, please file a follow-up issue for that and we could do it later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡 general and inline comments for the same PR are now combined into one review when applied together. FYI standalone PR comments still work as before

@Foxbolts
Foxbolts force-pushed the ml/hackbot-github-comments branch from 63daf2a to 1606e46 Compare November 12, 2026 21:10

This branch has not been deployed

No deployments
Sign up for free to 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.

Add GitHub comment actions and handlers

3 participants