<commit_before>'use strict';

angular.module('myApp.taskList', ['ngRoute', 'base64', 'tastFilters'])

.controller('userController', ['$base64','$scope', '$http', function($base64,$scope, $http) {
	$scope.userNamePrefered = 'Garrett';
	$scope.userNameFirst = 'Garrett';
	$scope.userNameLast = 'Culos';
	
	$scope.jiraAccounts;
	// 	{url:'http://jira.highwaythreesolutions.com', account:'gculos', password:''},
	// 	{url:'https://vividsolutions.atlassian.net', account:'gculos', password:''},
	// 	{url:'http://projects.markerseven.com', account:'gculos', password:''},
	// ];

	$http({
		
		method: 'GET',
		url: '/routing/fetch_accounts'

	}).then(function successCallback(response){

		$scope.jiraAccounts = response.data;

	}, function errorCallback(response){

	}).then(function(){

		$scope.usrAccountData=[];

		angular.forEach($scope.jiraAccounts, function(account, key) {

			console.log(account);
			var base = account['url'];
			var usr = account['user_name'];
			var password = account['password'];
			var usrPassEncoded = ($base64.encode(usr + ':' + password));// 
			// console.log(usrPassEncoded);

			$http({
			
				method: 'GET',
				url: ,
				headers: {'Content-Type':  'application/json', 'Authorization': 'Basic '+ usrPassEncoded ,'url':base+'/rest/api/2/search?jql=assignee='+ usr + '+order+by+duedate'}

			}).then(function successCallback(response) {
			
				// this callback will be called asynchronously
				// when the response is available
				// console.log('Success');
				$scope.usrAccountData.push(response.data);
				
			}, function errorCallback(response) {
				// called asynchronously if an error occurs
				// or server returns response with an error status.
				console.log('http request failure');
			});
			
		});


	});
	

	// // basic access to jira via user name and password
	// $scope.usrAccountData=[];<commit_msg>Update Jira Api call<commit_after>'use strict';

angular.module('myApp.taskList', ['ngRoute', 'base64', 'tastFilters'])

.controller('userController', ['$base64','$scope', '$http', function($base64,$scope, $http) {
	$scope.userNamePrefered = 'Garrett';
	$scope.userNameFirst = 'Garrett';
	$scope.userNameLast = 'Culos';
	
	$scope.jiraAccounts;
	// 	{url:'http://jira.highwaythreesolutions.com', account:'gculos', password:''},
	// 	{url:'https://vividsolutions.atlassian.net', account:'gculos', password:''},
	// 	{url:'http://projects.markerseven.com', account:'gculos', password:''},
	// ];

	$http({
		
		method: 'GET',
		url: '/routing/fetch_accounts'
		
	}).then(function successCallback(response){

		$scope.jiraAccounts = response.data;

	}, function errorCallback(response){

	}).then(function(){
		// basic access to jira via user name and password
		$scope.usrAccountData=[];

		angular.forEach($scope.jiraAccounts, function(account, key) {
			console.log(account);
			var base = account['url'];
			var usr = account['user_name'];
			var password = account['password'];
			var usrPassEncoded = ($base64.encode(usr + ':' + password));// 
			// console.log(usrPassEncoded);

			$http({
				method: 'GET',
				url: base+'/rest/api/2/search?jql=assignee='+ usr + '+order+by+duedate',
				headers: {'Content-Type':  'application/json', 'Authorization': 'Basic '+ usrPassEncoded }

			}).then(function successCallback(response) {
				// this callback will be called asynchronously
				// when the response is available
				// console.log('Success');
				$scope.usrAccountData.push(response.data);
				
			}, function errorCallback(response) {
				// called asynchronously if an error occurs
				// or server returns response with an error status.
				console.log('http request failure');
			});
			
		});


	});
	

	// // basic access to jira via user name and password
	// $scope.usrAccountData=[];
{'fraction_non_alphanumeric': 0.1808029779314012, 'fraction_numerical': 0.004785961180537091, 'mean_word_length': 4.083783783783784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '505133', 'n_tokens_mistral': 1385, 'n_tokens_neox': 1193, 'n_words': 241}