mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-15 14:38:03 +02:00
fix: resolve eslint unused-var and useless-assignment warnings
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -66,7 +66,7 @@ export class GitHubRepository {
|
||||
const status = (error as { status?: number }).status;
|
||||
if (status === 404) {
|
||||
// Distinguish: does the repo itself still exist?
|
||||
let repoExists = false;
|
||||
let repoExists: boolean;
|
||||
try {
|
||||
await oct.repos.get({ owner: this.owner, repo: this.repo });
|
||||
repoExists = true;
|
||||
|
||||
@@ -5,7 +5,6 @@ import AnonymizedRepositoryModel from "../../core/model/anonymizedRepositories/a
|
||||
import ConferenceModel from "../../core/model/conference/conferences.model";
|
||||
import UserModel from "../../core/model/users/users.model";
|
||||
import { cacheQueue, downloadQueue, removeQueue } from "../../queue";
|
||||
import Repository from "../../core/Repository";
|
||||
import User from "../../core/User";
|
||||
import { ensureAuthenticated } from "./connection";
|
||||
import { handleError, getUser, isOwnerOrAdmin, getRepo } from "./route-utils";
|
||||
|
||||
@@ -13,7 +13,6 @@ import { getRepositoryFromGitHub } from "../../core/source/GitHubRepository";
|
||||
import gh = require("parse-github-url");
|
||||
import AnonymizedRepositoryModel from "../../core/model/anonymizedRepositories/anonymizedRepositories.model";
|
||||
import { IAnonymizedRepositoryDocument } from "../../core/model/anonymizedRepositories/anonymizedRepositories.types";
|
||||
import Repository from "../../core/Repository";
|
||||
import UserModel from "../../core/model/users/users.model";
|
||||
import ConferenceModel from "../../core/model/conference/conferences.model";
|
||||
import AnonymousError from "../../core/AnonymousError";
|
||||
@@ -622,7 +621,7 @@ router.post(
|
||||
try {
|
||||
const r = await oct.users.getByUsername({ username });
|
||||
ghUser = r.data;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
throw new AnonymousError("github_user_not_found", {
|
||||
object: { username },
|
||||
httpStatus: 404,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const { expect } = require("chai");
|
||||
const { Readable } = require("stream");
|
||||
|
||||
// Standalone test of the LFS-pointer detection shape used in
|
||||
// GitHubStream#resolveLfsPointer. We can't easily import that method (it's
|
||||
|
||||
Reference in New Issue
Block a user