Skip to content

Commit

Permalink
Merge pull request #50 from buildbarn/fix-runid
Browse files Browse the repository at this point in the history
Fix run id
  • Loading branch information
trey-ivy authored Oct 24, 2024
2 parents d9d3a4d + 7d8fde9 commit ce9f563
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions frontend/src/components/SourceControlDisplay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@ const SourceControlDisplay: React.FC<{ sourceControlData: SourceControl | undefi
if (!ghUrl.endsWith("/")) {
ghUrl += "/"
}
const runURL = ghUrl + sourceControlData?.repoURL + "/actions/runs/" + "10976627244"
const repoUrl = ghUrl + sourceControlData?.repoURL
const runURL = repoUrl + "/actions/runs/" + sourceControlData?.runID
const actorURL = ghUrl + sourceControlData?.actor
const branchURL = ghUrl + sourceControlData?.repoURL + "/tree/" + sourceControlData?.branch
const commitURL = ghUrl + sourceControlData?.repoURL + "/commit/" + sourceControlData?.commitSha
const branchURL = repoUrl + "/tree/" + sourceControlData?.branch
const commitURL = repoUrl + "/commit/" + sourceControlData?.commitSha
const prParts = sourceControlData?.refs?.split("/") ?? ""
const prURL = ghUrl + sourceControlData?.repoURL + "/" + prParts[1] + "/" + prParts[2]
const prURL = repoUrl + "/" + prParts[1] + "/" + prParts[2]

return (
<Space direction="vertical" size="middle" style={{ display: 'flex' }} >
<PortalCard type="inner" icon={<BranchesOutlined />} titleBits={["Source Control Information"]}>
<Row>
<Space size="large">
<Descriptions bordered column={1}>
<Descriptions.Item label="Repository URL">
<Link target="_blank" href={sourceControlData?.repoURL ?? ""}>{sourceControlData?.repoURL}</Link>
<Descriptions.Item label="Repository">
<Link target="_blank" href={repoUrl}>{sourceControlData?.repoURL}</Link>
</Descriptions.Item>
<Descriptions.Item label="Branch Name">
<Descriptions.Item label="Branch">
<Link target="_blank" href={branchURL}> {sourceControlData?.branch}</Link>
</Descriptions.Item>
<Descriptions.Item label="Commit SHA">
Expand Down

0 comments on commit ce9f563

Please # to comment.