Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repos('philschatz/octokat.js').commits.fetch() returns an empty string #107

Closed
RichardLitt opened this issue Jul 29, 2016 · 7 comments
Closed

Comments

@RichardLitt
Copy link
Contributor

I'm not sure why this is happening. When I run repos('philschatz/octokat.js').issues.fetch() I do not get the same issue. I would expect the output to be the same as this URL: https://api.github.com/repos/philschatz/octokat.js/commits.

I tried it on the REPL just to make sure it wasn't just my configuration, and I had the same issue there.

@philbooth
Copy link

@RichardLitt, I'm not certain but this sounds the same as what I reported in #106. Maybe worth trying the request in curl with and without the If-Modified-Since header?

If it is the same issue that you're having, I've published a temporary fix to npm under the module name pb-fix-octokat-ifmodifiedsince-header:

https://www.npmjs.com/package/pb-fix-octokat-ifmodifiedsince-header

Unfortunately, based on this comment, I don't think my fix will be acceptable for client-side callers so I haven't opened it as a PR. Literally all I did was remove that else branch which sets the header, I'm not sure what the real fix for it should be.

@RichardLitt
Copy link
Contributor Author

So, it works when I try this command: $ curl -i https://api.github.com/repos/ipfs/project-repos/commits. However:

$ curl -i --header "If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT" https://api.github.com/repos/ipfs/project-repos/commits

Returns nothing. Is that what you meant? So, looks like I should use your modified client, but we're not sure that that is going to work. Is there some other way - maybe just getting the URL directly client side - to get this information?

@philbooth
Copy link

Is that what you meant?

Yep, exactly.

So, looks like I should use your modified client, but we're not sure that that is going to work. Is there some other way - maybe just getting the URL directly client side - to get this information?

Ah, didn't realise you were working client-side, sorry. A direct XHR to the GitHub API should be fine, I guess you'll want to set your own If-Modified-Since header to avoid the problem mentioned in the linked comment.

@RichardLitt
Copy link
Contributor Author

@philbooth Great. I will try this. Thanks!

@philschatz
Copy link
Owner

Sorry it took so long to reply, but the If-Modified-Since header was removed as part of #104 and should now work in 0.4.18 Hope that helps!

Please reopen this issue if it does not work.

@philschatz
Copy link
Owner

philschatz commented Aug 19, 2016

@RichardLitt : Oh, ipfs! I saw your talk at the https://archive.org/details/decentralized-web-summit--cikx back in June, awesome work!

I noticed in the Sprint: Aug 8 → Aug 14 Issue the comment "I don't know if we're going with Kanban or Agile".

If you're looking to keep your tickets public and "near the code" (instead of in something like Trello) I made a rough-around-the-edges kanban board that uses GitHub Issues directly at https://github.com/philschatz/gh-board.

Examples

Here is an example of a real board which includes Issues and Pull Requests.

Also, here is a link to a board with your issues and Pull Requests in the pm and js-ipfs repositories.

Note: you don't have the specially-named-labels so everything will be in 1 list

You can add |* to the end of the URL to fetch all the repos for the organization but only do that if you have "Signed In" to gh-board and provided an access token.

About

It runs in the browser so no need for a server, but you can fork the repo and host it yourself using https://pages.github.com . You just have to push a commit to the gh-pages branch after forking to start up GitHub Pages.

Also, since there is no server you have to use GitHub access tokens (revokable) if you want to make more than 60 requests per second.

Finally, if you click the pencil icon next to an Issue/PullRequest it will spin up a Heroku dyno with Etherpad (after about a minute or 2) so you can collaboratively edit an Issue and then 1 person clicks "Save" to actually update the GitHub Issue (useful for capturing meeting notes).

Anywho, great work!

@RichardLitt
Copy link
Contributor Author

Hey! awesome that you know about IPFS! And thanks so much for this comment - I mentioned it where the right eyes can get at it (not mine, ATM).

Still need to try this solution out; will get to it when I have some more time. Thank you so much!

gh-board looks sweet. Might use it in some of my own projects, actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants