Skip to content

Show which group user approved for

Anna Vovchenko requested to merge anna/show-for-which-group-user-approved into master

What does this MR do and why?

This MR updates deployment approval comments section to show a tooltip with the role name for which the user approved/rejected.

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.

Approved Rejected
Screenshot_2024-04-22_at_16.22.49 Screenshot_2024-04-22_at_16.22.19

How to set up and validate locally

  1. make sure you have EE version of gitlab enabled
  2. create a project and add the following .gitlab-ci.yaml file
stages:
    - deploy
image: alpine:latest

deploy-prod:
    stage: deploy
    script:
        - sleep 10
        - echo "deploying prod"
    environment:
        name: production
        url: postgres://example.com
    when: manual

deploy-staging:
    stage: deploy
    script:
        - echo "deploying staging"
    environment:
        name: staging
        url: https://example.com
    when: manual
  1. go to Settings -> CI/CD -> Protected environments and protect the production environment (assign at least one more user to approvers so you could test approval logic)
  2. Screenshot_2023-04-12_at_12.29.47
  3. Run the pipeline to trigger a creation of pending deployment
  4. Enable the feature flag deployment_details_page
  5. Locate your deployment on Deployments -> Environments -> Production, Screenshot_2023-04-12_at_17.29.59
  6. click on the status badge to open the Deployment details page or navigate to http://<gdk-url>/<namespace>/<project>/-/environments/<environment id>/deployments/<deployment iid>
  7. Select a group to approve/reject for.
  8. Add a comment before approving/rejecting.
  9. Verify the comment shows the Approved/Rejected badge.
  10. Hover the badge and verify the tooltip appears with the information which role the user approved for.

Merge request reports