Fix the WPT exporter (#30870)

* Fix the WPT exporter

* apply fixes by @mrobinson

* fix mach test-scripts on NixOS

* rename main_branch_name to default_branch
This commit is contained in:
Delan Azabani 2023-12-15 19:05:00 +08:00 committed by GitHub
parent 29eb4878ed
commit 0be30b30ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 11 deletions

View file

@ -55,9 +55,10 @@ class GithubRepository:
This class allows interacting with a single GitHub repository.
"""
def __init__(self, sync: WPTSync, repo: str):
def __init__(self, sync: WPTSync, repo: str, default_branch: str):
self.sync = sync
self.repo = repo
self.default_branch = default_branch
self.org = repo.split("/")[0]
self.pulls_url = f"repos/{self.repo}/pulls"
@ -105,7 +106,7 @@ class GithubRepository:
data = {
"title": title,
"head": branch.get_pr_head_reference_for_repo(self),
"base": "main",
"base": self.default_branch,
"body": body,
"maintainer_can_modify": False,
}