refactor(history): move with_history logic to document_history_list func

Merge request reports