Skip to content
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

Use valid git credentials when multiple are provided #1669

Merged
merged 3 commits into from Oct 29, 2020

Conversation

arcln
Copy link
Contributor

@arcln arcln commented Oct 28, 2020

See #1668 for details about the issue. Here I will discuss about the fix implementation.

If the given URL works out of the box or if a single token is available in the environment, the behaviour remains unchanged.
However if there is multiple tokens available, it will perform a git.verifyAuth call for each of them, and return the first of them that is working.
If none of them are working, it will return the URL as is.

This behaviour is tested in integration.test.js. It isn't tested in get-git-auth-url.test.js because I need gitbox functionalities to test it.

test/integration.test.js Outdated Show resolved Hide resolved
Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Just a small typo. I would have fixed it myself but don't have write access to your fork

@arcln
Copy link
Contributor Author

arcln commented Oct 29, 2020

Fixed the typo and conflicts, ready to merge!

Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍🏼

@gr2m gr2m merged commit 2bf3771 into semantic-release:master Oct 29, 2020
@semantic-release-bot
Copy link
Collaborator

🎉 This PR is included in version 17.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants