diff --git a/action.yml b/action.yml index ca46abd..bffada4 100644 --- a/action.yml +++ b/action.yml @@ -38,4 +38,4 @@ outputs: runs: using: 'docker' - image: 'docker://ghcr.io/paritytech/stale-issues-finder/action:0.0.5' + image: 'docker://ghcr.io/paritytech/stale-issues-finder/action:0.0.6' diff --git a/package.json b/package.json index 9d7842e..fedfe6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stale-issues-finder", - "version": "0.0.5", + "version": "0.0.6", "description": "Find what issues have been stale for a given time", "main": "src/index.ts", "engines": { diff --git a/src/github/issuesParser.ts b/src/github/issuesParser.ts index 8ffbd90..1d77ef0 100644 --- a/src/github/issuesParser.ts +++ b/src/github/issuesParser.ts @@ -11,7 +11,9 @@ const getAllIssues = async (octokit: InstanceType, repo: Repo): P const perPage = 100; let currentPage = 1; const { data } = await listForRepo(octokit, repo, perPage, currentPage); - let issues = data; + + // GitHub's REST API v3 considers every pull request an issue so we need to get objects without the PR key + let issues = data.filter(data => !data.pull_request); let fullPage = issues.length > 99; while (fullPage) { currentPage++;