Module: FeatureCommand

Defined in:
lib/plugins/commands/feature_command.rb

Overview

Specifies the version command rubocop:disable Metrics/MethodLength

Class Method Summary collapse

Class Method Details

.included(thor) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/plugins/commands/feature_command.rb', line 6

def self.included(thor)
  thor.class_eval do
    long_desc <<-LONGDESC

Creates a new feature branch for you to develop your changes.

Currently this is just a simple git branch but in the future the command will be able
to work in relation to GitHub or BitBucket issues, i.e. create a branch from a GitHub issue, which
will give the user a richer experience using other commands such as review and land.

If you think integration with GitHub or BitBucket issues would be a good idea,
let us know by telling us on:

- Tell us on Twitter @ImaginateLabs

- Come chat about it on our Gitter channel https://gitter.im/imaginatelabs/radial

    LONGDESC

    descf "feature", "FEATURE_NAME [-s]",
          "Creates a feature branch for you to develop your changes"
    option :start_commit,
           desc: "Commit you want to branch from",
           aliases: "-s",
           default: "HEAD"
    def feature(feature_name)
      inf "\nSTARTING NEW FEATURE\n"
      vcs.start_new_feature options[:start_commit], feature_name
    end
  end
end