-
Notifications
You must be signed in to change notification settings - Fork 17
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
chore(): Bugfix and refactor #279
base: main
Are you sure you want to change the base?
Conversation
ddf9b2c
to
b2ffae1
Compare
@@ -124,5 +124,5 @@ export function getDownloadUrlByTag (version: string, forAPICall: boolean = fals | |||
version = version.toLowerCase() | |||
return (version === '' || version === 'master' || version === 'latest') | |||
? `${GITHUB_COM_SERVER_URL}/SAP/jenkins-library/releases/latest` | |||
: `${GITHUB_COM_SERVER_URL}/SAP/jenkins-library/releases/${forAPICall ? 'tags' : 'tag'}/${version}` | |||
: `${forAPICall ? `${GITHUB_COM_API_URL}/repos` : GITHUB_COM_SERVER_URL}/SAP/jenkins-library/releases/${forAPICall ? 'tags' : 'tag'}/${version}` |
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.
this will cause errors because all API requests must be authorized and but most of the pipelines don't have github.com token configured.
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.
This is just a helper function, if someone needs a download Url for API call they need to call this function with forAPICall: true
. We dont have such call for now. It's responsibility of the caller (in the future) to make sure token is provided.
Description
getDownloadUrlByTag
actions/cache
when we start to use single binary)