Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rudra/utils/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def update_content(self, branch_name: str, file_path: str, update_message: str,
current_sha, branch=f'refs/heads/{branch_name}')
return update['commit'].sha

def create_pr(self, branch_name: str, title: str, body: str) -> str:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do the same for update_content as well? It will be uniform.

def create_pr(self, head_ref: str, title: str, body: str) -> str:
"""Raise the PR to merge changes from branch to master."""
pr = self._repo.create_pull(title=title, body=body, head=f'refs/heads/{branch_name}',
pr = self._repo.create_pull(title=title, body=body, head=head_ref,
base=f'refs/heads/{self._master_ref}')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even you can consider taking a head ref for base.

return pr.number