@ -84,18 +84,18 @@ export function initRepoCommentForm() {
$ ( ` . ${ selector } ` ) . dropdown ( 'setting' , 'onHide' , ( ) => {
$ ( ` . ${ selector } ` ) . dropdown ( 'setting' , 'onHide' , ( ) => {
hasUpdateAction = $listMenu . data ( 'action' ) === 'update' ; // Update the var
hasUpdateAction = $listMenu . data ( 'action' ) === 'update' ; // Update the var
if ( hasUpdateAction ) {
if ( hasUpdateAction ) {
const promises = [ ] ;
// TODO: Add batch functionality and make this 1 network request.
Object . keys ( items ) . forEach ( ( elementId ) => {
( async function ( ) {
const item = items [ elementId ] ;
for ( const [ elementId , item ] of Object . entries ( items ) ) {
const promise = updateIssuesMeta (
await updateIssuesMeta (
item [ 'update-url' ] ,
item [ 'update-url' ] ,
item . action ,
item . action ,
item [ 'issue-id' ] ,
item [ 'issue-id' ] ,
elementId ,
elementId ,
) ;
) ;
promises . push ( promise ) ;
}
} ) ;
window . location . reload ( ) ;
Promise . all ( promises ) . then ( ( ) => window . location . reload ( ) ) ;
} ) ( ) ;
}
}
} ) ;
} ) ;