Skip to content

Commit ffff47d

Browse files
committed
toasty error messages
1 parent 63ccf82 commit ffff47d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

templates/repo/settings/branches.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<div class="ui attached segment">
4040
<div class="flex-list" id="protected-branches-list" data-update-priority-url="{{$.Repository.Link}}/settings/branches/priority">
4141
{{range .ProtectedBranches}}
42-
<div class="item" data-id="{{.ID}}">
42+
<div data-id="{{.ID}}">
4343
<div class="flex-item tw-items-center">
4444
<div class="drag-handle tw-cursor-grab">
4545
{{svg "octicon-grabber" 16}}

web_src/js/features/repo-settings-branches.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {createSortable} from '../modules/sortable.ts';
22
import {POST} from '../modules/fetch.ts';
3+
import {showErrorToast} from '../modules/toast.ts';
34

45
export function initRepoBranchesSettings() {
56
const protectedBranchesList = document.querySelector('#protected-branches-list');
@@ -21,7 +22,8 @@ export function initRepoBranchesSettings() {
2122
},
2223
});
2324
} catch (err) {
24-
console.error('Failed to update branch protection rule priority:', err);
25+
const errorMessage = String(err);
26+
showErrorToast(`Failed to update branch protection rule priority:, error: ${errorMessage}`);
2527
}
2628
},
2729
});

0 commit comments

Comments
 (0)