package tasks.mine;

import io.Reader;
import io.Writer;
import main.Config;
import tasks.mine.queries.ContributorsQuery;

/**
 * Queries contributors statistics (if there is was at least a commit in the
 * last year)
 * 
 * @author Lisa Nguyen Quang Do
 */

public class Contributors {

	public void run(String target) {
		Writer writer = new Writer(Config.resultFile, target);
		Reader reader = new Reader(Config.resultFile, target);

		ContributorsQuery contributorsQuery = new ContributorsQuery(writer, reader);
		if (contributorsQuery.contributorsQuery())
			System.out.println("Contributors finished");
		else
			System.out.println("Contributors failed");
	}

}
