Skip to content

Commit 3d38b49

Browse files
1 parent 08a7963 commit 3d38b49

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

src/github/installation-store.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { GitHubInstallation } from '../types/installation.js';
22
import { readFileSync, writeFileSync, existsSync } from 'fs';
3-
import { join } from 'path';
43

54
/**
65
* Simple file-based storage for installations
@@ -66,7 +65,7 @@ export class InstallationStore {
6665
* Get installation by repository ID
6766
*/
6867
async getInstallationByRepositoryId(repositoryId: number): Promise<GitHubInstallation | null> {
69-
let matchingInstallations: GitHubInstallation[] = [];
68+
const matchingInstallations: GitHubInstallation[] = [];
7069

7170
for (const installation of this.installations.values()) {
7271
if (installation.repositoryId === repositoryId) {

src/github/oauth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GitHubInstallation, OAuthTokenResponse, GitHubUser } from '../types/installation.js';
1+
import { OAuthTokenResponse, GitHubUser } from '../types/installation.js';
22

33
export class GitHubOAuthService {
44
private clientId: string;

src/mcp/tools/trigger_review.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function triggerReview(
1515
githubClient: GitHubClient
1616
): Promise<{ success: boolean; review_id?: string; check_run_id?: number; error?: string }> {
1717
try {
18-
const { owner, repo, pr_number, commit_sha, force = false } = args;
18+
const { owner, repo, pr_number, commit_sha } = args;
1919

2020
// Get PR info to get the latest commit if not provided
2121
const prInfo = await githubClient.getPRInfo(owner, repo, pr_number);

src/review/reviewer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { ReviewIssue } from "./types.js";
2-
import { writeFileSync, existsSync, readFileSync } from 'fs';
1+
import { writeFileSync } from 'fs';
32
import { tmpdir } from 'os';
43
import { join } from 'path';
54
import { v4 as uuidv4 } from 'uuid';

src/routes/github.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import jwt from 'jsonwebtoken';
44
import { readFileSync } from 'fs';
55
import { GitHubOAuthService } from '../github/oauth.js';
66
import { InstallationStore } from '../github/installation-store.js';
7-
import { WebhookManager } from '../github/webhook-manager.js';
87
import { GitHubInstallation } from '../types/installation.js';
98
import { GitHubPullRequestEvent } from '../github/types.js';
109
import { GitHubClient } from '../github/client.js';
@@ -15,7 +14,6 @@ import { processReview } from '../github/process-review.js';
1514
const github = new Hono();
1615
const oauthService = new GitHubOAuthService();
1716
const installationStore = new InstallationStore();
18-
const webhookManager = new WebhookManager();
1917

2018
// Initialize config and client for webhook route
2119
const config: Config = getConfig();
@@ -379,7 +377,6 @@ github.get('/callback', async (c) => {
379377
try {
380378
const installationId = c.req.query('installation_id');
381379
const setupAction = c.req.query('setup_action');
382-
const state = c.req.query('state'); // TODO: Validate state parameter
383380
const error = c.req.query('error');
384381

385382
if (error) {

0 commit comments

Comments
 (0)