<commit_before>(function (controller) {
	var helpers = require("./helpers"),
		config = require("../config"),
		moment = require("moment"),
		_ = require("underscore");

	function githubCommitEventsTranslateFromEventStore(entries) {
		var commits = _.map(entries, function(entry) {
			var e = entry.content.data;
			return {
				commitDate: e.commit.committer.date,
				timeFormatted: moment(e.commit.committer.date).fromNow(),
				author: e.commit.committer.name,
				sha1Partial: e.commit.tree.sha.substring(0, 6),
				action: "committed",
				message: e.commit.message,
				commitHref: e.html_url
		    };
	    });
	    var response = {
	        commits: commits
	    };
	    return response;
	}

	controller.init = function (app) {
		/**
		 * @api {get} /api/query Request commits
		 * @apiName query
		 * @apiGroup Query
		 *
		 * @apiParam {String} workitem VersionOne workitem identifier
		 *<commit_msg>S-48324 Get sha1Partial from commit.sha not commit.tree.sha<commit_after>(function (controller) {
	var helpers = require("./helpers"),
		config = require("../config"),
		moment = require("moment"),
		_ = require("underscore");

	function githubCommitEventsTranslateFromEventStore(entries) {
		var commits = _.map(entries, function(entry) {
			var e = entry.content.data;
			return {
				commitDate: e.commit.committer.date,
				timeFormatted: moment(e.commit.committer.date).fromNow(),
				author: e.commit.committer.name,
				sha1Partial: e.commit.sha.substring(0, 6),
				action: "committed",
				message: e.commit.message,
				commitHref: e.html_url
		    };
	    });
	    var response = {
	        commits: commits
	    };
	    return response;
	}

	controller.init = function (app) {
		/**
		 * @api {get} /api/query Request commits
		 * @apiName query
		 * @apiGroup Query
		 *
		 * @apiParam {String} workitem VersionOne workitem identifier
		 *
{'fraction_non_alphanumeric': 0.13687600644122383, 'fraction_numerical': 0.00644122383252818, 'mean_word_length': 3.2171945701357467, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6863310', 'n_tokens_mistral': 689, 'n_tokens_neox': 575, 'n_words': 124}