mirror of https://github.com/harness/drone.git
fix: [code-1991]: fix small issues in merge message (#2090)
parent
4aa055f4e2
commit
7778dc1258
|
@ -553,6 +553,7 @@ export interface StringsMap {
|
|||
manageCredText: string
|
||||
markAsDraft: string
|
||||
matchPassword: string
|
||||
mergeBranchTitle: string
|
||||
mergeCheckInProgress: string
|
||||
mergeCommit: string
|
||||
mergeSetting: string
|
||||
|
|
|
@ -1174,3 +1174,4 @@ addOptionalCommitMessage: Add (optional) commit message
|
|||
confirmStrat: 'Confirm {{strat}}'
|
||||
waiting: Waiting
|
||||
changesRequestedBy: CHANGES REQUESTED BY
|
||||
mergeBranchTitle: Merge branch {{branchName}} of {{repoPath}} (#{{prNum}})
|
||||
|
|
|
@ -9,7 +9,7 @@ import { getErrorMessage, inlineMergeFormValues, type PRMergeOption } from 'util
|
|||
import { MergeStrategy } from 'utils/GitUtils'
|
||||
import mergeVideo from '../../../../videos/merge.mp4'
|
||||
import squashVideo from '../../../../videos/squash.mp4'
|
||||
import rebaseVideo from '../../../../videos/squash.mp4'
|
||||
import rebaseVideo from '../../../../videos/rebase.mp4'
|
||||
import css from './PullRequestActionsBox.module.scss'
|
||||
interface InlineMergeBoxProps {
|
||||
inlineMergeRef: React.RefObject<FormikProps<inlineMergeFormValues>>
|
||||
|
|
|
@ -230,7 +230,14 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
|
|||
if (pullReqCommits?.commits) {
|
||||
pullReqCommits?.commits.map(commit => {
|
||||
messageString += `* ${commit.message}\n`
|
||||
messageTitle = `${commit.title}`
|
||||
messageTitle =
|
||||
mergeOption.method === MergeStrategy.SQUASH
|
||||
? `${commit.title} (#${pullReqMetadata?.number})`
|
||||
: getString('mergeBranchTitle', {
|
||||
branchName: pullReqMetadata?.source_branch,
|
||||
repoPath: repoMetadata?.path,
|
||||
prNum: pullReqMetadata?.number
|
||||
})
|
||||
})
|
||||
}
|
||||
return {
|
||||
|
@ -521,12 +528,12 @@ const MergeInfo: React.FC<{ pullRequestMetadata: TypesPullReq }> = ({ pullReques
|
|||
str={getString('pr.prMergedBannerInfo')}
|
||||
vars={{
|
||||
user: (
|
||||
<Container padding={{ right: 'xsmall' }}>
|
||||
<Container padding={{ right: 'small' }}>
|
||||
<strong className={css.boldText}>{pullRequestMetadata.merger?.display_name}</strong>
|
||||
</Container>
|
||||
),
|
||||
source: (
|
||||
<Container padding={{ left: 'xsmall', right: 'xsmall' }}>
|
||||
<Container padding={{ left: 'small', right: 'small' }}>
|
||||
<strong className={cx(css.boldText, css.purpleContainer)}>
|
||||
<Icon name={CodeIcon.Merged} size={16} color={Color.PURPLE_700} />
|
||||
{pullRequestMetadata.source_branch}
|
||||
|
@ -534,7 +541,7 @@ const MergeInfo: React.FC<{ pullRequestMetadata: TypesPullReq }> = ({ pullReques
|
|||
</Container>
|
||||
),
|
||||
target: (
|
||||
<Container padding={{ left: 'xsmall', right: 'xsmall' }}>
|
||||
<Container padding={{ left: 'small', right: 'small' }}>
|
||||
<strong className={cx(css.boldText, css.purpleContainer)}>
|
||||
<Icon name={CodeIcon.Merged} size={16} color={Color.PURPLE_700} />
|
||||
{pullRequestMetadata.target_branch}
|
||||
|
|
Loading…
Reference in New Issue