Questions tagged [octokit.net]

Octokit is a client library targeting .NET 4.5 and above that provides an easy way to interact with the GitHub API.

Octokit is a client library targeting .NET 4.5 and above that provides an easy way to interact with the GitHub API.

https://github.com/octokit/octokit.net

75 questions
2
votes
1 answer

GithubClient Issue Create throws NotFoundException

I'm new to Octokit.Net. and I want to create issue in my program... So I coded like this. var github = new GitHubClient(new ProductHeaderValue("Hello")); var i = new NewIssue("asdf"); i.Body = "asdf"; var issue = github.Issue.Create("JoyLeeSoft",…
Joy Hyuk Lee
  • 756
  • 11
  • 22
2
votes
1 answer

Specify language in Octokit.net for Gist

I am attempting to create a new NewGist using Octokit.net however I can't seem to find a way to specify a language (Text, C#, C++, Java, etc) so whenever it is created it simply creates it as Text. Am I missing something or is there no…
Grinch
  • 23
  • 6
1
vote
1 answer

Error while using Octokit.NET to authenticate users from Web App

I'm using Octokit to authenticate a user from my app. I'm successfully getting the Code and State parameters back from Github. But when I try to create an access token, it throws an exception. What am i doing wrong? Here is the code in my Authorize…
RJP
  • 385
  • 5
  • 19
1
vote
0 answers

C# Octokit creating a github release not working, throwing error 'Not Found'

I have a public repository on github, where i would like to create a release with c#. I watched a lot of documentation, and issues but a couldn't find what am i doing wrong. Here is my C# code: public static async Task CreateReleaseAsync(string…
Stanley
  • 37
  • 4
1
vote
1 answer

C# GitHub API - How Can I Add/Remove Pull Request Assignees?

I'm trying to Add/Remove assigned users to a pull request in a .NET 5 console app. I'm using the library octokit.net and I'm able to get a PR and see the actual users assigned but it is a read-only collection and I can't find a way to update it. the…
1
vote
1 answer

Why i am getting a not found error when i try to create a new file with octokitnet?

i am trying to do an application that upload a json file to my github this file is going to be used to know what have done the user in the application. But i am stuck with the creation of the file, i have this function public async void…
1
vote
1 answer

Change default github branch with Octokit.net

I have a small project for updating various settings in GitHub repos. Although I find the repo, the Edit method throws NotFoundException. Any suggestions what could be wrong? I'm changing from "master" to "develop", both exists. public async…
Bakudan
  • 19,134
  • 9
  • 53
  • 73
1
vote
0 answers

How to create a GitHub tag using the octokit.net API

I am creating Release using the github's octokit API. Create release method creates release and also create corresponding tag. I also want to create additional tag. So using the example here i am trying to create a tag. I am assuming when…
LP13
  • 30,567
  • 53
  • 217
  • 400
1
vote
2 answers

creating a github issue in octokit.net

I am trying to write a script that will open an issue typed in the console. For some reason the issue variable comes back empty in the debugger. class Program { public async static Task Main() { var client = new GitHubClient(new…
medic17
  • 415
  • 5
  • 16
1
vote
0 answers

Retrieve all repositories that contain a file in a path within a repository

I'm currently using Octokit.Net in attempt to search and find repositories that meet a specific criteria: Repositories that include Android somewhere. Includes any .xml files within a path matching res/layout Has a minimum of 100 stars etc The…
Jon Douglas
  • 13,006
  • 4
  • 38
  • 51
1
vote
0 answers

Retrieving contents from a branch using octokit

I have recently started to use the octokit library to retrieve data from a github repository. I can form a search request like var request = new SearchCodeRequest("ValueSets", "xyzconnect", "projectA") { // we can restrict…
BENBUN Coder
  • 4,801
  • 7
  • 52
  • 89
1
vote
0 answers

How do I load PRs from multiple repos from a SearchIssuesResult? The items have no repository IDs

I'm trying to find all PRs across all repos that have a given branch name. I'm using GitHub Enterprise. SearchIssuesResult contains a List Items property. The individual Issues in that list have a Repository property, but it is null, and its…
Alastair Maw
  • 5,373
  • 1
  • 38
  • 50
1
vote
1 answer

How to show all languages in a request?

octokit.net To filter the query by language I do this var request = new SearchRepositoriesRequest("mvc client side framework") { // how about we restrict the language the library is written in? Language = Language.JavaScript } How to make…
1
vote
1 answer

Downloading a single file, from a large github enterprise repo, efficiently, with Octokit (c#, .net)

I am trying to download a single file from github enterprise, given the URL, in C#, with OctoKit. This is the head version from master (or the default branch). I want to do the equivalent of: curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H…
Mark Hattarki
  • 123
  • 2
  • 8
1
vote
1 answer

How to get the content of all files in a given directory?

Octokit allows me to easily retrieve the list of files in a given folder like so: var directoryContent = await _githubClient.Repository.Content.GetAllContents("MyUsername", "MyProject", "TheFolderName").ConfigureAwait(false); Unfortunately, the…
desautelsj
  • 3,587
  • 4
  • 37
  • 55