Skip to content

Commit 79c7e20

Browse files
fix to handle ALL issues, and exclude PR's
1 parent 3273b88 commit 79c7e20

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

.github/workflows/closeOnRelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Close issues marked 'fixed-pending-release' upon a release.
27-
uses: gcampbell-msft/fixed-pending-release@0.0.9
27+
uses: gcampbell-msft/fixed-pending-release@0.0.10
2828
with:
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030
label: ${{ inputs.label }}

dist/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27015,11 +27015,12 @@ async function run() {
2701527015

2701627016
const label = core.getInput("label", { required: false }) || "fixed-pending-release";
2701727017

27018-
const issuesPendingRelease = (await octokit.rest.issues.listForRepo({
27018+
const issuesPendingRelease = (await octokit.paginate(octokit.rest.issues.listForRepo, {
2701927019
owner,
2702027020
repo,
27021-
state: "open"
27022-
})).data.filter(i => i.labels.map(l => l.name).includes(label));
27021+
state: "open",
27022+
per_page: 100
27023+
})).filter(i => i.pull_request === undefined && i.labels.map(l => l.name).includes(label));
2702327024

2702427025
// Get the message template from the user input
2702527026
const externalReleaseDefault = ":tada: This issue has now been fixed and is available in the latest release! :tada:";

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ async function run() {
1010

1111
const label = core.getInput("label", { required: false }) || "fixed-pending-release";
1212

13-
const issuesPendingRelease = (await octokit.rest.issues.listForRepo({
13+
const issuesPendingRelease = (await octokit.paginate(octokit.rest.issues.listForRepo, {
1414
owner,
1515
repo,
16-
state: "open"
17-
})).data.filter(i => i.labels.map(l => l.name).includes(label));
16+
state: "open",
17+
per_page: 100
18+
})).filter(i => i.pull_request === undefined && i.labels.map(l => l.name).includes(label));
1819

1920
// Get the message template from the user input
2021
const externalReleaseDefault = ":tada: This issue has now been fixed and is available in the latest release! :tada:";

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "close-issues-on-release",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "GitHub Action that closes issues marked as fixed upon release",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)