#6941 Create activity events for commits

v1.1.0
closed
General
2015-08-20
2013-12-03
No

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-12-03
    • Size: --> 1
     
    • status: open --> in-progress
    • assigned_to: Tim Van Steenburgh
     
    • status: in-progress --> code-review
     
  • tv/6941

    Example here: https://sf-tvansteenburgh-1020.sb.sf.net/p/testactivity/activity/

    No automated tests since I couldn't find any tests for refresh_repo().

    To test manually, make sure activitystream is enabled in ini, create new project, create repo, commit to it, view project activity page. (I tested with git, hg, and svn.)

    Obviously this will be more useful with detail like the commit message included. Will add that with [#6829].

     

    Related

    Tickets: #6829

  • Dave Brondsema

    Dave Brondsema - 2013-12-04
    • status: code-review --> in-progress
    • QA: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2013-12-04

    has_activity_access should do a permission check on the tool

     
    • status: in-progress --> code-review
     
  • Force-pushed a fix.

     
  • Dave Brondsema

    Dave Brondsema - 2013-12-06
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2013-12-06

    Looks good. Just making a small tweak to simplify logic:

    -            if app_config:
    -                project = Project.query.get(_id=app_config.project_id)
    -                app = app_config.load()(project, app_config)
    -                return has_access(app, perm, user, project)
    +            return has_access(app_config, perm, user)
    

    This works since app_config.project automatically loads via app_config.project_id. And has_access checks for None and also loads the project via the first param.

     

Log in to post a comment.