When mirroring repo don't use name of user configuring the mirror for activity

Problem to solve

When setting up a mirrored project, e.g. from GitHub.com, all the events are shown as by the user creating the mirror.

Places where this has undesired effect:

  • Contribution graph and activity feed on the user profile shows all activity for the sync, giving a false image of the actual contributions
  • Activity page on the project shows all pushes as being from the single user
  • CI pipeline shows as being triggered by the user (several places in the web ui, on Slack, in the email report)
  • The user receives email on pipeline failure for commits not belonging to that user.

Intended users

Unknown

Further details

Proposal

  1. Create a dummy mirror user and indicate the activity is from the mirror user
  2. Check if the user name of the last commit in the push matches contributors/members of the project, or the value of the push user in the gitlab.com webhook body, indicate activity is from this user
  3. Combination of above, but don't add data to the contribution graph/link the activity directly to the user - rather just show the username/email in the event

left out the other headings in the template, hope that's okay

Assignee Loading
Time tracking Loading