Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1f2ea6f4ef2ced34d3c8fba1d18ff257250f96f7
https://github.com/WebKit/WebKit/commit/1f2ea6f4ef2ced34d3c8fba1d18ff257250f96f7
Author: Chris Dumez <[email protected]>
Date: 2026-06-19 (Fri, 19 Jun 2026)
Changed paths:
M Tools/Scripts/webkitpy/w3c/test_exporter.py
Log Message:
-----------
REGRESSION(296936@main) export-w3c-test-changes fails to create a pull
request when --branch-name is used
https://bugs.webkit.org/show_bug.cgi?id=317494
Reviewed by Brianna Fan.
When export-w3c-test-changes is run with --branch-name (-bn) to give the
exported branch a public name that differs from the local branch, creating
the WPT pull request fails with a GitHub 422 error:
```
Error Message: Validation Failed
Field: head
The formatting of a field is invalid.
```
The local branch is always named "wpt-export-for-webkit-<bug>", but the
branch is pushed to the fork under the public name (the refspec is
<branch_name>:<public_branch_name>). create_wpt_pull_request already builds
the correct head string "<fork_remote>:<public_branch_name>" and passes it
in as remote_branch_name, but only uses it for log messages; the actual
GitHub API call passed head=self._wpt_repo.branch, i.e. the local branch
name. GitHub then looked for a branch that does not exist on the fork and
rejected the request.
This regressed in 296936@main, which converted the exporter to webkitscmpy
and replaced the create_pr(remote_branch_name, ...) call with
pull_requests.create(..., head=self._wpt_repo.branch), substituting the
local branch name for the remote_branch_name that was previously used.
This was masked in the common case because, without --branch-name, the
public branch name equals the local branch name, so the two happened to
coincide.
Pass remote_branch_name as the head so the pull request points at the
branch that was actually pushed, and use it consistently in the failure
log message.
* Tools/Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.create_wpt_pull_request):
Canonical link: https://commits.webkit.org/315552@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications