mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
Fix bug with filtering pull requests
This commit is contained in:
parent
006313b45a
commit
731211fd81
5 changed files with 18 additions and 12 deletions
|
@ -117,10 +117,13 @@ def process_event(github_token, github_repository, repo, branch, base):
|
|||
(pull_request.number, branch, base))
|
||||
except GithubException as e:
|
||||
if e.status == 422:
|
||||
# Format the branch name
|
||||
head_branch = "%s:%s" % (github_repository.split("/")[0], branch)
|
||||
# Get the pull request
|
||||
pull_request = github_repo.get_pulls(
|
||||
state='open',
|
||||
base=base,
|
||||
head=branch)[0]
|
||||
head=head_branch)[0]
|
||||
print("Updated pull request #%d (%s => %s)" %
|
||||
(pull_request.number, branch, base))
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue