mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
lint
This commit is contained in:
parent
b77916f425
commit
ce34ff2bd3
@ -28,12 +28,12 @@ export class GitHubDiscussionSpace implements IConnection {
|
||||
static readonly QueryRoomRegex = /#github_disc_(.+)_(.+):.*/;
|
||||
|
||||
static async onQueryRoom(result: RegExpExecArray, opts: {octokit: Octokit, as: Appservice}): Promise<Record<string, unknown>> {
|
||||
if (!result) {
|
||||
log.error("Invalid alias pattern");
|
||||
if (!result || result.length < 2) {
|
||||
log.error(`Invalid alias pattern '${result}'`);
|
||||
throw Error("Could not find issue");
|
||||
}
|
||||
|
||||
const [ owner, repo ] = result?.slice(1);
|
||||
const [ owner, repo ] = result.slice(1);
|
||||
|
||||
log.info(`Fetching ${owner}/${repo}`);
|
||||
let repoRes: ReposGetResponseData;
|
||||
|
@ -315,7 +315,7 @@ export class GitHubIssueConnection implements IConnection {
|
||||
}
|
||||
}
|
||||
|
||||
public onIssueStateChange(data: unknown) {
|
||||
public onIssueStateChange() {
|
||||
return this.syncIssueState();
|
||||
}
|
||||
|
||||
|
@ -26,12 +26,12 @@ export class GitHubUserSpace implements IConnection {
|
||||
static readonly QueryRoomRegex = /#github_(.+):.*/;
|
||||
|
||||
static async onQueryRoom(result: RegExpExecArray, opts: {octokit: Octokit, as: Appservice}): Promise<Record<string, unknown>> {
|
||||
if (!result) {
|
||||
log.error("Invalid alias pattern");
|
||||
if (!result || result.length < 1) {
|
||||
log.error(`Invalid alias pattern '${result}'`);
|
||||
throw Error("Could not find issue");
|
||||
}
|
||||
|
||||
const [ username ] = result?.slice(1);
|
||||
const [ username ] = result.slice(1);
|
||||
|
||||
log.info(`Fetching ${username}`);
|
||||
let state: GitHubUserSpaceConnectionState;
|
||||
|
Loading…
x
Reference in New Issue
Block a user