简体   繁体   English

使用github API在javascript / jquery中创建链接

[英]Creating a link in javascript/jquery by using github api

In my commits table it shows the sha, author, message, and the date of the commit I made for a specific Github repo. 在我的提交表中,它显示了sha,作者,消息以及我为特定Github存储库所做的提交日期。 How can I make the message column a clickable link to the GutHub page that shows what I did for that commit 如何使消息列成为指向GutHub页面的可点击链接,该页面显示了我对该提交所做的操作

The code is under \\\\Repos 代码在\\\\Repos

http://codepen.io/anon/pen/GoRbPP http://codepen.io/anon/pen/GoRbPP

I modified your codepen to have the link you are asking for: 我修改了Codepen以获取您要求的链接:

var messageTd = $("<td>").append('<a target="_blank" href="' + commitData.html_url + '">' + commitData.commit.message + '</a>');

View it here: http://codepen.io/anon/pen/obNKZQ 在此处查看: http : //codepen.io/anon/pen/obNKZQ

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM