4 ms·
Thanks for the comment! I've got a plan of integrating with Github, just trying to decide how it should work as I wouldn't want my commits from work showing up
by efexen 11y ago
Thanks for the comment! I've got a plan of integrating with Github, just trying to decide how it should work as I wouldn't want my commits from work showing up which are on the same github account.
Do you think it'd work well if I implemented something to allow picking a commit for a daily entry or would you prefer more automatic tracking?
- NicoJuicy 11y agoI think automatic tracking of public repositories for now would do ok ( if you can check on that). I wouldn't do "picking commits", because people mostly won't do that. Nice project!
- efexen 11y agoThanks for the feedback, glad you said tracking public repositories as that's something I thought might work well as mostly peoples work is in private repos
- NicoJuicy 11y agoIf you would go for private repos, i think it would be harder. Public git repositories on github are an alternative for your resume ( that's good for your project). But private repositories could also mean gitlab integration and etc.. :)
- dschoppe 11y agoPerhaps automatic tracking could have the option to exclude certain repos?
- efexen 11y agoSounds like a good idea, need to figure out how the management of that would work though without being a PITA ;) Thanks for the idea, much appreciated!
- iamtew 11y agoOr how about the user explicitly adds the repositories they want to have shown, or provides a pattern they want tracked? For example: "Track all my GitHub repositories matching /^codehalf-*/
- jon-wood 11y agoOr organisations.
- nosefrog 11y agoWhen I looked into this, I used the GitHub Events API to get all of the events the user took[0], and then filtered by Push Events. Push Events consist of commits to a repo, and I used the GetCommit Repository API [1] to get more metadata for the commit. If you save the ETag from the Events API and pass it back in your next request, you'll get a 304 response if the data hasn't changed and it won't hit your request limit. You'll want to poll the user's events periodically, and store that data in a database. It's too slow to ping GitHub's API every time, because there isn't a single API that provides exactly what you need. Check out FetchRecentCommits[2] for how I hit the GitHub API, and UpdateUserCommits[3] and CreateCommit[4] for how I extract the data from the commit and store it in the database. Good luck! Keep me updated, my username is in my profile :) [0] https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user https://developer.github.com/v3/activity/events/#list-public... [1] https://developer.github.com/v3/repos/commits/#get-a-single-commit https://developer.github.com/v3/repos/commits/#get-a-single-... [2] https://github.com/samertm/githubstreaks/blob/master/model.go#L608 https://github.com/samertm/githubstreaks/blob/master/model.g... [3] https://github.com/samertm/githubstreaks/blob/master/model.go#L655 https://github.com/samertm/githubstreaks/blob/master/model.g... [4] https://github.com/samertm/githubstreaks/blob/master/model.go#L684 https://github.com/samertm/githubstreaks/blob/master/model.g...
- kybernetyk 11y agoMaybe come up with a git hook that posts an update to your API on every commit/push? This way it would be independent from GitHub (we're not using GH at work for example).
- toyg 11y agoI honestly don't know what work is involved, but if you integrate with Github, please do the same for BitBucket. BB gets less visibility because most people use it to keep their repositories private, but it's used by a huge amount of people for real work and personal projects.
- efexen 11y agoI was just collating some of the feedback from this and right next to Github integration I wrote BB integration :) I use BB a lot as well personally to keep repos private. Thanks for the feedback