#872 added and activity feed view for instances using datagrepper
Merged by pingou. Opened by ryanlerch.
ryanlerch/pagure activity-feed  into  master

Download 872.patch
no initial comment

Here is an initial implementation of an activity feed view for the current repo in pagure.

It relys on quering datagrepper for messages using json-p and formatting the output client-side.

the view is available by going to /activity from the pagure root.

here is a screenshot of how it shows up:
Activity_-_pagure_-_Pagure_2016-04-01_11-42-39.png

I would place this check first to avoid a DB query if the feature is off anyway.

Looks good, should we add a link to this page in the overview?

Pull-Request has been updated

Pull-Request has been updated

Looks good, should we add a link to this page in the overview?

I have some ideas how to provide a link to this, but it will require a bit of a rework, so do you mind keeping this as a "hidden" feature until i can get that work done?

Sure we can.

Couple of things then:

  • Could you see to add unit-tests? Otherwise I'll do it before merging.
  • Could you see about line length? Some of these lines seem to be very long :)

Pull-Request has been updated

Sure we can.
Couple of things then:

Could you see to add unit-tests? Otherwise I'll do it before merging.

Had a look at this, but not sure how to go about creating unit tests for data that is pulled in from datagrepper...

Could you see about line length? Some of these lines seem to be very long :)

just added a commit to the branch linked to this PR that removes most of the ridiculously long lines. It also just pulled out a few debugging messages i was sending to console.log() too

Had a look at this, but not sure how to go about creating unit tests for data that is pulled in from datagrepper...

We won't be able to test the JS part (ie the datagrepper integration) but we can check the python part (ie: that it follows the configuration set and return the template properly).

Pull-Request has been updated

Okay, added the tests, is that enough coverage for this, or do we need more?

Pull-Request has been rebased

Ok I've rework just a little bit the unit-tests, so the view_project_activity endpoint is fully covered by the tests (the python part, no the JS one).

I'll merge this :)

Pull-Request has been rebased

Pull-Request has been merged by pingou

Metadata