Skip to content

Commit 09d10b9

Browse files
er0kclaude
andcommitted
Add regression test for missing visibility field
Address coderabbit review: cover the case where a private repo has no visibility field. The repo must still be excluded when exclude.private is true. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e33872d commit 09d10b9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎packages/backend/src/github.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,16 @@ test('shouldExcludeRepo does not exclude internal repos when exclude.private is
238238
expect(shouldExcludeRepo({ repo: internalRepo, exclude: { private: true } })).toBe(false);
239239
});
240240

241+
test('shouldExcludeRepo excludes private repos with missing visibility when exclude.private is true', () => {
242+
const repo = {
243+
full_name: 'test/private-no-visibility',
244+
clone_url: 'https://github.com/test/private-no-visibility.git',
245+
private: true,
246+
} as OctokitRepository;
247+
248+
expect(shouldExcludeRepo({ repo, exclude: { private: true } })).toBe(true);
249+
});
250+
241251
test('shouldExcludeRepo handles include.topics correctly', () => {
242252
const repo = {
243253
full_name: 'test/repo',

0 commit comments

Comments
 (0)