Skip to content

Update api endpoint for approval rules

Nataliia Radina requested to merge 368380-update-approval-rules-enpoint into master

What does this MR do and why?

Proposal

Update the API endpoints in Approval Rules frontend app.

GET https://gitlab.com/api/v4/projects/278964/approval_settings -> GET https://gitlab.com/api/v4/projects/278964/approval_rules
POST /api/v4/projects/<project_id>/approval_settings/rules -> POST /api/v4/projects/<project_id>/approval_rules
PUT /api/v4/projects/<project_id>/approval_settings/rules/:id -> PUT /api/v4/projects/<project_id>/approval_rules/:id
DELETE /api/v4/projects/<project_id>/approval_settings/rules/:id -> DELETE /api/v4/projects/<project_id>/approval_rules/:id 

Slight differences in the response:

https://gitlab.com/api/v4/projects/278964/approval_settings https://gitlab.com/api/v4/projects/278964/approval_rules
Screenshot_2022-07-19_at_16.37.01 Screenshot_2022-07-19_at_16.39.09

Screenshots or screen recordings

License Compliance Screenshots

Screen_Shot_2022-08-01_at_1.38.04_PM

Screen_Shot_2022-08-01_at_1.38.10_PM

Screen_Shot_2022-08-01_at_1.38.17_PM These are strongly recommended to assist reviewers and reduce the time to merge your change.

MR Aprrovals Screenshots

Screenshot_2022-08-01_at_21.10.36

Screenshot_2022-08-01_at_21.10.47

How to set up and validate locally

1.Make sure you have ee features enbaled 1.Select any project 1.Go to Settings => General 1.Expand the MERGE REQUESTS APPROVALS section

  1. Check that displaying, creating, editing and deleting rules works same as usual

MR acceptance checklist

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

Related to #368380 (closed)

Edited by Nataliia Radina

Merge request reports

Loading