Copy motorola jira id and summary and link

Add three button to copy the jira id and summary and link

< 腳本Copy motorola jira id and summary and link的回應

評論:正評 - 腳本一切正常

§
發表於:2021-11-15

feat: add 'Copy branch name'

const newElement0 = document.createElement("li");
const branchE = document.createElement("a");
branchE.innerHTML="Copy branch name";
branchE.className="aui-button aui-button-primary aui-style";
branchE.id="copy_branch_name";
branchE.onclick= (e) => {
    var snackbar = document.getElementById("snackbar");
    snackbar.className = "show";

    const issueTypeMap = {
        task: 'feat',
        defect: 'fix'
    }
    const issueType = issueTypeMap[document.getElementById('type-val').childNodes[2].data.trim().toLowerCase()]


    navigator.clipboard.writeText(`${issueType}/xuzili/${issueKey.childNodes[0].data}`);
    //console.log("CopyId_"+ issueKey.childNodes[0].data);

    setTimeout(function(){
        snackbar.className = snackbar.className.replace("show", "");
    }, 1500);
};
newElement0.appendChild(branchE);
issueKey.parentNode.parentNode.appendChild(newElement0);
AndyWing作者
§
發表於:2023-07-06

you can add this in your local code which may used for yourself
'fix/xuzili/*'

發表回覆

登入以回復

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址