Add MR Approvers to Project Export/Import

ZD Ticket that spawned this: https://gitlab.zendesk.com/agent/tickets/103135

Repro Steps:

  1. Create a repo.
  2. Turn on project approvers.
  3. Turn on self-approvers.
  4. Add a readme.
  5. Create a new branch "test-mr".
  6. Create an update to readme.
  7. Create MR named "Update Readme."
  8. Approve MR.
  9. Export Project.
  10. Review project.json and see there is no data to correlate approver.

Notes:

Literally, we store a note that shows who approved it, but the UI on an imported instance will still ask for approvers.

"notes": [
                {
                    "attachment": {
                        "url": null
                    },
                    "author": {
                        "name": "Lee Matos"
                    },
                    "author_id": 695248,
                    "change_position": null,
                    "commit_id": null,
                    "created_at": "2018-09-19T18:14:02.868Z",
                    "discussion_id": "1a025866d818688034204dcb97cd2c8fbaa02a41",
                    "events": [],
                    "id": 102805157,
                    "line_code": null,
                    "note": "approved this merge request",
                    "noteable_id": 16614825,
                    "noteable_type": "MergeRequest",
                    "original_position": null,
                    "position": null,
                    "project_id": 8461019,
                    "resolved_at": null,
                    "resolved_by_id": null,
                    "resolved_by_push": null,
                    "st_diff": null,
                    "system": true,
                    "updated_at": "2018-09-19T18:14:02.868Z",
                    "updated_by_id": null
                }
            ],

See my sample project here with project.json output:

  • https://gitlab.com/lbot/project-export-approvers-test
  • https://gitlab.com/lbot/project-export-approvers-test/blob/master/project.json
Edited Aug 26, 2021 by Haris Delalić
Assignee Loading
Time tracking Loading