Skip to content

Commit

Permalink
fix: Skip creating the Owlbot post-processor check if .OwlBot.lock.ya…
Browse files Browse the repository at this point in the history
…ml does not exist. (#5312)
  • Loading branch information
blakeli0 committed Apr 23, 2024
1 parent 24b9633 commit bd7356e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
13 changes: 4 additions & 9 deletions packages/owl-bot/src/owl-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,10 @@ const runPostProcessor = async (
return;
}
if (!lockText) {
logger.info(`no .OwlBot.lock.yaml found for ${opts.head}`);
// If OwlBot is not configured on repo, indicate success. This makes
// it easier to enable OwlBot as a required check during migration:
await createCheck({
text: 'OwlBot is not yet enabled on this repository',
summary: 'OwlBot is not yet enabled on this repository',
conclusion: 'success',
title: '🦉 OwlBot - success',
});
// If OwlBot is not configured on a repo, skip creating the check.
logger.info(
`no .OwlBot.lock.yaml found for ${opts.head}, skip creating the check.`
);
return;
}
try {
Expand Down
5 changes: 1 addition & 4 deletions packages/owl-bot/test/owl-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1567,10 +1567,7 @@ describe('OwlBot', () => {
payload: payload as any,
id: 'abc123',
});
sandbox.assert.calledWith(
createCheckStub,
sinon.match.has('conclusion', 'success')
);
sandbox.assert.notCalled(createCheckStub);
githubMock.done();
});
it('returns early and adds success status if base is not default branch', async () => {
Expand Down

0 comments on commit bd7356e

Please sign in to comment.