Quick actions refactor to handle commits better
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20694, we started supporting quick actions on commits.
However, there are a couple of issues with that:
- The existing quick actions use
issuable
everywhere, butCommit
is not anIssuable
. This is a confusing variable name. We could considernoteable
instead. - Because of that, we have a lot of
issuable.is_a?(Issuable)
checks, but these are easy to miss out on new actions. - We don't have great spec coverage for actions on commits.
One way of solving 1 and 2 might be to explicitly define types that implement a command, by extending the DSL. Something like:
desc 'My command'
explanation { ... }
types Issue, MergeRequest # or Issuable
condition do
# ...
end
# etc.
@splattael @jprovaznik wdyt?