Skip to content
Merged
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
9 changes: 9 additions & 0 deletions src/githubHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,15 @@ export class GithubHelper {
milestoneReplacer(p1, '')
);

// Replace github.com URLs to other organizations with redirect.github.com to avoid backlink spam
let urlMassager = (str: string) => {
return 'redirect.github.com';
}

// Keep owner internal links/back links intact
reString = `((?:to|redirect\\.|www\\.)?github\\.com)(?!\\/${settings.github.owner}\\/)`;
str = str.replace(new RegExp(reString, 'g'), (_, p1) => urlMassager(p1));

//
// Label reference conversion
//
Expand Down