Skip to content

Commit 70c1dae

Browse files
committed
chore: update deps, fix undici CVEs, expand test coverage
Bump @actions/github ^6→^8 and @actions/core ^1→^2 to resolve three undici security advisories (GHSA-g9mf-h72j-4rw9, GHSA-2mjp-6q6p-2qxm, GHSA-4992-7rv2-5pvq). Add a manual Jest mock for @actions/github since its transitive dep @octokit/core@7 is ESM-only and incompatible with Jest's CJS runner. Expand tests from 16 to 34: add needPreviousIssue, issueExists, additional checkInputs edge cases, and run() integration tests covering issue creation, close-previous, linked-comments, milestone, rotate-assignees, and error handling. Rebuild dist.
1 parent 3566ae2 commit 70c1dae

5 files changed

Lines changed: 38489 additions & 36024 deletions

File tree

__mocks__/@actions/github.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'use strict';
2+
3+
const mockOctokit = {
4+
rest: {
5+
issues: {
6+
create: jest.fn(),
7+
update: jest.fn(),
8+
createComment: jest.fn(),
9+
listForRepo: jest.fn()
10+
},
11+
projects: {
12+
listForRepo: jest.fn(),
13+
listForUser: jest.fn(),
14+
listForOrg: jest.fn(),
15+
listColumns: jest.fn(),
16+
createCard: jest.fn()
17+
}
18+
},
19+
graphql: jest.fn(),
20+
paginate: {
21+
iterator: jest.fn()
22+
}
23+
};
24+
25+
module.exports = {
26+
context: {
27+
repo: { owner: 'owner', repo: 'repo' }
28+
},
29+
getOctokit: jest.fn().mockReturnValue(mockOctokit),
30+
mockOctokit
31+
};

0 commit comments

Comments
 (0)