Add ability to transform query params in redirct service, run [Endpoint GitHubReleaseRedirect SensioLabs VSO] (#3125)
* feat(redirector): added transformQueryParams to redirector * refactor: renamed to transformPath in redirector * Rename targetUrl to targetPath Co-Authored-By: calebcartwright <calebcartwright@users.noreply.github.com> * feat(redirector): handle param conflicts
This commit is contained in:
@@ -9,7 +9,7 @@ module.exports = [
|
||||
base: 'vso/build',
|
||||
pattern: ':organization/:projectId/:definitionId/:branch*',
|
||||
},
|
||||
target: ({ organization, projectId, definitionId, branch }) => {
|
||||
transformPath: ({ organization, projectId, definitionId, branch }) => {
|
||||
let path = `/azure-devops/build/${organization}/${projectId}/${definitionId}`
|
||||
if (branch) {
|
||||
path += `/${branch}`
|
||||
@@ -24,7 +24,7 @@ module.exports = [
|
||||
base: 'vso/release',
|
||||
pattern: ':organization/:projectId/:definitionId/:environmentId',
|
||||
},
|
||||
target: ({ organization, projectId, definitionId, environmentId }) =>
|
||||
transformPath: ({ organization, projectId, definitionId, environmentId }) =>
|
||||
`/azure-devops/release/${organization}/${projectId}/${definitionId}/${environmentId}`,
|
||||
dateAdded: new Date('2019-02-08'),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user