All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.release_notes_for_bitbucket.Main Maven / Gradle / Ivy

Go to download

This tool collects all issues that were fixed in some/the latest release and assigns them a corresponding milestone. In effect this milestone is basis for your release notes. This is the command line tool - a maven plugin is available too.

The newest version!
package com.release_notes_for_bitbucket;

import com.release_notes_for_bitbucket.version_tree.Commit;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Set;

/**
 * TODO
 * - Maven integration
 */
public class Main {

    public static void main(String[] args) throws IOException {

        if (args.length < 4) {
            System.out.println("Usage:");
            System.out.println("\njava " + Main.class.getName() + " bitbucket_user password repository_owner repository_name [--version SOME.VERSION]");
            System.out.println("\n(Creates a milestone for the most current version (or the version given) and sets this milestone for all fixed issues in this version.)");
            return;
        }

        String user = args[0];
        String password = args[1];
        String repoOwner = args[2];
        String repoName = args[3];

        List argsList = Arrays.asList(args);
        String version = null;
        if (argsList.indexOf("--version") > 0) {
            version = argsList.get(argsList.indexOf("--version") + 1);
        }

        new AssignIssuesManager(user, password, repoOwner, repoName, version).invoke();
    }

    public static void printCommits(Set newCommitsInRelease) {
        System.out.println("Commits for release:");
        for (Commit commit : newCommitsInRelease) {
            System.out.println("Commit: " + commit.getId());
        }
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy