Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Highfive crashes where a PR has no description #184

Closed
pietroalbini opened this issue Dec 19, 2018 · 2 comments
Closed

Highfive crashes where a PR has no description #184

pietroalbini opened this issue Dec 19, 2018 · 2 comments
Assignees
Labels

Comments

@pietroalbini
Copy link
Member

When a PR is opened but has no description (like rust-lang/rust#56989), highfive crashes before assigning a reviewer or commenting.

Traceback (most recent call last):
  File "/home/ec2-user/highfive/highfive/newpr.py", line 433, in <module>
    handler.run()
  File "/home/ec2-user/highfive/highfive/newpr.py", line 71, in run
    self.new_pr()
  File "/home/ec2-user/highfive/highfive/newpr.py", line 359, in new_pr
    reviewer = self.find_reviewer(msg)
  File "/home/ec2-user/highfive/highfive/newpr.py", line 238, in find_reviewer
    match = reviewer_re.search(msg)
TypeError: expected string or buffer

This is caused by GitHub setting the body to null instead of an empty string where there is no PR description:

{
  "action": "opened",
  "number": 56989,
  "pull_request": {
    "number": 56989,
    "state": "open",
    "locked": false,
    "title": "Fix compiletest `trim` deprecation warnings",
    "user": {
      "login": "phansch",
      "id": 2042399,
      ...
    },
    "body": null,
    ...
  }
}
@dwijnand
Copy link
Member

JFYI we often get highfive just ignoring PRs in the cargo repo. But that might be for a different reason.

@pietroalbini
Copy link
Member Author

Yeah, there are probably other bugs. Ping me on #infra as soon as it happens, so I can fetch the logs and investigate the crash!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants