Last active
August 27, 2018 20:58
-
-
Save gustiando/7c808f2092e85d3612f1 to your computer and use it in GitHub Desktop.
[VTS GitHub PR Template] Generates PR Template #Template #GitHub
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
PR_JIRA_ISSUE=`g s | cut -d '/' -f 2` | |
BRANCH_DESCRIPTION=`g s | cut -d '/' -f 3` | |
PR_TITLE="${BRANCH_DESCRIPTION//-/ }" | |
g pull-request -r "viewthespace/convertibles" -l "qa" -m "[$PR_JIRA_ISSUE] $PR_TITLE This PR will... @viewthespace/convertibles" -e |
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
javascript:(function() { | |
const prTitle = document.querySelector('#pull_request_title'); | |
const branchName = document.querySelector(".branch span[title^='compare:']").innerHTML; | |
prTitle.value = '[' + branchName.split('/')[1].toUpperCase().replace(' ', '-') + '] ' + branchName.split('/')[2].replace(new RegExp('-', 'g'), ' '); | |
const prBody = document.getElementById('pull_request_body'); prBody.value += 'This PR will... \n\ncc @viewthespace/convertibles'; | |
document.querySelector('.discussion-sidebar-heading').click(); | |
setTimeout(function () { | |
Array.prototype.slice.call(document.querySelectorAll('.js-username')).filter(function (el) { | |
return el.innerText === 'viewthespace/convertibles'; | |
})[0].click(); | |
document.querySelector('.discussion-sidebar-heading').click(); | |
}, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment