Skip to content

Expose Deployment Approvals to internal Environments API

What does this MR do and why?

To support the frontend work in #342180 (closed), we need to expose deployment.approvals and approval.created_at to the internal Environments API. created_at is now also exposed to the public Deployments API because the Approval entity is reused.

How to set up and validate locally

Internal API change

No user-facing change here.

  1. Go to Projects > Deployments > Environments
  2. Look for environments.json in network requests inspector
  3. Verify that deployments associated to the environments have an approvals attribute

Public API change

  1. Set up Deployment Approvals with >1 approval required.
  2. Create an approval
  3. Use the Deployments API to get a specific deployment.
  4. Verify that the approval has a created_at attribute

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 Alishan Ladhani

Merge request reports