Skip to content

Update Branch rules approval rules to use the data from GraphQL

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

In !147890 (merged) we updated the Branch rules details page to use the shared approval rules app.

The approval rules app uses a separate endpoint to retrieve the list of approval rules (<project>/approval_rules REST API). We can optimise the implementation of the approval rules app on the Branch rules details page by including the approval rules in the Branch rules GraphQL request, this way we don't have to make the separate REST API call to get the list of approval rules.

ApprovalProjectRule already exists for the GraphQL request, but it does not contain all the fields needed for the Approval rules app to work.

As part of this issue we need to:

  1. Identify the missing fields in ApprovalProjectRule (frontend).
  2. Add the missing fields to the ApprovalProjectRule type (backend).
  3. Update the GraphQL schema on the frontend to include the new fields (frontend).
  4. Update the approval rules app to accept data from the parent and skip the REST API call (frontend).
Edited by 🤖 GitLab Bot 🤖