Fix KeyError on pull request hook