<commit_before>/**
 * This code is free software; you can redistribute it and/or modify it under
 * the terms of the new BSD License.
 *
 * Copyright (c) 2011, <NAME>
 */

package com.github.koraktor.mavanagaiata;

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;

import org.apache.maven.plugin.MojoExecutionException;

import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevTag;
import org.eclipse.jgit.revwalk.RevWalk;

/**
 * This goal allows to generate a changelog of the currently checked out branch
 * of the Git repository. It will use information from tags and commit messages
 * to build a reverse chronological summary of the development. It can be
 * configured to display the changelog or save it to a file.
 *
 * @author <NAME>
 * @goal changelog
 * @phase compile
 * @requiresProject
 */
public class GitChangelogMojo extends AbstractGitMojo {

    /**
     * The date format to use for tag output
     *
     * @parameter expression="${mavanagaiata.changelog.dateFormat}"
     *            property="changelog.dateFormat"
     */
    protected String dateFormat = "MM/dd/yyyy hh:mm a";

    /**
     * The header to print above the changelog
     *
     * @parameter expression="${mavanagaiata.changelog.header}"
     *            property="changelog.header"
     */
    protected String header = "Changelog\n=========\n";

    /**
     * The string to prepend to every commit message
     *
     * @parameter expression="${mavanagaiata.changelog.commitPrefix}"
     *            property="changelog.commitPrefix"
     */
    protected String commitPrefix = " * ";

    /**
     * The file to write the changelog to
     *
     * @parameter expression="${mavanagaiata.changelog.outputFile}"
     *            property="changelog.outputFile"
     */
    protected File outputFile;

    /**
     * Whether to skip tagged commits' messages
     *
     * This is useful when usually tagging commits like "Version bump to X.Y.Z"
     *
     * @parameter expression="${mavanagaiata.changelog.skipTagged}"
     *            property="changelog.skipTagged"
     */
    protected boolean skipTagged = false;

    /**
     * The string to prepend to the tag name
     *
     * @parameter expression="${mavanagaiata.changelog.tagPrefix}"
     *            property="changelog.tagPrefix"
     */
    protected String tagPrefix = "\nVersion ";

    /**<commit_msg>Fixed configuration parameters for GitChangelogMojo<commit_after>/**
 * This code is free software; you can redistribute it and/or modify it under
 * the terms of the new BSD License.
 *
 * Copyright (c) 2011, <NAME>
 */

package com.github.koraktor.mavanagaiata;

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;

import org.apache.maven.plugin.MojoExecutionException;

import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevTag;
import org.eclipse.jgit.revwalk.RevWalk;

/**
 * This goal allows to generate a changelog of the currently checked out branch
 * of the Git repository. It will use information from tags and commit messages
 * to build a reverse chronological summary of the development. It can be
 * configured to display the changelog or save it to a file.
 *
 * @author <NAME>
 * @goal changelog
 * @phase compile
 * @requiresProject
 */
public class GitChangelogMojo extends AbstractGitMojo {

    /**
     * The date format to use for tag output
     *
     * @parameter expression="${mavanagaiata.changelog.dateFormat}"
     */
    protected String dateFormat = "MM/dd/yyyy hh:mm a";

    /**
     * The header to print above the changelog
     *
     * @parameter expression="${mavanagaiata.changelog.header}"
     */
    protected String header = "Changelog\n=========\n";

    /**
     * The string to prepend to every commit message
     *
     * @parameter expression="${mavanagaiata.changelog.commitPrefix}"
     */
    protected String commitPrefix = " * ";

    /**
     * The file to write the changelog to
     *
     * @parameter expression="${mavanagaiata.changelog.outputFile}"
     */
    protected File outputFile;

    /**
     * Whether to skip tagged commits' messages
     *
     * This is useful when usually tagging commits like "Version bump to X.Y.Z"
     *
     * @parameter expression="${mavanagaiata.changelog.skipTagged}"
     */
    protected boolean skipTagged = false;

    /**
     * The string to prepend to the tag name
     *
     * @parameter expression="${mavanagaiata.changelog.tagPrefix}"
     */
    protected String tagPrefix = "\nVersion ";

    /**
{'fraction_non_alphanumeric': 0.10480175333731818, 'fraction_numerical': 0.0015939430165371588, 'mean_word_length': 3.0713706407137065, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1565820', 'n_tokens_mistral': 1492, 'n_tokens_neox': 1457, 'n_words': 422}