Skip to content

Add missing handler for protected branches Deploy key

What does this MR do and why?

Contributes to #452117 (closed)

Problem

We don't provide an ID of the modified deploy key. Because of that backend tries to create a deploy key, but fails due to uniqueness check.

Solution

Return id for deploy key elements

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-04-17_at_16.01.09 Screenshot_2024-04-17_at_16.00.13

How to set up and validate locally

  1. Add a public deploy key as admin
  2. in a project as a maintainer or even owner, add the public deploy key, and also give it write access (Settings -> Repository -> Deploy keys)
  3. under protected branch, in the dropdown for pull and merge, the deploy key is now visible, try to use it.
  4. A general error will be shown (failed to update branch)
Edited by Vasilii Iakliushin

Merge request reports