Skip to content
Snippets Groups Projects
Commit 5f4332fe authored by Sincheol (David) Kim's avatar Sincheol (David) Kim
Browse files

Merge branch 'feat/365041' into 'master'

Add the merge date to the Chain of Custody report

See merge request !91766
parents d47b8106 ea4a81c4
No related branches found
No related tags found
1 merge request!91766Add the merge date to the Chain of Custody report
Pipeline #583148979 failed
Pipeline: GitLab

#583161408

    ......@@ -96,7 +96,7 @@ Our criteria for the separation of duties is as follows:
    The Chain of Custody report allows customers to export a list of merge commits within the group.
    The data provides a comprehensive view with respect to merge commits. It includes the merge commit SHA,
    merge request author, merge request ID, merge user, pipeline ID, group name, project name, and merge request approvers.
    merge request author, merge request ID, merge user, date merged, pipeline ID, group name, project name, and merge request approvers.
    Depending on the merge strategy, the merge commit SHA can be a merge commit, squash commit, or a diff head commit.
    To download the Chain of Custody report:
    ......
    ......@@ -49,6 +49,7 @@ def header_to_value_hash
    'Author' => -> (merge_request) { merge_request.author&.name },
    'Merge Request' => 'id',
    'Merged By' => -> (merge_request) { merge_request.metrics&.merged_by&.name },
    'Date Merged' => -> (merge_request) { merge_request.merged_at },
    'Pipeline' => -> (merge_request) { merge_request.metrics&.pipeline_id },
    'Group' => -> (merge_request) { merge_request.project&.namespace&.name },
    'Project' => -> (merge_request) { merge_request.project&.name },
    ......
    ......@@ -21,7 +21,7 @@
    it { expect(service.csv_data).to be_success }
    it 'includes the appropriate headers' do
    expect(csv.headers).to eq(['Merge Commit', 'Author', 'Merge Request', 'Merged By', 'Pipeline', 'Group', 'Project', 'Approver(s)'])
    expect(csv.headers).to eq(['Merge Commit', 'Author', 'Merge Request', 'Merged By', 'Date Merged', 'Pipeline', 'Group', 'Project', 'Approver(s)'])
    end
    context 'data verification' do
    ......@@ -41,6 +41,10 @@
    expect(csv[0]['Merged By']).to eq 'Brock Lesnar'
    end
    specify 'Date Merged' do
    expect(csv[0]['Date Merged']).to eq merge_request.merged_at.to_s
    end
    specify 'Pipeline' do
    expect(csv[0]['Pipeline']).to eq merge_request.metrics.pipeline_id.to_s
    end
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment