Skip to content

Commit c629628

Browse files
[BazelBot] Fix PR Creation
Tested. We were using the wrong head branch and we need to disable maintainer modification or otherwise we end up with failures from the Github API. https://github.com/orgs/community/discussions/39178 has additional information, but nothing conclusive.
1 parent b23331d commit c629628

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

google-bazel-bot/bazel-bot/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,9 @@ def push_fix(self, commit_hash: str, create_pr: bool) -> bool:
287287
pr = self.gh_pr_repo.create_pull(
288288
title=f"[Bazel] Fixes {commit_hash[:7]}",
289289
body=pr_body,
290-
head=f"{self.creds.gh_pr_user}:{branch_name}",
290+
head=f"{self.creds.gh_fork_user}:{branch_name}",
291291
base=self.main_branch,
292+
maintainer_can_modify=False,
292293
)
293294
logger.info(f"Pull Request Created: {pr.html_url}")
294295
except Exception as e:

0 commit comments

Comments
 (0)