Skip to content

LGTM: Unnecessary self assignment in pullRequestNode #1421

Closed
@emtei

Description

Found by LGTM report link

Whole this block of code seems to be useless. But i`m not so experienced in this module to remove it so i decided to open issue firstly.

https://github.com/microsoft/vscode-pull-request-github/blob/master/src/view/treeNodes/pullRequestNode.ts#L944-L954

if (commentThreadCache[params.fileName]) {
	commentThreadCache[params.fileName].forEach(thread => {
		if (!thread.comments) {
			return;
		}

		if (thread.comments.find((cmt: GHPRComment) => cmt.commentId === comment.commentId)) {
			thread.comments = thread.comments;
		}
	});
}

@rebornix @RMacfarlane can you remember what is the job of this code?

Should reaction authors be listed in commentThreadLabel as "Participants"?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions