Skip to content

Commit

Permalink
interactive is a valid topic (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemberTang authored Nov 10, 2023
1 parent 8181e4a commit 4298b75
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/repocop/src/rules/repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,18 @@ describe('Repository topics', () => {
expect(actual.topics).toEqual(true);
});

test(`Should validate repos with an interactive topic`, () => {
const repo: github_repositories = {
...nullRepo,
full_name: 'guardian/service-catalogue',
id: 1234n,
topics: ['interactive'],
};

const actual = repositoryRuleEvaluation(repo, [], []);
expect(actual.topics).toEqual(true);
});

test('Should return false when there are multiple recognised topics', () => {
// Having more than one recognised topic creates confusion about how the repo
// is being used, and could also confuse repocop.
Expand Down
1 change: 1 addition & 0 deletions packages/repocop/src/rules/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function hasTopics(repo: github_repositories): boolean {
'testing',
'documentation',
'production',
'interactive',
];

return (
Expand Down

0 comments on commit 4298b75

Please sign in to comment.