Skip to content

Instantly share code, notes, and snippets.

@svick
Created June 17, 2017 12:54
Show Gist options
  • Select an option

  • Save svick/3ba2d50c159d9c400ccbf37e3fe86515 to your computer and use it in GitHub Desktop.

Select an option

Save svick/3ba2d50c159d9c400ccbf37e3fe86515 to your computer and use it in GitHub Desktop.
Get corefx-standup reactions
{
"frameworks": {
"net46":{
"dependencies": {
"Octokit": "0.24.0"
}
}
}
}
using System.Configuration;
using System.Text;
using System.Net;
using System.Net.Http;
using Octokit;
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req)
{
var client = new GitHubClient(new ProductHeaderValue("svick-corefx-standup"));
client.Credentials = new Credentials(ConfigurationManager.AppSettings["GitHubToken"]);
var reactions = await client.Reaction.Issue.GetAll("dotnet", "corefx-standup-temp", 5);
var response = new StringBuilder();
foreach (var x in reactions.Select((r, i) => new { i, r }))
{
response.AppendLine($"[{x.i}] {x.r.User.Login}:{x.r.Content}");
}
return req.CreateResponse(HttpStatusCode.OK, response.ToString(), "text/plain");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment