Skip to content

Commit

Permalink
Add disable github comment env var (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnolte authored Feb 13, 2025
1 parent b1b81fb commit 7248d66
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/handlers/testing/exec/util/run-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,19 @@ export class RunManager {
.min(1)
.safeParse(process.env.GITHUB_TOKEN);

if (githubToken.success) {
const disableGithubComment = z
.string()
.trim()
.optional()
.safeParse(process.env.AUTOBLOCKS_DISABLE_GITHUB_COMMENT);

if (disableGithubComment.success && disableGithubComment.data === '1') {
emitter.emit(EventName.CONSOLE_LOG, {
ctx: 'cli',
level: 'info',
message: 'GitHub comment disabled, skipping GitHub comment.',
});
} else if (githubToken.success) {
const gitHubPromise = this.post(
`/builds/${this.ciBuildId}/github-comment`,
{
Expand Down

0 comments on commit 7248d66

Please sign in to comment.