Skip to content

Commit

Permalink
Revert "fix(github): Better massageMarkdown implementation (#11133)"
Browse files Browse the repository at this point in the history
This reverts commit 0da13d1.
  • Loading branch information
rarkins authored Aug 10, 2021
1 parent 04fd4de commit bfdbbea
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 106 deletions.
5 changes: 1 addition & 4 deletions lib/platform/github/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7772,10 +7772,7 @@ Array [
]
`;
exports[`platform/github/index massageMarkdown(input) returns updated pr body 1`] = `
"[https://github.com/foo/bar/issues/5](https://togithub.com/foo/bar/issues/5) plus also [a link](https://togithub.com/foo/bar/issues/5)
"
`;
exports[`platform/github/index massageMarkdown(input) returns updated pr body 1`] = `"https://github.com/foo/bar/issues/5 plus also [a link](https://togithub.com/foo/bar/issues/5)"`;
exports[`platform/github/index mergePr(prNo) - autodetection should give up 1`] = `
Array [
Expand Down
3 changes: 1 addition & 2 deletions lib/platform/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import {
repoInfoQuery,
vulnerabilityAlertsQuery,
} from './graphql';
import { massageMarkdownLinks } from './massage-markdown-links';
import {
BranchProtection,
CombinedBranchStatus,
Expand Down Expand Up @@ -1570,7 +1569,7 @@ export function massageMarkdown(input: string): string {
if (config.isGhe) {
return smartTruncate(input, 60000);
}
const massagedInput = massageMarkdownLinks(input)
const massagedInput = input
// to be safe, replace all github.com links with renovatebot redirector
.replace(/href="https?:\/\/github.com\//g, 'href="https://togithub.com/')
.replace(/]\(https:\/\/github\.com\//g, '](https://togithub.com/')
Expand Down
35 changes: 0 additions & 35 deletions lib/platform/github/massage-markdown-links.spec.ts

This file was deleted.

55 changes: 0 additions & 55 deletions lib/platform/github/massage-markdown-links.ts

This file was deleted.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@
"luxon": "2.0.1",
"markdown-it": "12.2.0",
"markdown-table": "2.0.0",
"mdast-util-find-and-replace": "1.1.1",
"mdast-util-to-string": "2.0.0",
"minimatch": "3.0.4",
"moo": "0.5.1",
"node-html-parser": "3.3.6",
Expand All @@ -189,7 +187,6 @@
"simple-git": "2.42.0",
"slugify": "1.6.0",
"traverse": "0.6.6",
"unist-util-visit": "2.0.3",
"upath": "2.0.1",
"url-join": "4.0.1",
"validate-npm-package-name": "3.0.0",
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6507,7 +6507,7 @@ matcher@^3.0.0:
dependencies:
escape-string-regexp "^4.0.0"

mdast-util-find-and-replace@1.1.1, mdast-util-find-and-replace@^1.0.0:
mdast-util-find-and-replace@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz#b7db1e873f96f66588c321f1363069abf607d1b5"
integrity sha512-9cKl33Y21lyckGzpSmEQnIDjEfeeWelN5s1kUW1LwdB0Fkuq2u+4GdqcGEygYxJE8GVqCl0741bYXHgamfWAZA==
Expand Down Expand Up @@ -6539,16 +6539,16 @@ mdast-util-to-markdown@^0.6.0:
repeat-string "^1.0.0"
zwitch "^1.0.0"

[email protected], mdast-util-to-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b"
integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==

mdast-util-to-string@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz#27055500103f51637bd07d01da01eb1967a43527"
integrity sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==

mdast-util-to-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b"
integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==

mdurl@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
Expand Down Expand Up @@ -9455,7 +9455,7 @@ unist-util-visit-parents@^3.0.0:
"@types/unist" "^2.0.0"
unist-util-is "^4.0.0"

unist-util-visit@2.0.3, unist-util-visit@^2.0.0:
unist-util-visit@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.3.tgz#c3703893146df47203bb8a9795af47d7b971208c"
integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==
Expand Down

0 comments on commit bfdbbea

Please sign in to comment.