Skip to content

Do not prefill new form again with successfully created deploy token

What does this MR do and why?

Resolves the odd behavior described in #370500 (closed). Instead of reusing the values of a just created deploy token, it now shows an empty new form. Only in the case of an error, it keeps the old behavior where it reuses the same instance var for the form again.

Screenshots or screen recordings

Before After
deploy_token_before deploy_token_after

How to set up and validate locally

This form is available for both Projects and Groups:

In both places:

  1. Fill out the form and create a new deploy token.
  2. See the form getting reset.

Additionally, creating a deploy token for a group resulted in some JS not loading on the create response page (where you see the token one time only). This affected the expand/collapse section buttons and the deploy token expiry datepicker.

  1. Verify this is fixed now by creating a deploy token and then directly creating another one. The datepicker should always open now. And other sections should always be expandable.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Hutterer

Merge request reports

Loading