Skip to content

Commit

Permalink
Add support to the restricted names list (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
srallen authored Jul 22, 2019
1 parent cccb629 commit b796481
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/default-transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const userLinker = /(^|\s)@([\w\-.]+\b)/g;
export default function (input, { project, baseURI }) {
let owner;
let name;
const restrictedUserNames = ['admins', 'moderators', 'researchers', 'scientists', 'team'];
const restrictedUserNames = ['admins', 'moderators', 'researchers', 'scientists', 'team', 'support'];
const prefix = baseURI || '';

if (project) {
Expand Down
4 changes: 2 additions & 2 deletions test/default-transformer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ describe('default-transformer', () => {
});

it('it ignores restricted usernames', () => {
const userLink = replaceSymbols('@admins @moderators @team @researchers @scientists', { project, baseURI });
expect(userLink).to.equal('@admins @moderators @team @researchers @scientists');
const userLink = replaceSymbols('@admins @moderators @team @researchers @scientists @support', { project, baseURI });
expect(userLink).to.equal('@admins @moderators @team @researchers @scientists @support');
});

it('replaces @ownerslug/project-slug^S<subject_id> mentions with links', () => {
Expand Down

0 comments on commit b796481

Please sign in to comment.