Commit dbdd9309 authored by 马博's avatar 马博

changes

parent 89cabab1
......@@ -2,6 +2,7 @@ package base;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.gitlab.api.models.GitlabProjectMerges;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.env.Environment;
......@@ -55,6 +56,11 @@ public class DingdingResult {
Map<String,String> params = new HashMap<>();
params.put("jobName",getJob());
changes = Postman.sendFindTestApp(params);
GitlabProjectMerges gitlabProjectMerges = GitlabUtils.getMessage("credits-group",changes);
changes = changes+" 提交者:"+gitlabProjectMerges.getAuthor().getName()+" 描述:"+gitlabProjectMerges.getDescription();
/*从jenkins上获取项目变更
Map<String,String> resentChanges=BeTested.getChangesWithin(30,changeMap);
System.out.println(resentChanges);
......@@ -132,12 +138,13 @@ public class DingdingResult {
// result.put("changes",this.changes+"<br>");
result.put("changes",this.changes);
if(this.failCount>0||exceptionServices.size()>0||exceptionMessage.size()>0){
try{
String name = this.changes.split("—")[1].split("/")[0];
names.add(name);
}catch(Exception e){
System.out.println(e);
}
// try{
// String name = this.changes.split("—")[1].split("/")[0];
// names.add(name);
// }catch(Exception e){
// System.out.println(e);
// }
}else {
names.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment