Add runner or worker to the useragent. (#3457)

This commit is contained in:
Tingluo Huang
2024-09-06 17:16:17 -04:00
committed by GitHub
parent 4c0a43f0e4
commit 0b0cb5520d

View File

@@ -248,6 +248,7 @@ namespace GitHub.Runner.Common
var currentProcess = Process.GetCurrentProcess();
_userAgents.Add(new ProductInfoHeaderValue("Pid", currentProcess.Id.ToString()));
_userAgents.Add(new ProductInfoHeaderValue("CreationTime", Uri.EscapeDataString(DateTime.UtcNow.ToString("O"))));
_userAgents.Add(new ProductInfoHeaderValue($"({hostType})"));
}
public string GetDirectory(WellKnownDirectory directory)