Add source and destination branch data to Compliance Dashboard
requested to merge 216279-add-source-and-destination-branch-data-to-compliance-dashboard into master
What does this MR do?
Add the source and target branch data to the Compliance Dashboard. If the branch doesn't exist (deleted on merge for instance), the branch is shown as plain text. Otherwise, a link to the branch is included.
Additional notes
This is part two of adding branch details to the Compliance Dashboard.
- Add source and destination branches to compliance entity backend !37630 (merged)
- Display source and destination branches in compliance dashboard frontend <- this MR
Screenshots
Before | After |
---|---|
Local testing
The URL for the dashboard is https://[GDK_HOST]/groups/gitlab-org/-/security/compliance_dashboard
If you don't see any merge requests, you can run the following in your rails console
in your gitlab directory to add a merge request event:
# Include FactoryBot
FactoryBot.definition_file_paths = [Rails.root.join('ee', 'spec', 'factories')]
FactoryBot.find_definitions
group = Group.find(22) # The group id for gitlab-org, replace it for a different group
user = User.find(1) # The admin id on GDK, replace it for a different user
project = FactoryBot.create(:project, :repository, :public, group: group)
merge_request = FactoryBot.create(:merge_request, source_project: project, state: :merged)
FactoryBot.create(:event, :merged, project: project, target: merge_request, author: user, created_at: 10.minutes.ago)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related #216279 (closed)
Edited by Robert Hunt