Skip to content

Commit 58a08b7

Browse files
Copilotbartlomieju
andcommitted
Address code review feedback and add workflow permissions
Co-authored-by: bartlomieju <13602871+bartlomieju@users.noreply.github.com>
1 parent 05a6201 commit 58a08b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/issue_pr_insights.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313
jobs:
1414
insights:
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
1618
steps:
1719
- name: Checkout
1820
uses: actions/checkout@v6

tools/issue_pr_insights.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ interface GitHubItem {
4040
html_url: string;
4141
created_at: string;
4242
comments: number;
43+
pull_request?: unknown;
4344
}
4445

4546
async function getLastRunTimestamp(): Promise<string | null> {
@@ -237,10 +238,7 @@ async function main() {
237238
]);
238239

239240
// Filter out pull requests from the issues endpoint results
240-
const newIssues = allIssueItems.filter(
241-
// deno-lint-ignore no-explicit-any
242-
(item: any) => !item.pull_request,
243-
);
241+
const newIssues = allIssueItems.filter((item) => !item.pull_request);
244242
const newPRs = allPRs;
245243

246244
const noResponseIssues = newIssues.filter((i) => i.comments === 0);

0 commit comments

Comments
 (0)