UserAgent tweaks

This commit is contained in:
Half-Shot 2022-01-17 09:50:40 +00:00
parent 546c5ec4b6
commit 7049802750
2 changed files with 3 additions and 5 deletions

View File

@ -6,11 +6,10 @@ import * as GitHubWebhookTypes from "@octokit/webhooks-types";
import { GitHubOAuthTokenResponse, InstallationDataType } from "./Types"; import { GitHubOAuthTokenResponse, InstallationDataType } from "./Types";
import axios from "axios"; import axios from "axios";
import qs from "querystring"; import qs from "querystring";
import UserAgent from "../UserAgent";
const log = new LogWrapper("GithubInstance"); const log = new LogWrapper("GithubInstance");
const USER_AGENT = "matrix-hookshot v0.0.1";
interface Installation { interface Installation {
account: { account: {
login?: string; login?: string;
@ -44,7 +43,7 @@ export class GithubInstance {
public static createUserOctokit(token: string) { public static createUserOctokit(token: string) {
return new Octokit({ return new Octokit({
auth: token, auth: token,
userAgent: USER_AGENT, userAgent: UserAgent,
}); });
} }
@ -85,7 +84,7 @@ export class GithubInstance {
privateKey: this.privateKey, privateKey: this.privateKey,
installationId, installationId,
}, },
userAgent: USER_AGENT, userAgent: UserAgent,
}); });
} }

View File

@ -4,7 +4,6 @@ import { GithubInstance } from "../Github/GithubInstance";
import LogWrapper from "../LogWrapper"; import LogWrapper from "../LogWrapper";
import { NotificationWatcherTask } from "./NotificationWatcherTask"; import { NotificationWatcherTask } from "./NotificationWatcherTask";
import { RequestError } from "@octokit/request-error"; import { RequestError } from "@octokit/request-error";
import { OctokitResponse } from "@octokit/types";
import Metrics from "../Metrics"; import Metrics from "../Metrics";
const log = new LogWrapper("GitHubWatcher"); const log = new LogWrapper("GitHubWatcher");