by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 25 18:45
    danielstreba edited #1821
  • Sep 25 18:45
    danielstreba edited #1821
  • Sep 25 12:29
    tomkerkhove commented #2254
  • Sep 25 12:21
    shiftkey closed #2255
  • Sep 25 12:21
    shiftkey commented #2255
  • Sep 25 12:16
    shiftkey commented #2254
  • Sep 25 08:18
    cecelias35 reopened #2255
  • Sep 25 08:18
    cecelias35 closed #2255
  • Sep 25 08:15
    cecelias35 opened #2255
  • Sep 25 05:43
    tomkerkhove opened #2254
  • Sep 22 20:04
    boblangley commented #2185
  • Sep 22 13:32
    mauroservienti commented #2185
  • Sep 22 11:27
    MindaugasLaganeckas commented #2253
  • Sep 22 11:21
    codecov[bot] commented #2253
  • Sep 22 11:17
    codecov[bot] commented #2253
  • Sep 22 11:16
    MindaugasLaganeckas synchronize #2253
  • Sep 22 10:01
    SzymonPobiega commented #2185
  • Sep 22 09:59
    codecov[bot] commented #2253
  • Sep 22 09:55
    MindaugasLaganeckas synchronize #2253
  • Sep 22 09:42
    MindaugasLaganeckas synchronize #2253
Ryan Gribble
@ryangribble
To do that you need an actual git cmdline or a library called libgit2 (libgitsharp in c# implementation)
Through the API you CAN get the content of individual files or download the repository in zip/tar format
This message was deleted
So perhaps that will suit your needs?
Otherwise have a look at libgit 👍
turtlewen
@turtlewen
image.png
i found some on internet which is for download zip file from github repo. just a minor problem is the releases i cant use in my project but i using octiokit.client
so any lib file i missing ??
image.png
this is all my library using in the project
turtlewen
@turtlewen
and also i getting the error of
Unsupported 'Accept' header: [#<Sinatra::Request::AcceptEntry:0x00007fb3d9749bb0 @entry="application/octet-stream", @type="application/octet-stream", @params={}, @q=1.0>]. Must accept 'application/json'.
turtlewen
@turtlewen
may i know how to get repo created date and pushed date??
using octokit
Ryan Gribble
@ryangribble
@turtlewen since octokit is just an API wrapper you can check these things yourself in the API docs
If the API has the info you want then it should be available through octokit
Eg you can see on that page, repository object has created_at and pushed_at fields
So in octokit these will be CreatedAt and PushedAt fields on the Repository response model
turtlewen
@turtlewen
but i found that the time provided by octokit have some problem, which is the time keep updating. but my repo actually created at 23/nov but everytime i run the created at time will update to now
Ryan Gribble
@ryangribble
Hmmm octokit just provides the data response from the github API
Can you please post sample code to reproduce the problem?
Raise an issue on the repo of you want
But it sounds likely it would be coming from the API and we would need to contact github about it
Happy to look into it in octokit first though, if you can provide a code sample
fsociety00.dat
@bamfbamf
Hello.
I'm trying to add some git related functionality to my Discord bot, but I have hard time translating ASP.NET example to something that doesn't use ASP. I create app, have clientid and secret, create instance of GithubClient with ProductHeaderValue and that's game over for me. I searched internet and it seems everybody are using password and username or ASP.NET with example like on this page https://github.com/octokit/octokit.net/blob/master/docs/oauth-flow.md , nobody is using access token outside of ASP.
Is there any example of generating access token that is not using ASP.NET?
Ryan Gribble
@ryangribble
Hey @bamfbamf, take a look at the Github app approach, that would be the best way for a bot style integration to authenticate with github whilst allowing users the ability to authorise it to happen
fsociety00.dat
@bamfbamf
will do, thanks
Matthias Koch
@matkoch
Hey, any way to browse file structure from repo URL ? I don't want to download anything, but instead get a git repo folder passed, and find all subitems.
Ryan Gribble
@ryangribble
Hey, so you can use the Trees API
There's also repository contents API but that includes the contents of each file and also has some other limitations on it
Both of these calls should be in octokit.net
client.Git.Tree.xxx and client.Repository.Content.xxx
Matthias Koch
@matkoch
Great, thanks!:)
Alexey Sviridov
@alexey-aurea
Hi guys, can anyone tell me if it is possible at all to get folder of file content via the https github link using the octokit ?
I could not find any suitable method to use.. is there any ?
HoiIkHouVanHP
@HoiIkHouVanHP
Hello!
Is there a way i can make a file using octokit [c# nuget package]?
Vishal Patel
@vishalvatsal
Hi Team, How do I create a branch after creating a repo using octokit.net
Brien King
@BrienKing
Hello. Have a few questions concerning committing files.
When I call Tree.Create(...) I get an exception of "Not Found"
So I'm not 100% sure what I should be passing to the Path of my NewTreeItem. From what I am seeing on-line it looks like it should be the filename of the file I am trying to commit.
@alexey-aurea You can get a list of everything like this:
            branch = await m_client.Repository.Branch.Get(GIT_OWNER, GIT_REPOSITORY, "master");
            contents = await m_client.Git.Tree.GetRecursive(GIT_OWNER, GIT_REPOSITORY, branch.Commit.Sha);
Brien King
@BrienKing
m_client is GitHubClient