mirror of
https://github.com/actions/labeler
synced 2026-05-05 11:17:48 +02:00
36 lines
613 B
TypeScript
36 lines
613 B
TypeScript
export const context = {
|
|
payload: {
|
|
pull_request: {
|
|
number: 123,
|
|
},
|
|
},
|
|
repo: {
|
|
owner: "monalisa",
|
|
repo: "helloworld",
|
|
},
|
|
ref: "test/testing-time",
|
|
};
|
|
|
|
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);
|