MCPcopy Create free account
hub / github.com/alibaba/open-code-review / ckGithub

Function ckGithub

scripts/github-actions/post-review-comments.test.js:3384–3401  ·  view source on GitHub ↗
({ comments, login = "github-actions[bot]", listThrows = false, authThrows = false } = {})

Source from the content-addressed store, hash-verified

3382}
3383
3384function ckGithub({ comments, login = "github-actions[bot]", listThrows = false, authThrows = false } = {}) {
3385 return {
3386 rest: {
3387 users: {
3388 getAuthenticated: async () => {
3389 if (authThrows) throw new Error("auth unavailable");
3390 return { data: { login } };
3391 },
3392 },
3393 issues: {
3394 listComments: async () => {
3395 if (listThrows) throw new Error("listComments 503");
3396 return { data: comments || [] };
3397 },
3398 },
3399 },
3400 };
3401}
3402
3403function ckArgs(over = {}) {
3404 return Object.assign(

Calls

no outgoing calls

Tested by

no test coverage detected