mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
No PR number found
This commit is contained in:
parent
46a8019e1f
commit
f5ab6f8531
1 changed files with 5 additions and 0 deletions
|
|
@ -33,6 +33,8 @@ def get_pr_details(github: Github) -> PullRequest:
|
|||
'./pr_number'
|
||||
with open('./pr_number', 'r') as file:
|
||||
pr_number = file.read()
|
||||
if not pr_number:
|
||||
return
|
||||
|
||||
repo = github.get_repo(GITHUB_REPOSITORY)
|
||||
pull = repo.get_pull(pr_number)
|
||||
|
|
@ -214,6 +216,9 @@ def main():
|
|||
try:
|
||||
github = Github(GITHUB_TOKEN)
|
||||
pull = get_pr_details(github)
|
||||
if not pull:
|
||||
print(f"No PR number found")
|
||||
exit()
|
||||
diff = get_diff(pull.diff_url)
|
||||
except Exception as e:
|
||||
print(f"Error get details: {e.__class__.__name__}: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue