1. 13 Aug, 2016 4 commits
    • Rémy Coutable's avatar
      Make slash commands contextual · 65349c22
      Rémy Coutable authored
      - Return only slash commands that make sense for the current noteable
      - Allow slash commands decription to be dynamic
      
      Other improvements:
      
      - Add permission checks in slash commands definition
      - Use IssuesFinder and MergeRequestsFinder
      - Use next if instead of a unless block, and use splat operator instead of flatten
      Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
      65349c22
    • Rémy Coutable's avatar
      Don't extract slash commands inside blockcode, blockquote or HTML tags · e0216044
      Rémy Coutable authored
      Improve slash command descriptions, support /due tomorrow
      Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
      e0216044
    • Rémy Coutable's avatar
      Add the /title slash command · 39f7f63f
      Rémy Coutable authored
      Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
      39f7f63f
    • Rémy Coutable's avatar
      Support slash commands in noteable description and notes · 0eea8c88
      Rémy Coutable authored
      Some important things to note:
      
      - commands are removed from noteable.description / note.note
      - commands are translated to params so that they are treated as normal
        params in noteable Creation services
      - the logic is not in the models but in the Creation services, which is
        the right place for advanced logic that has nothing to do with what
        models should be responsible of!
      - UI/JS needs to be updated to handle notes which consist of commands
        only
      - the `/merge` command is not handled yet
      
      Other improvements:
      
      - Don't process commands in commit notes and display a flash is note is only commands
      - Add autocomplete for slash commands
      - Add description and params to slash command DSL methods
      - Ensure replying by email with a commands-only note works
      - Use :subscription_event instead of calling noteable.subscribe
      - Support :todo_event in IssuableBaseService
      Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
      0eea8c88