Skip to content

Commit

Permalink
[collector] Using index signature to access index properties
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Sep 12, 2024
1 parent 0da6fce commit c4ea58d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions packages/collector/__tests__/getProjectIssues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ describe("Working issue listing", () => {
beforeEach(() => {
nock("https://api.github.com")
.get("/repos/OWNER/REPO/issues")
.query((actualQueryObject) => actualQueryObject.labels === "help-wanted")
.query(
(actualQueryObject) => actualQueryObject["labels"] === "help-wanted",
)
.reply(200, [
{
body: "BODY_C",
Expand All @@ -18,7 +20,9 @@ describe("Working issue listing", () => {
]);
nock("https://api.github.com")
.get("/repos/OWNER/REPO/issues")
.query((actualQueryObject) => actualQueryObject.labels === "help wanted")
.query(
(actualQueryObject) => actualQueryObject["labels"] === "help wanted",
)
.reply(200, [
{
body: "BODY_I",
Expand Down Expand Up @@ -99,7 +103,7 @@ test("getProjectIssues auto-populates body", async () => {

nock("https://api.github.com")
.get("/repos/OWNER/REPO/issues")
.query((actualQueryObject) => actualQueryObject.labels === "help-wanted")
.query((actualQueryObject) => actualQueryObject["labels"] === "help-wanted")
.reply(200, [
{ html_url: "https://example.test", number: 1, title: "CORRECT" },
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/__tests__/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jest.mock("../src/octokit", () => {
const OctokitWithRest = Octokit.plugin(restEndpointMethods);
return {
octokit: new OctokitWithRest({
auth: process.env.PAT,
auth: process.env["PAT"],
request: {
fetch: nodeFetch,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/collector/src/octokit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";

// eslint-disable-next-line @typescript-eslint/naming-convention -- Classes should be PascalCase
const OctokitWithRest = Octokit.plugin(restEndpointMethods);
export const octokit = new OctokitWithRest({ auth: process.env.PAT });
export const octokit = new OctokitWithRest({ auth: process.env["PAT"] });

0 comments on commit c4ea58d

Please sign in to comment.