mirror of
https://github.com/actions/labeler.git
synced 2025-12-11 12:07:32 +00:00
* Bump @actions/github from 2.2.0 to 5.0.0 Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 2.2.0 to 5.0.0. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) --- updated-dependencies: - dependency-name: "@actions/github" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * update licensed cache * Code changes to support github 5.0 * regenerate dist/index Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Patrick Ellis <patrick.j.ellis@gmail.com>
35 lines
585 B
TypeScript
35 lines
585 B
TypeScript
export const context = {
|
|
payload: {
|
|
pull_request: {
|
|
number: 123,
|
|
},
|
|
},
|
|
repo: {
|
|
owner: "monalisa",
|
|
repo: "helloworld",
|
|
},
|
|
};
|
|
|
|
const mockApi = {
|
|
rest: {
|
|
issues: {
|
|
addLabels: jest.fn(),
|
|
removeLabel: jest.fn(),
|
|
},
|
|
pulls: {
|
|
get: jest.fn().mockResolvedValue({}),
|
|
listFiles: {
|
|
endpoint: {
|
|
merge: jest.fn().mockReturnValue({}),
|
|
},
|
|
},
|
|
},
|
|
repos: {
|
|
getContent: jest.fn(),
|
|
},
|
|
},
|
|
paginate: jest.fn(),
|
|
};
|
|
|
|
export const getOctokit = jest.fn().mockImplementation(() => mockApi);
|