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 |
---|---|
How to set up and validate locally
- Add a public deploy key as admin
- in a project as a maintainer or even owner, add the public deploy key, and also give it write access (Settings -> Repository -> Deploy keys)
- under protected branch, in the dropdown for pull and merge, the deploy key is now visible, try to use it.
- A general error will be shown (failed to update branch)
Edited by Vasilii Iakliushin