Closed jonpugh closed 10 years ago
For each drupal.org user (who requests access), we should generate a unique key pair.
Then, once the user adds the key to their account on drupal.org, we can use that key to connect and commit to a project.
# GitHub provides feedback when you test your connection
$ ssh -T git@github.com -i /home/jon/.ssh/gundalo/id_rsa
Hi jonpugh! You've successfully authenticated, but GitHub does not provide shell access.
$ # Drupal.org asks for your password if it cannot connect with the Public Key.
$ ssh -T gundalo@git.drupal.org -i /home/jon/.ssh/gundalo/id_rsa
gundalo@git.drupal.org's password:
$ # Drupal.org passes back a strange message if you try to -Test the connection.
$ ssh -T gundalo@git.drupal.org -i /home/jon/.ssh/gundalo/id_rsa
shell request failed on channel 0
This is not the way to go.
Instead, let's instruct users to add the drupal.org user "hubdrop" as a VCS committer and Maintainer manager, so hubdrop can login and look for the maintainers list. From that, we lookup each maintainers github username, and assign them to a team that is granted push and pull access to the repo.
I've utilized Mink to check maintainers for a project. Mink will login to drupal.org and visit the project maintainers page. Next I have to scrape the page to find the drupal usernames and their permissions, then check the users' for their GitHub usernames, then save that info to a file on the server, then add those users to the "committers to the project" GitHub team.
Once that works, the module maintainers will have push access to the repo. I believe that allows them to approve and merge pull requests.
Forgot to push but I will in the morning.
hubdrop update_maintainers projectname
now creates a team for admins and committers and adds any Drupal users it can find github accounts for.
hubdrop source projectname github
will automatically add maintainers and hubdrop source projectname drupal
will automatically remove them.
Testing this out again, it's been a while.
So I've got this working but haven't deployed it yet. Also the strategy is much simpler now.
All the user has to do is add the hubdrop user to their drupal.org project, add their own github username to their drupal.org profile, and then hit a button.
Closing!
I have a workflow sketched out on paper for this. We will collect github username and git.drupal.org username, then do a test branch creation on the drupal.org repo to see if the user has access. If so, add them to a "Push & Pull " team on that github repo.