List Events Related to Snippets in User Profile Activity Feed
Problem to solve
Creating a snippet and possibly editing one should create an activity event on your profile showing as a blue square and line of text like other activity
What does success look like, and how can we measure that?
Creating a snippet adds an activity event in the same way a push or comment does.
Links / references
Testing Activity
- Test that the events are created when they are supposed to.
- Test also that the snippets event appear in the user activity feed.
@vij:
- Test each new event is tracked
- Test each new event is displayed
Security Testing Activity
@vij:
- Ensure snippet visibility impacts event visibility (possibly already covered by existing implementation/tests)
MR Breakdown
-
This issue, at the moment, can only be implement for project snippets. Personal snippets require a totally different structure that we have to investigate first in #207041.
-
First of all, we have to come up with the events we want to track. My suggestion would be create, push, and edit.
-
Create and edit events are fairly easy to implement because we can do that in their respective controller. For the push event, we can add it to https://gitlab.com/gitlab-org/gitlab/blob/master/app/workers/post_receive.rb#L76 like wiki does in https://gitlab.com/gitlab-org/gitlab/blob/master/app/workers/post_receive.rb#L73 but in a simpler way since we might only want to track that the snippet received a push, not which file the push affected
-
1 MR per each event. If we go with three events then 3 MRs
@vij:
-
I think this would be slightly more work than the original issue requirements, now that Snippets are backed by repositories because we'd also need to consider repo actions as potential events to track.
-
We could create one MR per event we wish to track (e.g. create, delete, update, push). Weighted 3+ because further investigation would be needed to fully understand the work involved
-
Personal snippet events may require significantly more work after investigation into how the existing event implementation can be modified to support snippets without a project ID