Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ed6ab2f69 | |||
| 470b3d93de | |||
| b9059e1b85 |
@@ -122,8 +122,19 @@ static class AutomateFunction
|
||||
bool changed = !Equals(entry.Value, releaseObjectPropDict[entry.Key]);
|
||||
if (changed)
|
||||
{
|
||||
string diff =
|
||||
$"Property ({entry.Key}) changed from ({releaseObjectPropDict[entry.Key]}) to ({entry.Value})";
|
||||
object? releaseValue = releaseObjectPropDict[entry.Key];
|
||||
object? testValue = entry.Value;
|
||||
string diff = $"Property ({entry.Key}) changed";
|
||||
if (
|
||||
releaseValue is not null
|
||||
&& testValue is not null
|
||||
&& !releaseValue.GetType().Equals(testValue.GetType())
|
||||
)
|
||||
{
|
||||
diff +=
|
||||
$" from ({releaseObjectPropDict[entry.Key]}) to ({entry.Value})";
|
||||
}
|
||||
|
||||
if (!diffDictionary.ContainsKey(entry.Key))
|
||||
{
|
||||
diffDictionary.Add(entry.Key, diff);
|
||||
@@ -197,7 +208,7 @@ static class AutomateFunction
|
||||
if (addedList.Count + deletedList.Count + modifiedList.Count > 0)
|
||||
{
|
||||
automationContext.MarkRunFailed(
|
||||
$"Run failed due to {addedList.Count} ADDED, {modifiedList.Count} MODIFIED, and {deletedList.Count} DELETED objects compared to the release commit."
|
||||
$"Run failed due to {addedList.Count} ADDED, {modifiedList.Count} MODIFIED, and {deletedList.Count} DELETED objects compared to the release commit ({unchangedCount} objects were unchanged)."
|
||||
);
|
||||
|
||||
addedList.ForEach(
|
||||
@@ -212,6 +223,11 @@ static class AutomateFunction
|
||||
$"MODIFIED object: id( {o.Item1} ), type( {o.Item2} ), changed props:( {o.Item3} )"
|
||||
)
|
||||
);
|
||||
|
||||
automationContext.AttachWarningToObjects(
|
||||
MODIFIED,
|
||||
modifiedList.Select(o => o.Item1).ToList()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user