Beispiel #1
0
        public override int Execute(CommandContext context, ChangelogGenerateOptions options)
        {
            var changelog = ChangelogGenerator.GenerateSince(options.StartDate);

            if (string.IsNullOrWhiteSpace(changelog))
            {
                SpectreHelper.WriteError("There were no commits to generate the changelog from.");
                return(1);
            }

            SpectreHelper.WriteInfo(changelog);
            return(0);
        }
Beispiel #2
0
        public override int Execute(CommandContext context)
        {
            var subject = AnsiConsole.Ask <string>("Enter the commit subject:");
            var message = CommitCommandUtils.GenerateCommitMessage(true, subject);

            if (string.IsNullOrWhiteSpace(message))
            {
                SpectreHelper.WriteError("There was an error generating the commit message.");
                return(1);
            }

            SpectreHelper.WriteWrappedHeader("Your commit message:");
            SpectreHelper.WriteInfo(message);
            return(0);
        }