Skip to content

Commit

Permalink
dependaboit-fail: check app/dependabot login
Browse files Browse the repository at this point in the history
Apparently, the login for dependabot changed to app/dependabot. Let's
check this as well. There seems to also be a is_bot flag now in the
"author" field, but we want to look for dependabot specifically in this
script.

Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
  • Loading branch information
kkourt committed Mar 24, 2023
1 parent 228331f commit e7449cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/dependabot-fail
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ if __name__ == '__main__':
print("cmd '%s' failed" % (' '.join(cmd),))
sys.exit(1)
out = json.loads(cmd_res.stdout)
if out.get('author', {}).get('login', "") != "dependabot":
print("author of PR '%s' does not seem to be dependabot" % (pr,))
login = out.get('author', {}).get('login', "(unable to get login for PR)")
if login not in ["dependabot","app/dependabot"]:
print("author of PR '%s' (%s) does not seem to be dependabot" % (pr,login))
sys.exit(1)

pr_title = out["title"]
Expand Down

0 comments on commit e7449cf

Please sign in to comment.