Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 2, 2023. It is now read-only.
/golangci-webPublic archive

Commitd8d4f7a

Browse files
committed
show default branch on repo report
1 parent6df5226 commitd8d4f7a

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

‎src/components/pages/Report.tsx‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class Report extends React.Component<IProps> {
212212
`${codeLink}/commit/${ca.CommitSHA}`;
213213
constcodeName=isPr ?`${ca.GithubRepoName}#${ca.GithubPullRequestNumber}` :ca.GithubRepoName;
214214
constcodeId=isPr ?"Pull Request" :"Repo";
215-
consttable=[
215+
lettable=[
216216
{
217217
key:"row1",
218218
a:codeId,
@@ -223,17 +223,28 @@ class Report extends React.Component<IProps> {
223223
a:"Commit",
224224
b:(<atarget="_blank"href={commitLink}>{ca.CommitSHA.substring(0,7)}</a>),
225225
},
226+
];
227+
228+
if(ca.RepoAnalysisStatus&&ca.RepoAnalysisStatus.DefaultBranch){
229+
table.push({
230+
key:"row5",
231+
a:"Default Branch",
232+
b:<>{ca.RepoAnalysisStatus.DefaultBranch}</>,
233+
});
234+
}
235+
236+
table=table.concat([
226237
{
227238
key:"row4",
228239
a:"Analyzed",
229-
b:moment(ca.CreatedAt).fromNow(),
240+
b:<>{moment(ca.CreatedAt).fromNow()}</>,
230241
},
231242
{
232243
key:"row3",
233244
a:"Status",
234-
b:status,
245+
b:<>{status}</>,
235246
},
236-
];
247+
]);
237248

238249
return(
239250
<Table

‎src/modules/analyzes/index.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export interface IAnalysisState {
3939
IsPreparing?:boolean;
4040
RepoIsNotConnected?:boolean;
4141
IsEmpty?:boolean;
42+
RepoAnalysisStatus?:IRepoAnalysisStatus;
43+
}
44+
45+
interfaceIRepoAnalysisStatus{
46+
DefaultBranch:string;
4247
}
4348

4449
interfaceIAnalysisResultJSON{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp