dmitri.shuralyov.com/service/change/...

githubapi: add support for new 🚀 and 👀 reactions on GitHub

Reference: https://twitter.com/github/status/1086365048031854592.
dmitshur committed 5 years ago commit 42f2f11cf6af70a8447796e72fcc33f90d2829a4
Collapse all
githubapi/githubapi.go
@@ -954,10 +954,14 @@ func internalizeReaction(reaction githubv4.ReactionContent) reactions.EmojiID {
		return "tada"
	case githubv4.ReactionContentConfused:
		return "confused"
	case githubv4.ReactionContentHeart:
		return "heart"
	case githubv4.ReactionContentRocket:
		return "rocket"
	case githubv4.ReactionContentEyes:
		return "eyes"
	default:
		panic("unreachable")
	}
}

@@ -974,10 +978,14 @@ func externalizeReaction(reaction reactions.EmojiID) (githubv4.ReactionContent,
		return githubv4.ReactionContentHooray, nil
	case "confused":
		return githubv4.ReactionContentConfused, nil
	case "heart":
		return githubv4.ReactionContentHeart, nil
	case "rocket":
		return githubv4.ReactionContentRocket, nil
	case "eyes":
		return githubv4.ReactionContentEyes, nil
	default:
		return "", fmt.Errorf("%q is an unsupported reaction", reaction)
	}
}