Created
January 3, 2018 10:56
-
-
Save juliandescottes/045bd48d3d0b006a33225ab67f909d9b to your computer and use it in GitHub Desktop.
Create debugger html compare URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function createCompareURL(attachmentUrl) { | |
let attachment = await fetch(attachmentUrl); | |
let patch = await attachment.text(); | |
let oldHash = patch.match(/\-Taken from upstream commit: ([a-f0-9]+)\n/)[1]; | |
let newHash = patch.match(/\+Taken from upstream commit: ([a-f0-9]+)\n/)[1]; | |
let compareUrl = | |
`https://github.com/devtools-html/debugger.html/compare/${oldHash}...${newHash}`; | |
console.log(compareUrl); | |
} | |
createCompareURL("https://bug1427187.bmoattachments.org/attachment.cgi?id=8938964"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment