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
1
vote
0 answers

How can i make a "github client" with Octokit.Net in C#?

I use the tool Octokit.net to make an own GitHub client and my question is how can I delete the files in the repository when they aren't in the local folder anymore? This is the code I already have: using System; using…
1
vote
1 answer

How do I make the repository search run within the topic?

The code to search for "github.com" repositories: public async void searchReposit_GitHub() { var client = new GitHubClient(new ProductHeaderValue("my-cool-app")); var basicAuth = new Credentials("username", "password"); …
koverflow
  • 297
  • 1
  • 3
  • 10
1
vote
1 answer

Getting Issues and Pull Requests for a specific user

I'm pulling all issues and pull requests for several organization owned repositories via API based on the name of the repository the user passes in. I want to be able to display all of the issues/pull requests assigned to the user as well as the…
sgonzalez
  • 741
  • 6
  • 20
1
vote
1 answer

How to modify an existing file on Github using octokit.net?

This is the code I am using currently. It deletes the contents of the file and replaces it with the new content. var readfile = client.Repository.Content.GetAllContentsByRef(owner, repo, targetFile, branch).Result; var updatefile…
1
vote
0 answers

How to get GitHub repository Directories via Octokit .Net API?

Can anyone tell me how to get GitHub repository's directories? Looking at the client.Repository API doesn't seem to have dir or it named differently?
Jason
  • 1,680
  • 3
  • 13
  • 16
1
vote
1 answer

octokit.net : Create a new commit

I have created a repository and with octokit.net and I want to create a new commit with the 'full commit' method. I have successfully created a 'one file / one line' commit following this tutorial. But the 'full commit' section is not working. I'm…
pushStack
  • 3,315
  • 1
  • 15
  • 14
1
vote
1 answer

Using the octokit.net library to update a submodule commit sha in github

I am currently trying to update a submodule's commit id automatically when another project has certain files changed. I have a .net webhook and I'm using the octokit.net library. I can see in the github documentation…
Dylan Hall
  • 11
  • 4
1
vote
2 answers

C# Download complete directory structure with subdirectories and files from GitHub (Octokit.Net)

I'm trying to figure out (in C#) how to download a directory with content (files and folders) in my GitHub repository through the API. Some of the articles mention Octokit.Net so i downloaded this and wrote the following lines: var github = new…
NorthRebel
  • 11
  • 2
1
vote
1 answer

Strange try/catch block behavior

I am working with Github API via Octokit.net. Now I am writing code that responsible for TwoFactorAuth. When I send request for token, if it is 2FA account, than I must get "TwoFactorRequiredException". I am trying to catch it, but insteand of it I…
Yura Babiy
  • 515
  • 7
  • 22
1
vote
4 answers

Tring to get GitHub repo via Octokit

I'm building simple tool for downloading .lua files from online public GitHub repos via link given by user. I started learning async methods so I wanted to test myself. It's a console application (for now). The ultimate goal is to get .lua files in…
Like a Fox
  • 49
  • 1
  • 6
1
vote
1 answer

Github api get issues filtered by labels using octokit.net

At the moment my call to the GitHub API returns all issues for my repo. var repoIssueRequest = new RepositoryIssueRequest { State = itemState,// Is ItemState.Open or ItemState.Closed Labels = new[] { label1, label2}// Trying to specify the…
Alan Ball
  • 593
  • 8
  • 17
1
vote
2 answers

Reading code from Repository

I am new to Octokit.NET. Trying to use it to login to my repo and then get a particular repository in a WinRT 8.1 Universal app. Ultimately I want to read some .cs files in that repo as text. I am using following code to authenticate and get all…
user846545
  • 151
  • 5
0
votes
1 answer

Proper C# Octokit method for authenticating to a private repository

I am writing a script to install a program. This program's source code is stored on a private GitHub repository. The binaries from the releases are also private. I also have an personal access token (Fine Grained Token) that according to the GitHub…
Enderbyte09
  • 409
  • 1
  • 5
  • 11
0
votes
0 answers

Github Enterprise, Can I change the Template Name of my Repository using Octokit?

I am using Octokit.Net library for GitHub. I have a repo which was generated from a template repo (Template 1). I have created another template (Template 2) which has my latest changes. I have updated my GitHub repo and made the changes manually and…
Ali
  • 1,015
  • 14
  • 40
0
votes
0 answers

C# Octokit Update File if it Exists, Otherwise Create

I'm wondering whether there is a clean way to create a new file using Octokit in case the file specified doesn't exist, or otherwise create it? I'm currently attempting to do this via a try-catch block. However, there needs to be a more…
emilaz
  • 1,722
  • 1
  • 15
  • 31