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:
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
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:
Sure we can. Couple of things then: Could you see to add unit-tests? Otherwise I'll do it before merging.
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
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).
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).
view_project_activity
I'll merge this :)
Pull-Request has been merged by pingou