MCPcopy Create free account
hub / github.com/MatteoGabriele/agentscan / completeCheckRun

Function completeCheckRun

server/api/webhook/github/index.post.ts:142–164  ·  view source on GitHub ↗
(
    conclusion: CheckConclusion,
    title: string,
    summary: string,
  )

Source from the content-addressed store, hash-verified

140 const privateKey = Buffer.from(config.githubAppPrivateKey, 'base64').toString(
141 'utf-8',
142 )
143
144 const app = new App({
145 appId: config.githubAppId,
146 privateKey,
147 webhooks: { secret: config.githubWebhookSecret },
148 })
149
150 const octokit = await app.getInstallationOctokit(payload.installation.id)
151
152 const owner: string = payload.repository.owner.login
153 const repo: string = payload.repository.name
154
155 let repoConfig: RepoConfig = DEFAULT_CONFIG
156 try {
157 const { data } = await octokit.rest.repos.getContent({
158 owner,
159 repo,
160 path: '.github/agentscan.yml',
161 })
162
163 if ('content' in data) {
164 repoConfig = parseRepoConfig(
165 Buffer.from(data.content, 'base64').toString('utf-8'),
166 )
167 }

Callers 1

index.post.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected