Add link for violated commits
What does this MR do and why?
This MR adds a link to the unsigned commits listed in the detailed policy bot comment.
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.
Before | After |
---|---|
How to set up and validate locally
- In rails console enable the feature flag
Feature.enable(:save_policy_violation_data)
- Create a new project
- Go to Secure -> Policies and create a new policy:
type: approval_policy name: Any MR description: '' enabled: true rules: - type: any_merge_request branch_type: protected commits: unsigned actions: - type: require_approval approvals_required: 1 role_approvers: - developer approval_settings: block_branch_modification: false prevent_pushing_and_force_pushing: false prevent_approval_by_author: true prevent_approval_by_commit_author: true remove_approvals_with_new_commit: true require_password_to_approve: true
- In the project, create an MR that updates README using Web IDE
- Verify that approvals for
Any MR
are required and the commit listed in the comment is a functioning link
Related to #433403 (closed)