Skip to content

Commit adb6476

Browse files
authored
Merge pull request #17252 from github/repo-sync
repo sync
2 parents 30ca90e + 6b12ebd commit adb6476

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/get-redirect.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ export default function getRedirect(uri, context) {
184184
// finds one string replacement that yields either a page or a redirect.
185185
function tryReplacements(prefix, suffix, { pages, redirects }) {
186186
const test = (suffix) => {
187+
// This is a generally broad search and replace and this particular
188+
// replacement has never been present in api documentation only enterprise
189+
// admin documentation, so we're excluding the REST api pages
190+
if (suffix.includes('/rest')) {
191+
return false
192+
}
187193
const candidateAsRedirect = prefix + suffix
188194
const candidateAsURL = '/en' + candidateAsRedirect
189195
return candidateAsRedirect in redirects || candidateAsURL in pages

0 commit comments

Comments
 (0)