Github API Repository permissions - github

I have a crazy complicated authentication process that I'm trying to wrap my brain around with this and I just need to be pointed in the right direction. I am building a website for Startup Weekend and we are trying to incorporate github repository management and don't know where to start. In it's simple form I need to give permissions for the website to access my github repo, then the website will allow another person (who is logged in with github) to be able to modify and push the code back up.
The simple way to do it is through adding that person outside of the site to the repository. However, it would be really cool if the site was able to manage it. Is this even possible to do? My closest assumption is pulling the code through the API, allowing a person access to the repo that is now downloaded, and then doing a merge through the API.
Would someone be able to point me in the right direction so we can win this thing! (If no one is able to answer I will keep digging and answer it for other people.) Thanks in advance!

The GitHub OAuth API page is a good start.
You can see it used in a project like thephpleague/oauth2-client in Provider/GithubTest.php.

Related

Is there a way to view a list of repos with their descriptions at a glance?

I'm looking for a view where I can see quickly which repos I have locally stored in a folder and what each is for. I know I can add details to the README, but the description would be a good place to put a short blurb to remind me of the purpose of each repo without having to drill down into each one. Something similar to what is available on the GitHub website makes sense to me. I'm using GitHub Desktop and haven't seen anything within it, but if another app has this functionality, that could also work.

Uploading source code for specific requirement in github

I have heard that, product based companies will look for what we have done outside of projects and also looking for the github profile.
In the meantime, I have created an automation application which addresses the specific requirement (Timesheet) in our organization. So, I thought of uploading this one too.
I have also done the screen cast and uploaded it to YouTube for adding in the profile (Resume).
This exact tool is not useful for all the people , but useful for the people in our organization, in which they can edit/contribute more.
Now I am having the question like, can I upload this kind of the code to GitHub?
Thanks.
Yes, you can.
Code on GitHub does not have to be useful to other people. You can push code there even if it is only useful to you or people in your organization.
You could also use a private repository if you do not want other people to see the code.
See: https://github.com/pricing

How can I make one GitHub Pages website be a subdirectory of another GitHub Pages website?

I have a page at x.github.io which links via www.x.org (through CNAME and DNS changes).
I have another entirely different standalone site which I want to be accessed when someone goes to x.github.io/newsite/ (or www.x.org/newsite). I have put the repository of the new site under the organization github.com/x/newsite/ as that is where I have github.com/x/x.github.io/ as I was told by GitHub staff but I'm not sure how to connect the two.
Any help?
You can only use any Apex domain (x.org) once across all GitHub repositories. Allowing otherwise could cause some serious conflicts and other issues.
To achieve what you're talking about, you'll need to include the new site in a /newsite directory of the x/x.github.io repository.
If you aren't too fussy about making it exactly x.org/newsite, you might be interested in making it newsite.x.org subdomain instead. Find out how-to here.

How to commit on Github and automatically mark done on Basecamp?

I have a GitHub account and Basecamp account. I have already setup my GitHub to use Basecamp service hook by selecting Service Hooks Menu and select basecamp. Fill all required form and get the setup work properly identified by green color.
Now, I have to-do list at my Basecamp account, but I don't know how to interact between GitHub commit comment and Basecamp to-do list.
For example, I commit my code by commenting fixing to-do list #123. But on Basecamp, I can't find to-do list ID (ex:#123) like common project management that I use before. I also can't find a documentation about it.
Can someone help me with this?
I don't think that's possible with the existing github-basecamp integration (the one in the predefined service hooks). So, in short: if I'm correct, it cannot be done the way you can close github issues, which you also seem to be referring.
So basically you'd need to do some coding of your own. You have two main choices.
You can enable a webhook in your github service hooks, have that do a POST request to an url of your choice, and have a script at that url use basecamp API to update the list. The todolists api seems quite simple: you should read a commit message coming in the POST request, and do a "update todolist" request with "completed": true.
Another alternative is to interact with Basecamp API from your local repo. There seems to be some existing tool called gitcamp, made by someone, to help with that - however as the api is quite simple, as well as your requirement, you could do your stuff with a custom script installed as a hook, and possibly with more ease.
I have send a same question to both github and basecamp support and bellow they answer.
Basecamp Support:
Sorry about that confusion with the GitHub integration! At the moment,
that integration only brings in the commits you make into the Progress
page and recaps. Here's the code behind that integration so you can
get a better idea of the guts of that service hook:
https://github.com/github/github-services/blob/master/services/basecamp.rb
If you have any other questions, just let me know and I'll be happy to
help. And have an awesome Sunday!
Chase Clemons 37signals CustomerCare
Github Support:
The Basecamp hook is for the new Basecamp system, and only adds to a
project's event log. There is a Basecamp Classic hook for the older
Basecamp system. It looks like that hook only creates Basecamp
messages. It doesn't look like anyone has written any Basecamp to-do
integration with GitHub at this time. Our 3rd party hooks are
contributed by other users because we don't actually use any of those
services (Basecamp included). You're welcome to contribute to them:
https://github.com/github/github-services
So it's clear at the moment (when I write this), what we commit and push into Github repository just automatically show on Basecamp Progress page.

Disable Source tab in Google Code

How to disable source tab in Google Code? I don't want any random users to look at my code.
Before you say that this can't be done, that Google Code is by default open source. Someone managed to do it, somehow.
Edit: Before you downvote me further, take a look at the link I provided. It's possible to do it, despite whatever you want to say. And I want to know how.
I don't want any random users to look at my code.
You can't prevent people from downloading the source code. Google's SVN repositories are open to anonymous browsing and checkout. For example, in the project you cited (the StackOverflow clone), notice that
svn checkout http://cnprog.googlecode.com/svn/trunk/ cnprog-read-only
works just fine for downloading the source.
If you don't want people looking at your source code, don't use a free public-hosting service. Setting up a local svn repository is very easy, in any case: here's how you'd go about setting one up and adding stuff to it.
In your GC page Administer|Tabs then check the hide checkbox next to Source. Your code will still be available via SVN though.
The whole point of Google Code is that it is for open source. That means everyone is allowed to see it. If you don't want people looking at your code, use some closed source hosting site.
You can replace tabs with Wiki pages (for example, to point to your GitHub repository), but you can't prevent access to the Google SVN server.