AddCommand constructor

AddCommand()

Implementation

AddCommand()
    : super(
        'add',
        'Add an entry in CHANGELOG.md.\n\n'
            'The entry is added in the section of the changes that are not '
            'released yet. If the changelog starts with a released version, '
            'then the section for the next release is created at the top - '
            'an entry must never get into a version that is already out.\n\n'
            'Example: alex changelog add "Some new feature" -s added -i 42',
        const ['a'],
      ) {
  argParser
    ..addArg(
      _argSection,
      help: 'Section of the changelog to add the entry in.',
      allowed: const [_sectionAdded, _sectionFixed, _sectionPreRelease],
      defaultsTo: _sectionAdded,
      valueHelp: 'SECTION',
    )
    ..addArg(
      _argIssue,
      help: 'Issue number to reference in the entry. '
          'A markdown link is used if issue_url is set in the config.',
      valueHelp: 'NUMBER',
    )
    ..addFormatOption();
}