Skip to content

Commit

Permalink
Merge pull request #21 from github/permissions
Browse files Browse the repository at this point in the history
Handle pull request write failures
  • Loading branch information
zkoppert authored Jan 13, 2024
2 parents f43591f + a41ca6c commit b76c81b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions evergreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ def main(): # pragma: no cover

# Create a dependabot.yaml file, a branch, and a PR
if not skip:
pull = commit_changes(title, body, repo, dependabot_file)
print("\tCreated pull request " + pull.html_url)
try:
pull = commit_changes(title, body, repo, dependabot_file)
print("\tCreated pull request " + pull.html_url)
except github3.exceptions.NotFoundError:
print("\tFailed to create pull request. Check write permissions.")
continue

print("Done. " + str(count_eligible) + " repositories were eligible.")

Expand Down

0 comments on commit b76c81b

Please sign in to comment.