Closed matipan closed 5 years ago
cc @boyney123
This repo can be used to test that this changes are not breaking the existing functionality with public repositories: https://github.com/matipan/test-derek
Possibly but I'm a fan of iteration. This is almost complete but I think we should use the SDK to grab the file.
@alexellis the code was already updated to use the SDK instead :+1: Good point @rgee0, @alexellis do you want to leave that change for the future or should I add it to this PR?
Signed-off-by: Matias Pan matias.pan26@gmail.com
This PR adds support for private repositories. To support this we had to change the way we were fetching the
.DEREK.yml
config file, if the repo is private we use GitHub's API, if it's not then we default to the CDN.Description
In order to support fetching files from repositories that are private a new function was added called GetPrivateRepoConfig. This function uses GitHub's API to download the file instead of download it from the CDN. I thought it would be best to introduce a new function instead of rewriting the current one and changing its signature. This is because I wanted to make sure I wasn't breaking any existing functionality.
Motivation and Context
How Has This Been Tested?
I built derek at
Event for pull requests:
![derek-private-repos-event-pr](https://user-images.githubusercontent.com/8126891/53169664-adf2b900-35bc-11e9-9785-d5a0420ae6d2.png)
matipan/derek:privateRepos
, deployed it on my personal cluster and tested it using a private repository:matipan/test-derek-private
. (Request for access if you'd like to test it yourself :smile: ) Derek in action:Event for issue comments:![derek-private-repos-event-issue](https://user-images.githubusercontent.com/8126891/53169673-b1864000-35bc-11e9-8bac-73ddf086a5c7.png)
Types of changes
Checklist:
git commit -s