<commit_before>'use strict';
const models = require('../../../../common/models');
const _ = require('../../../../common/utils/helper');
const logger = require('../../../../common/utils/logger');
var request = require('request');
var fs = require("fs");
var http = require("http");
var co = require('co');
var Iconv = require('iconv-lite');
let REQUST = require("co-request");
var path = require('path');

const Project = models.Project;
const Attachment = models.Attachment;
// 提交任务
function *addTask() {
  const project = new Project();
  project.repositoryUrl = _.trim(this.request.body['repositoryUrl']);
//   project.repositoryUrl = 'https://github.com/xiaomingstudy/macaca-test-sample.git';
//
  project.repositoryBranch = _.trim(this.request.body['repositoryBranch']);
//   project.repositoryBranch = 'master';
  project.serialNumber = _.trim(this.request.body['serialNumber']);

  project.resultUrl = _.trim(this.request.body['result_url']);
  project.scriptUrl = _.trim(this.request.body['script_url']);
  project.apkUrl = _.trim(this.request.body['app_url']);
  project.statusUrl = _.trim(this.request.body['job_status_url']);

  project.time = _.moment().format('x');

  project.environment = 'udid='+project.serialNumber;<commit_msg>设备信息调整<commit_after>'use strict';
const models = require('../../../../common/models');
const _ = require('../../../../common/utils/helper');
const logger = require('../../../../common/utils/logger');
var request = require('request');
var fs = require("fs");
var http = require("http");
var co = require('co');
var Iconv = require('iconv-lite');
let REQUST = require("co-request");
var path = require('path');

const Project = models.Project;
const Device = models.Device;
const Attachment = models.Attachment;
// 提交任务
function *addTask() {
  const project = new Project();
  project.repositoryUrl = _.trim(this.request.body['repositoryUrl']);
//   project.repositoryUrl = 'https://github.com/xiaomingstudy/macaca-test-sample.git';
//
  project.repositoryBranch = _.trim(this.request.body['repositoryBranch']);
//   project.repositoryBranch = 'master';
  var deviceId = _.trim(this.request.body['device_id']);
  const device = new Device();
  var devices = yield device.getById(deviceId);

  project.serialNumber = devices.serialNumber;

  project.resultUrl = _.trim(this.request.body['result_url']);
  project.scriptUrl = _.trim(this.request.body['script_url']);
  project.apkUrl = _.trim(this.request.body['app_url']);
  project.statusUrl = _.trim(this.request.body['job_status_url']);

  project.time = _.moment().format('x');

  project.environment = 'udid='+project.serialNumber;
{'fraction_non_alphanumeric': 0.19832508564902931, 'fraction_numerical': 0.0, 'mean_word_length': 4.627408993576017, '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': '4716498', 'n_tokens_mistral': 791, 'n_tokens_neox': 785, 'n_words': 145}