Added functionality to pass in github auth_token #50
Conversation
@dustindall, It will cover your contributions to all Microsoft-managed open source projects. |
@dustindall, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. I have a minor comment regarding your changes. Can you please review?
R/cluster.R
Outdated
@@ -84,7 +84,8 @@ generateClusterConfig <- function(fileName, ...){ | |||
), | |||
rPackages = list( | |||
cran = vector(), | |||
github = vector() | |||
github = vector(), | |||
authToken = NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the authToken only for gitHub? If so, I would rename to githubAuthToken or consider making this a complex object (probably not ideal for backwards compatibility).
@brnleehng - thoughts on this?
Also, we probably should update some docs to help people understand this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the token is only for github. Also, I changed authToken to githubAuthToken and pushed it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick, and sorry I should have mentioned this before. Can you please use the full name for the property for clarity:
'gitHubAuthenticationToken'
Approved.
Can we call it githubAuthenticationToken? In the config file under rPackages, github is all lower case and it would be a small nuance to have the H capitalized in one but not the other. |
Yes, that seems reasonable to me. Thanks for the attention to detail :). |
Made the change |
Added install_github auth_token as an environment variable. This allows one to install private github repositories on the Azure cluster (I needed this). I would have passed it into the install_github function but there is a bug that does not pass the auth_token to additional remotes which I needed (#87 under remotes).