Skip to content

Commit

Permalink
Merge release 160.0 into master (actions#153)
Browse files Browse the repository at this point in the history
* Update to Version 2.160.0 (actions#144)

* Revert "remove issue generation on warning/error commands (actions#137)" (actions#147)

* Revert "remove issue generation on warning/error commands (actions#137)"

This reverts commit 53da198.

* Updated Release notes

* Users/thboop/port directory changes (actions#152)

* Clear action cache for local runner

* update release notes for actions directory cache changes
  • Loading branch information
thboop committed Oct 28, 2019
1 parent 3ee4161 commit b35dbd6
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 5 deletions.
8 changes: 4 additions & 4 deletions releaseNote.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Features
- Set Default shell to powershell for windows runners (#135)
- Use Powershell as fallback if Powershell Core is not available for default shell on windows (#142)
- N/A

## Bugs
- Removed unintended additional fields on error and warning commands (#137)
- Reverted removal of additional fields error and warning fields (#147)
- Actions cache would incorrectly cache the action if the tag was updated (#148)

## Misc
- N/A
- Updated to .NET Core 3.0 (#127)

## Agent Downloads

Expand Down
50 changes: 50 additions & 0 deletions src/Runner.Worker/ActionCommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,65 @@ public abstract class IssueCommandExtension : RunnerService, IActionCommandExten

public void ProcessCommand(IExecutionContext context, string inputLine, ActionCommand command)
{
command.Properties.TryGetValue(IssueCommandProperties.File, out string file);
command.Properties.TryGetValue(IssueCommandProperties.Line, out string line);
command.Properties.TryGetValue(IssueCommandProperties.Column, out string column);

Issue issue = new Issue()
{
Category = "General",
Type = this.Type,
Message = command.Data
};

if (!string.IsNullOrEmpty(file))
{
issue.Category = "Code";

if (context.Container != null)
{
// Translate file path back from container path
file = context.Container.TranslateToHostPath(file);
command.Properties[IssueCommandProperties.File] = file;
}

// Get the values that represent the server path given a local path
string repoName = context.GetGitHubContext("repository");
var repoPath = context.GetGitHubContext("workspace");

string relativeSourcePath = IOUtil.MakeRelative(file, repoPath);
if (!string.Equals(relativeSourcePath, file, IOUtil.FilePathStringComparison))
{
// add repo info
if (!string.IsNullOrEmpty(repoName))
{
command.Properties["repo"] = repoName;
}

if (!string.IsNullOrEmpty(relativeSourcePath))
{
// replace sourcePath with the new relative path
// prefer `/` on all platforms
command.Properties[IssueCommandProperties.File] = relativeSourcePath.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
}
}
}

foreach (var property in command.Properties)
{
issue.Data[property.Key] = property.Value;
}

context.AddIssue(issue);
}

private static class IssueCommandProperties
{
public const String File = "file";
public const String Line = "line";
public const String Column = "col";
}

}

public sealed class GroupCommandExtension : GroupingCommandExtension
Expand Down
2 changes: 1 addition & 1 deletion src/runnerversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.159.2
2.160.0

0 comments on commit b35dbd6

Please sign in to comment.