Skip to content

Commit

Permalink
Merge pull request #109 from asmeurer/dependabot-skip
Browse files Browse the repository at this point in the history
Skip sympy-bot on dependabot PRs
  • Loading branch information
asmeurer authored Oct 3, 2024
2 parents 3984386 + 8995941 commit b746f47
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sympy_bot/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,20 @@ async def pull_request_edited(event, gh, *args, **kwargs):
print(f"PR #{pr_number} is closed, skipping")
return

if event.data['pull_request']['user']['login'] == "dependabot[bot]":
await pull_request_noop(event, gh, status_message="This is a Dependabot PR. SymPy Bot not run.")
await pull_request_comment_release_notes(event, gh)
await pull_request_comment_added_deleted(event, gh)
await rate_limit_comment(event, gh)

async def pull_request_noop(event, gh, status_message=None):
statuses_url = event.data['pull_request']['statuses_url']
await gh.post(statuses_url, data=dict(
state='success',
description=status_message,
context='sympy-bot/release-notes',
))

async def pull_request_comment_release_notes(event, gh):
comments_url = event.data["pull_request"]["comments_url"]
number = event.data["pull_request"]["number"]
Expand Down

0 comments on commit b746f47

Please sign in to comment.