Skip to content

Pass parameters to promote/rollback as querystring#21

Open
lennym wants to merge 1 commit into
drone:masterfrom
lennym:bugfix/promote-api
Open

Pass parameters to promote/rollback as querystring#21
lennym wants to merge 1 commit into
drone:masterfrom
lennym:bugfix/promote-api

Conversation

@lennym

@lennym lennym commented Aug 25, 2020

Copy link
Copy Markdown

Custom build params are ignored when sent on the POST body and need to be attached to the querystring. Modify the promote and rollback functions to ensure that the params are sent in a way that is recognised by the Drone server.

Custom build params are ignored when sent on the POST body and need to be attached to the querystring. Modify the promote and rollback functions to ensure that the params are sent in a way that is recognised by the Drone server.
@lennym

lennym commented Aug 25, 2020

Copy link
Copy Markdown
Author

Note: I haven't been able to update any of the unit tests since it appears the existing test suite runs against an actual live Drone instance, so it is not reasonable to test build promotions with parameters in this way.

Comment thread lib/index.js
params
)
)
`/api/repos/${owner}/${repo}/builds/${number}/rollback/${qs}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The last slash should be a questionmark, right?

@mtandre

mtandre commented Jan 19, 2024

Copy link
Copy Markdown

I've recently run into this bug of params not being passed to the promote command via this lib.

Hey @lennym would you be up for making the small adjustment mentioned above in this PR? If not, no worries, I'd be happy to open another PR with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants