Commit Graph

20 Commits

Author SHA1 Message Date
Robert Speicher 4edfad9678 Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
Grzegorz Bizon 07bcabb305 Improve wording related to deploy chatops command 2017-07-28 12:16:07 +02:00
Grzegorz Bizon 29a8827752 Improve deploy environment chatops slash command
We now match deployment actions better. If there is more than one
deployment action matched, we check if there is an action which name
equals to environment name, instead of raising an error about too many
actions defined.
2017-07-28 10:56:50 +02:00
Jarka Kadlecova 7bee7b848a Support both internal and external issue trackers 2017-07-24 08:13:43 +02:00
Douwe Maan c81928cfa7 Include new URL helpers retroactively into includers of Gitlab::Routing 2017-07-07 10:43:37 -05:00
Eric Eastwood ea090291bb Rename "Slash commands" to "Quick actions"
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070

Deprecate "chat commands" in favor of "slash commands"

We looked for things like:

 - `slash commmand`
 - `slash_command`
 - `slash-command`
 - `SlashCommand`
2017-06-15 09:01:56 -05:00
Valery Sizov 223b87d7b1 Backport Fix '/unassign' slash command 2017-06-07 09:47:26 +03:00
Rares Sfirlogea 45e4c66565 Display slash commands outcome when previewing Markdown
Remove slash commands from Markdown preview and display their outcome next to
the text field.
Introduce new "explanation" block to our slash commands DSL.
Introduce optional "parse_params" block to slash commands DSL that allows to
process a parameter before it is passed to "explanation" or "command" blocks.
Pass path for previewing Markdown as "data" attribute instead of setting
a variable on "window".
2017-05-04 17:02:25 +02:00
Rémy Coutable 5a0027236b
Allow slashes in slash command arguments
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-02-17 10:34:43 +01:00
Douwe Maan 2703330a19 Fix behavior around commands with optional arguments 2016-08-18 14:29:49 -05:00
Douwe Maan 3e7eeefc93 Address feedback 2016-08-17 18:58:44 -05:00
Douwe Maan 8b8a4626c6 Fix specs and implement fixes based on failing specs 2016-08-17 17:54:24 -05:00
Douwe Maan 029b7d2e92 Fixed specs and fixes based on failing specs 2016-08-16 17:42:34 -05:00
Douwe Maan 5a07b760df Refactor slash command definition 2016-08-12 20:17:18 -05:00
Rémy Coutable f393f2dde0
Simplify the slash commands DSL to store action blocks instead of creating methods
Other improvements:
- Ensure slash commands autocomplete doesn't break when noteable_type is not given
- Slash commands: improve autocomplete behavior and /due command
- We don't display slash commands for note edit forms.
- Add tests for reply by email with slash commands
- Be sure to execute slash commands after the note creation in Notes::CreateService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:36:47 +02:00
Rémy Coutable 42e30a5012 Accept blocks for `.desc` and `.condition` slash commands DSL
Also, pass options as instance variables, making the DSL more
user-friendly / natural.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:12 +02:00
Rémy Coutable 65349c2212 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>
2016-08-13 00:06:12 +02:00
Rémy Coutable 23db644954 Add support for no-op slash commands that appear in autocomplete
The first one is /cc

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:12 +02:00
Rémy Coutable e021604454 Don't extract slash commands inside blockcode, blockquote or HTML tags
Improve slash command descriptions, support /due tomorrow

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:12 +02:00
Rémy Coutable 0eea8c8857 Support slash commands in noteable description and notes
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: Rémy Coutable <remy@rymai.me>
2016-08-13 00:05:57 +02:00