src/vs/workbench/contrib/scm/browser/util.ts/collectContextMenuActions
export function collectContextMenuActions(menu: IMenu): [IAction[], IDisposable] {
	const primary: IAction[] = [];
	const actions: IAction[] = [];
	const disposable = createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, { primary, secondary: actions }, 'inline');
	return [actions, disposable];
}