@@ -36,51 +36,63 @@ export function BuildDetailsSidebarContent(props: BuildDetailsSidebarContentProp
36
36
return < Alert type = "error" > No build details found</ Alert > ;
37
37
}
38
38
39
+ // TODO: Linkify
39
40
const vcsInfoContentItems : KeyValueDataContentProps [ ] = [
40
41
{
41
42
item : {
42
43
key : 'SHA' ,
43
44
subject : 'SHA' ,
44
- value : buildDetailsData . vcs_info ?. commit_id ?? '-' ,
45
+ value : buildDetailsData . vcs_info . head_sha ?? '-' ,
45
46
} ,
46
47
} ,
47
48
{
48
49
item : {
49
50
key : 'Base SHA' ,
50
51
subject : 'Base SHA' ,
51
- value : '-' , // TODO: Implement in the future when available
52
- } ,
53
- } ,
54
- {
55
- item : {
56
- key : 'Previous SHA' ,
57
- subject : 'Previous SHA' ,
58
- value : '-' , // TODO: Implement in the future when available
52
+ value : buildDetailsData . vcs_info . base_sha ?? '-' ,
59
53
} ,
60
54
} ,
61
55
{
62
56
item : {
63
57
key : 'PR Number' ,
64
58
subject : 'PR Number' ,
65
- value : '-' , // TODO: Implement in the future when available
59
+ value : buildDetailsData . vcs_info . pr_number ?? '-' ,
66
60
} ,
67
61
} ,
68
62
{
69
63
item : {
70
64
key : 'Branch' ,
71
65
subject : 'Branch' ,
72
- value : '-' , // TODO: Implement in the future when available
66
+ value : buildDetailsData . vcs_info . head_ref ?? '-' ,
67
+ } ,
68
+ } ,
69
+ {
70
+ item : {
71
+ key : 'Base Branch' ,
72
+ subject : 'Base Branch' ,
73
+ value : buildDetailsData . vcs_info . base_ref ?? '-' ,
73
74
} ,
74
75
} ,
75
76
{
76
77
item : {
77
78
key : 'Repo Name' ,
78
79
subject : 'Repo Name' ,
79
- value : '-' , // TODO: Implement in the future when available
80
+ value : buildDetailsData . vcs_info . head_repo_name ?? '-' ,
80
81
} ,
81
82
} ,
82
83
] ;
83
84
85
+ // Base repo name is only available for forks, so we shouldn't show it if it's not present
86
+ if ( buildDetailsData . vcs_info . base_repo_name ) {
87
+ vcsInfoContentItems . push ( {
88
+ item : {
89
+ key : 'Base Repo Name' ,
90
+ subject : 'Base Repo Name' ,
91
+ value : buildDetailsData . vcs_info . base_repo_name ,
92
+ } ,
93
+ } ) ;
94
+ }
95
+
84
96
return (
85
97
< Flex direction = "column" gap = "2xl" >
86
98
{ /* App info */ }
0 commit comments