-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
Project Variables cannot be fetched #240
Comments
Perfect! Ill apply this fix to the master branch for the time being and ensure the problem doesnt exist in the new version :) Thank you for finding this! |
Just deployed, give it a look when you get a chance. Im sure i missed something :) |
🎉 This issue has been resolved in version 4.2.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
You have missed something ;) I commented on the commit: 28b28cf |
Can confirm it's fixed now. |
Description
When trying to use the
api.ProjectVariables.show(56, 'SSH_PRIVATE_KEY')
it does not work and producesprojects/56/null/SSH_PRIVATE_KEY/variables/undefined
as a URL.Steps to reproduce
You can see log the
endpoint
parameter from RequestHelper when you call ProjectVariables.showExpected behaviour
Should produce the endpoint URL
projects/56/variables/SSH_PRIVATE_KEY/
Actual behaviour
Produces
projects/56/null/SSH_PRIVATE_KEY/variables/undefined
Possible fixes
This is what I've done, not necessarily the fix. I am aware you are in the middle of a major version release so didn't want to step into that.
ProjectVariables
super('projects', 'variables', options);
ResourceVariables
Wrap
output += 'variables';
in anelse
Change kId to an optional:
const kId = keyId ? `/${encodeURIComponent(keyId)}` : '';
The text was updated successfully, but these errors were encountered: