Files
octokit.net/samples/linqpad-samples/9-issues.linq
Naveen e3da87cdfb Removed the integration test options
Removed the integration test options because lprun has compileonly
option.
2015-10-05 19:40:23 -04:00

32 lines
1.0 KiB
C#

<Query Kind="Program">
<NuGetReference>Octokit</NuGetReference>
<NuGetReference>Octokit.Reactive</NuGetReference>
<NuGetReference>Rx-Main</NuGetReference>
<Namespace>Octokit</Namespace>
<Namespace>Octokit.Reactive</Namespace>
<Namespace>System</Namespace>
<Namespace>System.Reactive.Linq</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
async Task Main(string[] args)
{
var userName = string.Empty;
GitHubClient client = new GitHubClient(new Octokit.ProductHeaderValue("Octokit.Samples"));
userName = "naveensrinivasan";
client.Credentials = new Credentials(Util.GetPassword("github"));
IIssuesClient issuesclient = client.Issue;
var myissues = await issuesclient.GetAllForCurrent();
myissues.Select(m => new { m.Title, m.Body}).Dump();
//var issue = new NewIssue("Test");
//var newissue = await issuesclient.Create(owner,reponame,new NewIssue("Test"));
//
//newissue.Dump();
var allissues = await issuesclient.GetAllForRepository("octokit", "octokit.net");
allissues.Select(a => new { a.Title, a.Body}).Dump();
}