Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions fetchIssues.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { execSync } from "child_process";
import fs from "fs";

export const fetchIssues = (repo, issuesFilePath) => {
export const fetchIssues = ( repo, issuesFilePath, bufferSizeInMb = 10, issueLimit = 1000) => {
try {
console.log(`Fetching issues from ${repo}...`);
const issues = execSync(
`gh issue list --repo ${repo} --limit 1000 --state all --json title,body,labels`,
{ encoding: "utf8" }
`gh issue list --repo ${repo} --limit ${issueLimit} --state all --json title,body,labels`,
{ encoding: "utf8",
maxBuffer: 1024 * 1024 * bufferSizeInMb
}
);
fs.writeFileSync(issuesFilePath, issues);
console.info(`✅ Issues saved to ${issuesFilePath}.`);
Expand Down