Skip to content

Commit 3d74f3f

Browse files
committed
chore: version bump
1 parent e037f5b commit 3d74f3f

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.6.4-beta-2",
3+
"version": "0.6.4-beta-3",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/GitCommitInfoGeneric/GitCommitInfoGeneric.tsx

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,32 @@ const GitCommitInfoGeneric = ({
6262
? lowerCaseCommitInfo.commiturl
6363
: createGitCommitUrl(materialUrl, lowerCaseCommitInfo.commit)
6464

65+
const renderBranchName = (branchName: string) =>
66+
branchName ? (
67+
<a
68+
href={getGitBranchUrl(materialUrl, branchName)}
69+
target="_blank"
70+
rel="noopener noreferrer"
71+
className="commit-hash fs-14 px-6 mono"
72+
onClick={stopPropagation}
73+
>
74+
{branchName}
75+
</a>
76+
) : null
77+
6578
function renderBasicGitCommitInfoForWebhook() {
6679
const _date = getWebhookDate(materialSourceType, commitInfo)
6780
return (
6881
<div className="flex column dc__gap-4 w-100">
82+
<div className="flex left lh-20 dc__gap-8 w-100">
83+
<PullRequestIcon className="icon-dim-16" />
84+
<div className="flex left dc__gap-4">
85+
Merge commit into&nbsp;
86+
{renderBranchName(_webhookData.data['target branch name'])}
87+
&nbsp;from&nbsp;
88+
{renderBranchName(_webhookData.data['source branch name'])}
89+
</div>
90+
</div>
6991
{_webhookData.data.author ? (
7092
<div className="material-history__text lh-20 flex left dc__gap-8 w-100">
7193
<PersonIcon className="icon-dim-16" /> {_webhookData.data.author}
@@ -213,26 +235,12 @@ const GitCommitInfoGeneric = ({
213235
)
214236
}
215237

216-
const renderBranchName = (branchName: string) =>
217-
branchName ? (
218-
<a
219-
href={getGitBranchUrl(materialUrl, branchName)}
220-
target="_blank"
221-
rel="noopener noreferrer"
222-
className="commit-hash fs-14 px-6 mono"
223-
onClick={stopPropagation}
224-
>
225-
{branchName}
226-
</a>
227-
) : null
228-
229238
const renderPRInfoCard = () =>
230239
_isWebhook &&
231240
_webhookData.eventactiontype === WEBHOOK_EVENT_ACTION_TYPE.MERGED && (
232-
<div className="flex column dc__gap-8">
233-
{renderPullRequestId(_webhookData.data['git url'])}
241+
<div className="flex column left dc__gap-8">
234242
<div className="flex dc__content-space w-100">
235-
{renderWebhookTitle()}
243+
{renderPullRequestId(_webhookData.data['git url'])}
236244
{selectedCommitInfo ? (
237245
<div className="flexbox dc__align-items-center dc__content-end fs-12">
238246
{lowerCaseCommitInfo.isselected ? (
@@ -243,16 +251,7 @@ const GitCommitInfoGeneric = ({
243251
</div>
244252
) : null}
245253
</div>
246-
247-
<div className="flex left lh-20 dc__gap-8 w-100">
248-
<PullRequestIcon className="icon-dim-16" />
249-
<div className="flex left dc__gap-4">
250-
Merge commit into&nbsp;
251-
{renderBranchName(_webhookData.data['target branch name'])}
252-
&nbsp;from&nbsp;
253-
{renderBranchName(_webhookData.data['source branch name'])}
254-
</div>
255-
</div>
254+
{renderWebhookTitle()}
256255
{renderBasicGitCommitInfoForWebhook()}
257256
{handleMoreDataForWebhook()}
258257
</div>

0 commit comments

Comments
 (0)