File tree Expand file tree Collapse file tree 11 files changed +52
-26
lines changed
Expand file tree Collapse file tree 11 files changed +52
-26
lines changed Original file line number Diff line number Diff line change 303303 <ReduxResult {projectId } {stackId } result ={prQuery ?.result }>
304304 {#snippet children (pr )}
305305 <ContextMenuSection >
306- <ContextMenuItemSubmenu label =" Pull Request " icon =" pr" >
306+ <ContextMenuItemSubmenu label ={ forge . reviewUnitName } icon =" pr" >
307307 {#snippet submenu ({ close: closeSubmenu })}
308308 <ContextMenuSection >
309309 <ContextMenuItem
310- label =" Open PR in browser"
310+ label ="Open { forge . reviewUnitAbbr } in browser"
311311 testId ={TestId .BranchHeaderContextMenu_OpenPRInBrowser }
312312 onclick ={() => {
313313 urlService .openExternalUrl (pr .htmlUrl );
316316 }}
317317 />
318318 <ContextMenuItem
319- label =" Copy PR link"
319+ label ="Copy { forge . reviewUnitAbbr } link"
320320 testId ={TestId .BranchHeaderContextMenu_CopyPRLink }
321321 onclick ={() => {
322- clipboardService .write (pr .htmlUrl , { message: ' PR link copied' });
322+ clipboardService .write (pr .htmlUrl , {
323+ message: ` ${forge .reviewUnitAbbr } link copied `
324+ });
323325 closeSubmenu ();
324326 close ();
325327 }}
Original file line number Diff line number Diff line change 4949 <Modal
5050 width =" small"
5151 type =" warning"
52- title =" Create Pull Request "
52+ title ="Create { forge . reviewUnitName } "
5353 bind:this ={confirmCreatePrModal }
5454 onSubmit ={() => {
5555 modal ?.show ();
5656 }}
5757 >
5858 <p class =" text-13 text-body helper-text" >
59- It's strongly recommended to create pull requests starting with the branch at the base of the
60- stack.
59+ It's strongly recommended to create { forge . reviewUnitName . toLowerCase ()}s starting with the
60+ branch at the base of the stack.
6161 <br />
62- Do you still want to create this pull request ?
62+ Do you still want to create this { forge . reviewUnitName . toLowerCase ()} ?
6363 </p >
6464 {#snippet controls (close )}
6565 <Button kind ="outline" onclick ={close }>Cancel</Button >
66- <Button style =" warning" type =" submit" >Create Pull Request </Button >
66+ <Button style ="warning" type ="submit" >Create { forge . reviewUnitName } </Button >
6767 {/ snippet }
6868 </Modal >
6969
Original file line number Diff line number Diff line change 334334 icon =" workbench"
335335 onclick ={applyFromFork }
336336 >
337- Apply PR to workspace
337+ Apply { forge . reviewUnitAbbr } to workspace
338338 </Button >
339339 {/if }
340340 </div >
Original file line number Diff line number Diff line change 110110
111111 <Modal
112112 testId ={TestId .BranchesView_CreateRemoteModal }
113- title =" Apply Pull Request "
113+ title ="Apply { forge . reviewUnitName } "
114114 width =" small"
115115 bind:this ={createRemoteModal }
116116 onSubmit ={async () => await handleConfirmRemote (pr )}
Original file line number Diff line number Diff line change 2626
2727 const canPublishPR = $derived (forge .current .authenticated && ! pr );
2828
29- const ctaLabel = ' Create Pull Request… ' ;
29+ const ctaLabel = $derived ( ` Create ${ forge . reviewUnitName }… ` ) ;
3030
3131 export const imports = {
3232 get allowedToPublishPR() {
Original file line number Diff line number Diff line change 1616 const forge = inject (DEFAULT_FORGE_FACTORY );
1717 const prService = $derived (forge .current .prService );
1818 const prQuery = $derived (prService ?.get (prNumber , { forceRefetch: true }));
19- const unitSymbol = $derived (prService ?.unit .symbol ?? ' ' );
2019 </script >
2120
2221<ReduxResult result ={prQuery ?.result } {projectId } {onerror }>
2322 {#snippet children (pr )}
2423 <Drawer testId ={TestId .PRBranchDrawer } persistId ="pr-branch-drawer- {projectId }- {pr .number }" >
2524 {#snippet header ()}
2625 <h3 class =" text-14 text-semibold truncate" >
27- <span class ="clr-text-2" >PR {unitSymbol }{pr .number }:</span >
26+ <span class ="clr-text-2" >{forge .reviewUnitAbbr } {forge .reviewUnitSymbol }{pr .number }:</span
27+ >
2828 <span > {pr .title }</span >
2929 </h3 >
3030 {/ snippet }
Original file line number Diff line number Diff line change 126126 <ContextMenuItem
127127 label =" Copy link"
128128 onclick ={() => {
129- clipboardService .write (pr .htmlUrl , { message: ' PR link copied' });
129+ clipboardService .write (pr .htmlUrl , { message: ` ${ abbr } link copied` });
130130 contextMenuEl ?.close ();
131131 }}
132132 />
179179 icon =" copy-small"
180180 tooltip ="Copy {abbr } link"
181181 onclick ={() => {
182- clipboardService .write (pr .htmlUrl , { message: ' PR link copied' });
182+ clipboardService .write (pr .htmlUrl , { message: ` ${ abbr } link copied` });
183183 }}
184184 />
185185 <Button
Original file line number Diff line number Diff line change 423423 onClose ();
424424 }
425425 })}
426- placeholder =" PR title"
426+ placeholder =" { forge . reviewUnitAbbr } title"
427427 showCount ={false }
428428 oninput ={imeHandler .handleInput ((e : Event ) => {
429429 const target = e .target as HTMLInputElement ;
439439 initialValue ={$prBody }
440440 enableFileUpload
441441 enableSmiles
442- placeholder =" PR Description"
442+ placeholder =" { forge . reviewUnitAbbr } Description"
443443 messageType =" pr"
444+ reviewUnitAbbr ={forge .reviewUnitAbbr }
444445 {onAiButtonClick }
445446 {canUseAI }
446447 {aiIsLoading }
Original file line number Diff line number Diff line change 6161 forceSansFont? : boolean ;
6262 useRuler? : boolean ;
6363 messageType: ' commit' | ' pr' ;
64+ reviewUnitAbbr? : string ;
6465 }
6566
6667 let {
8081 testId,
8182 forceSansFont,
8283 useRuler,
83- messageType
84+ messageType,
85+ reviewUnitAbbr
8486 }: Props = $props ();
8587
8688 const MIN_RULER_VALUE = 30 ;
230232 medium: 320
231233 };
232234
233- const GENERATE_MESSAGES : Record < typeof messageType , string > = {
235+ const generateMessages = $derived . by (() => ( {
234236 commit: ' Generate commit message' ,
235- pr: ' Generate PR description'
236- };
237+ pr: ` Generate ${ reviewUnitAbbr ?? ' PR ' } description `
238+ })) ;
237239
238240 function getTooltipText(): string | undefined {
239241 if (! canUseAI ) {
240242 return ' You need to enable AI in the project settings to use this feature' ;
241243 }
242244 if (currentEditorWidth <= DROPDOWN_BTN_BREAKPOINTS .medium ) {
243- return GENERATE_MESSAGES [messageType ];
245+ return generateMessages [messageType ];
244246 }
245247 return undefined ;
246248 }
Original file line number Diff line number Diff line change 2020
2121<CardGroup .Item labelFor =" autoFillPrDescription" >
2222 {#snippet title ()}
23- Auto-fill PR descriptions from commit
23+ Auto-fill PR/MR descriptions from commit
2424 {/ snippet }
2525 {#snippet caption ()}
26- When creating a pull request for a branch with just one commit, automatically use that commit's
27- message as the PR title and description.
26+ When creating a pull request or merge request for a branch with just one commit, automatically
27+ use that commit's message as the PR/MR title and description.
2828 {/ snippet }
2929 {#snippet actions ()}
3030 <Toggle
You can’t perform that action at this time.
0 commit comments