Guest User

Untitled

a guest
Apr 27th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. diff --git a/master/buildbot/www/hooks/github.py b/master/buildbot/www/hooks/github.py
  2. index 569dc5094..ffa70a04a 100644
  3. --- a/master/buildbot/www/hooks/github.py
  4. +++ b/master/buildbot/www/hooks/github.py
  5. @@ -244,9 +244,10 @@ class GitHubEventHandler(PullRequestMixin):
  6. if not match:
  7. log.msg("Ignoring refname `{}': Not a branch".format(refname))
  8. return changes
  9. - category = None # None is the legacy category for when hook only supported push
  10. - if match.group(1) == "tags":
  11. - category = "tag"
  12. +
  13. + categories = {'heads': 'head', 'tags': 'tag'}
  14. + # None is the legacy category for when hook only supported push
  15. + category = categories.get(match.group(1))
  16.  
  17. branch = match.group(2)
Add Comment
Please, Sign In to add comment