Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.1.1^2
zouap 3 years ago
parent
commit
6f4e5de593
1 changed files with 17 additions and 7 deletions
  1. +17
    -7
      public/home/home.js

+ 17
- 7
public/home/home.js View File

@@ -170,18 +170,28 @@ function getPRText(record){
}

function getIssueLink(record){
return "/" + record.Repo.OwnerName + "/" + record.Repo.Name + "/issues/" + getIssueId(record);
}

function getIssueId(record){
var Id = "1";
if(!isEmpty(record.Comment)){
if(!isEmpty(record.Comment) && !isEmpty(record.Comment.Issue)){
Id = record.Comment.Issue.Index;
}else{
if(!isEmpty(record.Content)){
var content = record.Content;
var index = content.indexOf("|");
if(index != -1){
Id = record.substring(0,index);
}
}
}
return "/" + record.Repo.OwnerName + "/" + record.Repo.Name + "/issues/" + Id;
return Id;
}

function getIssueText(record){
var Id = "1";
if(!isEmpty(record.Comment)){
Id = record.Comment.Issue.Index;
}
return record.Repo.OwnerName + "/" + record.Repo.Name + "#" + Id;
return record.Repo.OwnerName + "/" + record.Repo.Name + "#" + getIssueId(record);
}

/*


Loading…
Cancel
Save