Skip to content

Substitute action references in Bugzilla comments - #6364

Merged
suhaibmujahid merged 2 commits into
mozilla:masterfrom
suhaibmujahid:worktree-fix-6330-action-ref-substitution
Jul 27, 2026
Merged

Substitute action references in Bugzilla comments#6364
suhaibmujahid merged 2 commits into
mozilla:masterfrom
suhaibmujahid:worktree-fix-6330-action-ref-substitution

Conversation

@suhaibmujahid

@suhaibmujahid suhaibmujahid commented Jul 21, 2026

Copy link
Copy Markdown
Member

Fixes #6330

@suhaibmujahid
suhaibmujahid force-pushed the worktree-fix-6330-action-ref-substitution branch from dcca270 to 99038ff Compare July 23, 2026 20:23
@suhaibmujahid
suhaibmujahid marked this pull request as ready for review July 23, 2026 20:23
@suhaibmujahid
suhaibmujahid requested a review from a team as a code owner July 23, 2026 20:23
Copilot AI review requested due to automatic review settings July 23, 2026 20:23
@suhaibmujahid
suhaibmujahid enabled auto-merge (rebase) July 23, 2026 20:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes unresolved {{actions.<ref>.url}} placeholders appearing literally in posted Bugzilla comments by aligning the submit_patch handler result contract with the documented url field and improving visibility when placeholders can’t be resolved.

Changes:

  • Change SubmitPatchHandler to return the revision URL under url (instead of revision_url) and update its test accordingly.
  • Update placeholder resolver tests to use {{actions.<ref>.url}} and assert unresolved placeholders are logged.
  • Enhance resolve_placeholders to log when a placeholder can’t be resolved (missing ref / missing field).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
services/hackbot-api/tests/test_actions_applier.py Updates placeholder examples to url and adds caplog assertions for unresolved placeholders.
services/hackbot-api/app/actions_applier.py Adds logging for unresolved placeholders during substitution.
libs/hackbot-runtime/tests/test_phabricator_handler.py Updates expected SubmitPatchHandler result key from revision_url to url.
libs/hackbot-runtime/hackbot_runtime/actions/handlers/phabricator_handler.py Returns revision URL under url to match the documented placeholder contract.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/hackbot-api/app/actions_applier.py
Upstream mozilla#6334 added a `url` key to the SubmitPatchHandler result (the key
the submit_patch tool documents for `{{actions.<ref>.url}}`), leaving
`revision_url` as a duplicate that nothing consumes. Drop it so the result
exposes a single canonical `url`.
resolve_placeholders leaves an unresolved {{actions.<ref>.<field>}} as-is
by design, but until now did so silently, so a literal placeholder posted
to a comment went unnoticed. Log a warning naming the missing ref or field
so it surfaces in the run logs.
@suhaibmujahid
suhaibmujahid force-pushed the worktree-fix-6330-action-ref-substitution branch from 1be7199 to 5cd422f Compare July 23, 2026 21:13
@suhaibmujahid
suhaibmujahid requested a review from marco-c July 27, 2026 05:42
@suhaibmujahid
suhaibmujahid merged commit 49b6e48 into mozilla:master Jul 27, 2026
7 checks passed
@suhaibmujahid
suhaibmujahid deleted the worktree-fix-6330-action-ref-substitution branch July 27, 2026 13:05
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.

Hackbot does not substitute action references when commenting on Bugzilla.

3 participants