Registrator.jl icon indicating copy to clipboard operation
Registrator.jl copied to clipboard

Allow config of registry repo URLs with ENV

Open TransGirlCodes opened this issue 4 years ago • 2 comments

This PR adds the ability to get the port from ENV for the WebUI. It also addresses #74, by allowing URLs for registries to be specified through ENV.

This is useful for services like Heroku where the URL used for the repository contains the access token: https://USER:[email protected]/User/Repo.

I'm not sure, but currently, I don't think the token field in config.commentbot.toml is actually used. Because providing an access token for this field, and then using a normal https URL for the registries results in authentication errors for me, whereas using repo urls of the form https://USER:[email protected]/User/Repo works fine.

EDIT: I stand corrected, the token field is used, in parts of the comment bot where GitHub.jl is used, it's just seemingly not used when it comes to cloning the registry repo and doing the stuff Regedit/Registration service does.

TransGirlCodes avatar Jul 23 '19 23:07 TransGirlCodes

Codecov Report

Merging #208 into master will decrease coverage by 6.69%. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #208     +/-   ##
========================================
- Coverage   13.21%   6.51%   -6.7%     
========================================
  Files          27      27             
  Lines        1256    1258      +2     
========================================
- Hits          166      82     -84     
- Misses       1090    1176     +86
Impacted Files Coverage Δ
src/webui/WebUI.jl 1.47% <0%> (-35.15%) :arrow_down:
src/commentbot/CommentBot.jl 0.86% <0%> (-0.04%) :arrow_down:
src/webui/routes/select.jl 0% <0%> (-100%) :arrow_down:
src/webui/providers.jl 0% <0%> (-100%) :arrow_down:
src/webui/routes/index.jl 0% <0%> (-100%) :arrow_down:
src/webui/webutils.jl 7.14% <0%> (-71.43%) :arrow_down:
src/webui/routes/register.jl 0% <0%> (-47.23%) :arrow_down:
src/webui/gitutils.jl 0.75% <0%> (-10.79%) :arrow_down:
src/management.jl 0% <0%> (-10%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5d9f684...d774a99. Read the comment docs.

codecov-io avatar Jul 24 '19 00:07 codecov-io

There is an alternative to this, which is to do something like this in the Docker:

RUN git config --global url.”https://{token}:@github.com/".insteadOf “https://github.com/"

If you'd rather that I try that and see if that works before changing Registrator code, that's cool, I can try that this week and report back.

TransGirlCodes avatar Jul 24 '19 00:07 TransGirlCodes