-
Notifications
You must be signed in to change notification settings - Fork 73
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
pullRequest.setCredentials("username","password") is not working as intended #102
Comments
@ponsuyambu have you tried calling pullRequest.refresh() after the setCredentials? |
@aaronwalker Yes, I called refresh as well. It didn't work. When I saw the source code, I noticed that refresh is not re-initiating the GitHub client instance. |
Any update on this? |
I have tried various approaches to override the credentialId, but to no avail. But it seems to stay Maybe it would make more sense to store any custom credentialId in an env var? The GitHubHelper.java class seems to just ignore any attempt to update the credential id, as it will always use the one from the scan credentails. Any input to a different approach? |
Version report
Jenkins and plugins versions report:
Reproduction steps
Calling
pullRequest.setCredentials("username","password")
does not have any effect. It still uses the credentials configured from the organisation.I have properly invoked the above method before using any of the
pullRequest
object's methods and variablesResults
Expected result:
Should change the git credentials to the newly provided credentials
Actual result:
Still uses the old credentials even after invoking the above method.
The text was updated successfully, but these errors were encountered: