Update to the latest version of @actions/github.

This commit is contained in:
Chris Gavin 2020-09-18 15:40:23 +01:00
parent 55458a1ab1
commit 9ed519fa12
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
419 changed files with 56978 additions and 151535 deletions

View file

@ -1,8 +0,0 @@
export function getUserAgent() {
try {
return navigator.userAgent;
}
catch (e) {
return "<environment undetectable>";
}
}

View file

@ -1 +1,9 @@
export { getUserAgent } from "./node";
export function getUserAgent() {
if (typeof navigator === "object" && "userAgent" in navigator) {
return navigator.userAgent;
}
if (typeof process === "object" && "version" in process) {
return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
}
return "<environment undetectable>";
}

View file

@ -1,12 +0,0 @@
import osName from "os-name";
export function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
}
catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
return "<environment undetectable>";
}
}