Skip to content

Commit

Permalink
Fix the issue that PR changed files list is empty (#14202)
Browse files Browse the repository at this point in the history
* Fix the issue that PR changed files list is empty

* Fix the issue that PR changed files list is empty

Co-authored-by: wyunchi <yunwang@microsoft.com>
  • Loading branch information
wyunchi-ms and wyunchi-ms authored Feb 18, 2021
1 parent fcaddf8 commit a941e86
Showing 1 changed file with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,26 @@ public override bool Execute()
var csprojMap = ReadMapFile(CsprojMapFilePath, "CsprojMapFilePath");

Console.WriteLine(string.Format("FilesChanged: {0}", FilesChanged.Length));
if (FilesChanged != null && FilesChanged.Length > 0)
if (FilesChanged != null)
{
return ProcessFileChanged(csprojMap);
if (FilesChanged.Length > 0)
{
return ProcessFileChanged(csprojMap);
}
else
{
Dictionary<string, HashSet<string>> influencedModuleInfo = new Dictionary<string, HashSet<string>>
{
[BUILD_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_BREAKING_CHANGE_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_DEPENDENCY_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_HELP_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_SIGNATURE_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[TEST_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME }
};
FilterTaskResult.PhaseInfo = CalculateCsprojForBuildAndTest(influencedModuleInfo, csprojMap);
return true;
}
}
else if (!string.IsNullOrWhiteSpace(TargetModule))
{
Expand Down

0 comments on commit a941e86

Please sign in to comment.