Skip to content

[APPAI-1733] Use head ref to create PR across repos #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dgpatelgit
Copy link
Contributor

Description

Create PR function enhanced to take head reference to create PR across repos.

Fixes # (issue)
This feature is required by Jira ticket https://issues.redhat.com/browse/APPAI-1733

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@dgpatelgit dgpatelgit requested a review from arajkumar February 15, 2021 11:18
@@ -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.

"""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.

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.

2 participants