Skip to content

Substitute action references in Bugzilla comments#6364

Draft
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-fix-6330-action-ref-substitution
Draft

Substitute action references in Bugzilla comments#6364
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-fix-6330-action-ref-substitution

Conversation

@suhaibmujahid

Copy link
Copy Markdown
Member

Fixes #6330

Problem

Hackbot posted Bugzilla comments with an unresolved action reference, e.g. bug 2033910 comment 6 shows:

Submitted a patch implementing the agreed approach (comment #5): D-patch.

The {{actions.patch.url}} placeholder was posted literally instead of the revision URL.

Root cause

The submit_patch tool documents referencing the applied revision via {{actions.<ref>.url}} (see the docstrings in phabricator.py and recorder.py). But SubmitPatchHandler returned the URL under the key revision_url, not url. resolve_placeholders then found no url field on the result and, by design, left the placeholder untouched rather than raising, so the literal text was posted.

Fix

Return the revision URL under url, matching the tool's documented contract and the Bugzilla handlers' existing url convention. Updated the handler test and the placeholder-resolver tests that used the stale revision_url example key.

The submit_patch tool documents referencing the applied revision via
{{actions.<ref>.url}}, but SubmitPatchHandler returned the URL under
'revision_url'. resolve_placeholders then found no 'url' field and left
the placeholder literal, so Bugzilla comments were posted with an
unsubstituted {{actions.patch.url}}.

Return the URL under 'url' to match the tool's documented contract and
the bugzilla handlers' convention.
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.

1 participant