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

Function ckGithub

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

Source from the content-addressed store, hash-verified

4006}
4007
4008function ckGithub({ comments, login = "github-actions[bot]", listThrows = false, authThrows = false } = {}) {
4009 return {
4010 rest: {
4011 users: {
4012 getAuthenticated: async () => {
4013 if (authThrows) throw new Error("auth unavailable");
4014 return { data: { login } };
4015 },
4016 },
4017 issues: {
4018 listComments: async () => {
4019 if (listThrows) throw new Error("listComments 503");
4020 return { data: comments || [] };
4021 },
4022 },
4023 },
4024 };
4025}
4026
4027function ckArgs(over = {}) {
4028 return Object.assign(

Calls

no outgoing calls

Tested by

no test coverage detected