Substitute action references in Bugzilla comments - #6364
Merged
suhaibmujahid merged 2 commits intoJul 27, 2026
Merged
Conversation
suhaibmujahid
force-pushed
the
worktree-fix-6330-action-ref-substitution
branch
from
July 23, 2026 20:23
dcca270 to
99038ff
Compare
suhaibmujahid
marked this pull request as ready for review
July 23, 2026 20:23
suhaibmujahid
enabled auto-merge (rebase)
July 23, 2026 20:24
There was a problem hiding this comment.
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
SubmitPatchHandlerto return the revision URL underurl(instead ofrevision_url) and update its test accordingly. - Update placeholder resolver tests to use
{{actions.<ref>.url}}and assert unresolved placeholders are logged. - Enhance
resolve_placeholdersto 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.
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
force-pushed
the
worktree-fix-6330-action-ref-substitution
branch
from
July 23, 2026 21:13
1be7199 to
5cd422f
Compare
marco-c
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6330