Make slash commands contextual
- 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:
Rémy Coutable <remy@rymai.me>
显示
- Gemfile 2 个添加, 1 个删除Gemfile
- Gemfile.lock 2 个添加, 0 个删除Gemfile.lock
- app/controllers/projects_controller.rb 1 个添加, 1 个删除app/controllers/projects_controller.rb
- app/services/projects/autocomplete_service.rb 21 个添加, 2 个删除app/services/projects/autocomplete_service.rb
- app/services/slash_commands/interpret_service.rb 117 个添加, 20 个删除app/services/slash_commands/interpret_service.rb
- doc/workflow/slash_commands.md 1 个添加, 1 个删除doc/workflow/slash_commands.md
- lib/gitlab/slash_commands/dsl.rb 31 个添加, 9 个删除lib/gitlab/slash_commands/dsl.rb
- spec/fixtures/emails/commands_only_reply.eml 1 个添加, 1 个删除spec/fixtures/emails/commands_only_reply.eml
- spec/lib/gitlab/slash_commands/dsl_spec.rb 67 个添加, 15 个删除spec/lib/gitlab/slash_commands/dsl_spec.rb
- spec/services/slash_commands/interpret_service_spec.rb 151 个添加, 15 个删除spec/services/slash_commands/interpret_service_spec.rb
加载中
想要评论请 注册 或 登录