-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support authentification for private annotations repositories #963
Conversation
8e83761
to
a02a98a
Compare
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
So we can pass headers later. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
We need at least one index to work. If a source is down, we show an error but we can still fetch annotations. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
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.
We aren't testing the auth
option but I assume you manually tested it.
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.
Not blocking this PR, but on the same mindset as Kaan, I think we should add unit tests including authentication.
About the tests, I'm not sure what would be the best way to test with a private repo: we would need to create one just for tests, store the token somewhere in the Github action, find a way to pass it to contributors so they can test locally etc. @KaanOzkan, @vinistock any idea? |
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
…README Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
0fa9c05
to
4b0aa3b
Compare
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
4b0aa3b
to
bf02ee3
Compare
This will make it easier to test the command itself. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
bf02ee3
to
ad2edea
Compare
As discussed offline, I added a test using |
Motivation
Allow users to import RBI annotations from private repositories. This is useful when using private gems for example.
Closes #962.
Implementation
Since we access the private repository files through http, the easiest way to go is to pass the
Authentification
header as well. This header can be provided by the user through the--auth
option:See the readme for more information.
Next step
Once we are able to provide the authentication (this PR), the next logical step will be to read this authentication from the netrc file.
Tests
See automated tests.