Skip to content

Add "GitLab Team Member" badge to MR, Issue, and Epic notes/comments

Peter Hegman requested to merge 212259-add-gitlab-employee-badge-to-notes into master

What does this MR do?

See #212259 (closed)

Adds a "GitLab Team Member" badge to comments and notes on Issues, MRs, and Epics. This badge will be shown in other places as well (see #212259 (closed) and Related MRs)

Screenshots

Page Before After
Notes/comments Screen_Shot_2020-03-27_at_12.49.45_PM Screen_Shot_2020-04-01_at_11.34.01_AM
Notes/comments mobile Screen_Shot_2020-04-01_at_11.41.58_AM Screen_Shot_2020-04-01_at_11.38.10_AM

Local Testing

  1. Enable :gitlab_employee_badge feature flag.
    • bin/rails console
    • Feature.enable(:gitlab_employee_badge)
  2. In lib/gitlab.rb change self.com? to return true
  3. Create a user with a @gitlab.com email address
  4. Navigate to an Issue, MR, or Epic and leave a comment

Note: You may need to run gdk restart because of the caching on app/models/user.rb

Related MRs

Not dependent on this MR

Dependent on this MR

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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
Edited by Peter Hegman

Merge request reports