execute method

  1. @override
Future<bool> execute()
override

Implementation

@override
Future<bool> execute() async {
  String commitMessage = "";
  final commitType = getCommitType();
  commitMessage += commitType.name;
  final task = Input(
          prompt:
              "There is a task to vinculate? [PRO-1]: (if you leave blank this field will be ignored) ")
      .interact()
      .trim();
  task.isNotEmpty ? commitMessage += "[$task]: " : commitMessage += ": ";
  final message =
      Input(prompt: "Commit message: ", validator: (value) => value.isEmpty)
          .interact()
          .trim();
  commitMessage += message;
  return await headCommit(commitMessage: commitMessage);
}