File tree 2 files changed +4
-4
lines changed
java/com/epam/reportportal/extension/slack/collector/laucnh
resources/message-template
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 6
6
import com .epam .reportportal .extension .slack .collector .PropertyCollector ;
7
7
import com .epam .reportportal .extension .slack .model .enums .template .DefaultTemplateProperty ;
8
8
import com .epam .ta .reportportal .entity .ItemAttribute ;
9
- import com .epam .ta .reportportal .entity .integration .Integration ;
10
9
import com .epam .ta .reportportal .entity .launch .Launch ;
11
- import java .util .Collections ;
12
10
import java .util .Map ;
13
11
import java .util .Set ;
14
12
import java .util .stream .Collectors ;
17
15
18
16
public class AttributesCollector implements PropertyCollector <Launch , DefaultTemplateProperty > {
19
17
18
+ private final static String EMPTY_ATTRIBUTES = "-" ;
19
+
20
20
@ Override
21
21
public Map <DefaultTemplateProperty , String > collect (Launch launch ) {
22
22
return ofNullable (launch .getAttributes ()).filter (CollectionUtils ::isNotEmpty )
23
23
.map (this ::convertToProperties )
24
- .orElseGet (Collections :: emptyMap );
24
+ .orElseGet (() -> Map . of ( LAUNCH_ATTRIBUTES , EMPTY_ATTRIBUTES ) );
25
25
}
26
26
27
27
private Map <DefaultTemplateProperty , String > convertToProperties (Set <ItemAttribute > attributes ) {
Original file line number Diff line number Diff line change 179
179
},
180
180
{
181
181
"type" : " text" ,
182
- "text" : " SISTEM ISSUE GROUP: \t\t ${statistics$defects$system_issue$total}\n "
182
+ "text" : " SYSTEM ISSUE GROUP: \t\t ${statistics$defects$system_issue$total}\n "
183
183
},
184
184
{
185
185
"type" : " emoji" ,
You can’t perform that action at this time.
0 commit comments