File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
apps/desktop/src/lib/branch Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change 4242 lastPush: Date | undefined ;
4343 }
4444
45- const { branch, isTopBranch : isTopSeries, isBottomBranch : isBottomSeries, lastPush }: Props = $props ();
45+ const {
46+ branch,
47+ isTopBranch : isTopSeries,
48+ isBottomBranch : isBottomSeries,
49+ lastPush
50+ }: Props = $props ();
4651
4752 let descriptionVisible = $state (!! branch .description );
4853
7984 let kebabContextMenuTrigger = $state <HTMLButtonElement >();
8085 let seriesHeaderEl = $state <HTMLDivElement >();
8186 let seriesDescriptionEl = $state <HTMLTextAreaElement >();
82-
87+ let targetBaseError = $state < Error | undefined >();
8388 let contextMenuOpened = $state (false );
8489
8590 const topPatch = $derived (branch ?.patches [0 ]);
177182 $prService &&
178183 $forge ?.name === ' github' &&
179184 branch .prNumber &&
185+ ! targetBaseError &&
180186 $pr ?.state === ' open'
181187 ) {
182- $prService ?.update (branch .prNumber , { targetBase }).then (async () => {
183- await $forgeListing ?.refresh ();
184- await updateStatusAndChecks ();
185- });
188+ $prService
189+ ?.update (branch .prNumber , { targetBase })
190+ .then (async () => {
191+ await $forgeListing ?.refresh ();
192+ await updateStatusAndChecks ();
193+ })
194+ .catch ((err ) => {
195+ showError (' Failed to update PR target base' , err .message ? err .message : err );
196+ targetBaseError = err ;
197+ });
186198 }
187199 });
188200
You can’t perform that action at this time.
0 commit comments