Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to the restricted names list #83

Merged
merged 1 commit into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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