Skip to content

Move action handlers to hackbot api - #6802

Open
ayoubdiourin7 wants to merge 5 commits into
mozilla:masterfrom
ayoubdiourin7:move-action-handlers-to-hackbot-api
Open

Move action handlers to hackbot api#6802
ayoubdiourin7 wants to merge 5 commits into
mozilla:masterfrom
ayoubdiourin7:move-action-handlers-to-hackbot-api

Conversation

@ayoubdiourin7

Copy link
Copy Markdown
Contributor

This PR is best reviewed commit by commit:

Fixes #6754

@ayoubdiourin7
ayoubdiourin7 requested a review from a team as a code owner September 7, 2026 20:17
Comment on lines +25 to +33
def _git(repo, *args: str) -> str:
"""Run a git command in ``repo`` and return its stdout."""
return subprocess.run(
["git", "-C", str(repo), *args],
check=True,
capture_output=True,
text=True,
).stdout

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.

Why do we need this here? The hackbot-api service does not have a git repo!

Comment on lines +36 to +37
# Email-body token replaced with the source-code patch.
PATCH_PLACEHOLDER = "{patch}"

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.

why are we adding this?

Comment on lines +20 to +21
# Actions that submit source changes to Phabricator.
PATCH_ACTION_TYPES = frozenset({"phabricator.submit_patch", "phabricator.update_patch"})

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.

Is this a duplicate now? If so, we should file a follow-up issue and link it here, so we could fix that later.

If we have other cases, we could use the same issue to track all of them.

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.

Move Hackbot action handlers to hackbot-api service

2 participants