Skip to content

Commit

Permalink
Merge pull request #305 from techman83/fix/comment-properly
Browse files Browse the repository at this point in the history
fix: Comment on PR
  • Loading branch information
techman83 authored Apr 21, 2023
2 parents 644ff6a + b331f5a commit 5b7612b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netkan/netkan/github_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def create_pull_request(self, title: str, branch: str, body: str, labels: Option
except GithubException as exc:
logging.error('Pull request for %s failed: %s',
branch, self.get_error_message(exc.data))
owner_name = self.repo.owner.name
login = self.repo.owner.login
logging.info(
'Attempting to find existing PR via head=%s:%s', owner_name, branch)
for pull in self.repo.get_pulls(head=f'{owner_name}:{branch}'):
'Attempting to find existing PR via head=%s:%s', login, branch)
for pull in self.repo.get_pulls(head=f'{login}:{branch}'):
# Post description as a comment if pull request exists
logging.info('PR found: #%s %s', pull.number, pull.title)
comment = pull.create_issue_comment(body)
Expand Down

0 comments on commit 5b7612b

Please sign in to comment.