2023-01-30 17:05:32 -08:00
|
|
|
import {Octokit} from "@octokit/rest";
|
|
|
|
|
|
2023-05-08 17:00:05 +02:00
|
|
|
export function getClient(token: string, userAgent?: string, apiUrl?: string): Octokit {
|
2023-01-30 17:05:32 -08:00
|
|
|
return new Octokit({
|
|
|
|
|
auth: token,
|
2023-05-08 17:00:05 +02:00
|
|
|
userAgent: userAgent || `GitHub Actions Language Server`,
|
|
|
|
|
baseUrl: apiUrl
|
2023-01-30 17:05:32 -08:00
|
|
|
});
|
|
|
|
|
}
|