Allow automatic SSH key association when adding/editing GitHub repositories
Review Request #3423 — Created Oct. 16, 2012 and submitted
Defines an interface to allow a Review Board instance's SSH key to be added to a hosting service's list of deploy keys for a given repository. So far, only the GitHub HostingService implements the necessary methods to upload the SSH key, and raises an exception when the upload fails. The code is not currently being used by any module/app other than tests.
Unit test for GitHub auto key association passes. Tested that key is delivered and added to the deploy keys of a GitHub project.
Description | From | Last Updated |
---|---|---|
Add a trailing comma. |
chipx86 | |
Remove this blank line. |
chipx86 | |
We should log what we get in this case. Both the HTTP exception data and the exception when loading/reading. |
chipx86 | |
If we're going to log something, we need to have some more context, so it's clear when reading the log … |
chipx86 | |
Must pass the local_site tied to the repository. |
chipx86 | |
We don't use the "if else " form. |
chipx86 | |
Make sure the setUp and tearDown functions in this class back up and restore these functions. |
chipx86 | |
Add a trailing comma. |
chipx86 | |
Two blank lines. |
chipx86 | |
Align SSHKeyAssociationError with AuthorizationError. |
chipx86 | |
You need to return something if there is no key. Actually, is this even called without a key? If not, … |
chipx86 | |
We should just always raise this. Nothing should ever call this without checking, so it's a bug either way. |
chipx86 |
- Change Summary:
-
Added the associate_ssh_key to the base HostingService class, along with class configuration flag. For child hosting services that support ssh key association, the flag (supports_ssh_key_association) should be set, and the associate_ssh_key method should be implemented.
- Branch:
-
master
-
This is looking pretty good. Are you about ready to take it out of "WIP" status? (We won't commit if it says "WIP", as we'll assume you don't want us to yet.)
-
-
-
You need to return something if there is no key. Actually, is this even called without a key? If not, don't bother to check.
-
We should just always raise this. Nothing should ever call this without checking, so it's a bug either way.
- Change Summary:
-
Move review request out of WIP status.
- Summary:
-
WIP: Allow automatic SSH key association when adding/editing repositoriesAllow automatic SSH key association when adding/editing GitHub repositories
- Description:
-
~ Work-in-progress review for SSH key association.
~ ~ The goal of this feature is to allow administrators to (optionally) associate the RB server's SSH key with a repository being hosted . The reason for the feature is to simplify repository set up, removing the additional legwork the admin would need to do to get RB talking with a hosted repository.
~ ~ Note: The new SSHClient (being developed separately) impacts this code, but not enough to change its basic layout.
~ Defines an interface to allow a Review Board instance's SSH key to be added to
~ a hosting service's list of deploy keys for a given repository. So far, only ~ the GitHub HostingService implements the necessary methods to upload the SSH ~ key, and raises an exception when the upload fails. The code is not currently ~ being used by any module/app other than tests. - Testing Done:
-
~ Unit test for GitHub auto key association passes. Tested that key is delivered and added to the deploy keys of a GitHub project.
~ Unit test for GitHub auto key association passes. Tested that key is delivered
+ and added to the deploy keys of a GitHub project.