Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
d953fb63f4 build(deps-dev): bump js-yaml from 4.1.1 to 4.2.0
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.2.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-28 15:13:22 +00:00
6 changed files with 17 additions and 42 deletions

View File

@@ -569,8 +569,6 @@ A comma separated list of allowed issue types. Only issues with a matching type
If unset (or an empty string), this option will not alter the stale workflow.
This option does not affect PRs.
Default value: unset
### Usage

View File

@@ -122,37 +122,4 @@ describe('only-issue-types option', () => {
'A feature'
]);
});
test('should ignore onlyIssueTypes filter when item is a pull request', async () => {
const opts: IIssuesProcessorOptions = {
...DefaultProcessorOptions,
onlyIssueTypes: 'bug'
};
const TestIssueList: Issue[] = [
generateIssue(
opts,
1,
'A pull request',
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
true, // isPullRequest = true
[],
false,
false,
undefined,
[],
undefined // pull requests do not have an issue_type
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => new Date().toDateString()
);
await processor.processIssues(1);
expect(processor.staleIssues.map(i => i.title)).toEqual(['A pull request']);
});
});

2
dist/index.js vendored
View File

@@ -513,7 +513,7 @@ class IssuesProcessor {
IssuesProcessor._endIssueProcessing(issue);
return; // If the issue has an 'include-only-assigned' option set, process only issues with nonempty assignees list
}
if (this.options.onlyIssueTypes && !issue.isPullRequest) {
if (this.options.onlyIssueTypes) {
const allowedTypes = this.options.onlyIssueTypes
.split(',')
.map(t => t.trim().toLowerCase())

18
package-lock.json generated
View File

@@ -33,7 +33,7 @@
"jest": "^29.6.2",
"jest-circus": "^29.5.0",
"jest-silent-reporter": "^0.5.0",
"js-yaml": "^4.1.1",
"js-yaml": "^4.2.0",
"prettier": "^2.8.7",
"standard-version": "^9.3.1",
"terminal-link": "^2.1.1",
@@ -5387,10 +5387,20 @@
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
"integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"

View File

@@ -61,7 +61,7 @@
"jest": "^29.6.2",
"jest-circus": "^29.5.0",
"jest-silent-reporter": "^0.5.0",
"js-yaml": "^4.1.1",
"js-yaml": "^4.2.0",
"prettier": "^2.8.7",
"standard-version": "^9.3.1",
"terminal-link": "^2.1.1",

View File

@@ -252,7 +252,7 @@ export class IssuesProcessor {
return; // If the issue has an 'include-only-assigned' option set, process only issues with nonempty assignees list
}
if (this.options.onlyIssueTypes && !issue.isPullRequest) {
if (this.options.onlyIssueTypes) {
const allowedTypes = this.options.onlyIssueTypes
.split(',')
.map(t => t.trim().toLowerCase())