Skip to content

Commit

Permalink
Bugfix for #63 invalid arguments retrieving info for some prs (#75)
Browse files Browse the repository at this point in the history
* Add config for app issue-branch-name

* Some comments are attached to the file and have
not reference/selection in the content. Need to be removed.

Fixes #63 

---------

Co-authored-by: Ankit Sinha <[email protected]>
  • Loading branch information
schneim and ankitbko authored Jan 8, 2024
1 parent 2f4aacd commit 3a80875
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/issue-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
branchName: full
silent: false
autoCloseIssue: true

branches:
- label: enhancement
prefix: feature/
- label: bug
prefix: bugfix/
4 changes: 3 additions & 1 deletion src/view/treeNodes/fileChangeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,16 @@ export class FileChangeNode extends TreeNode implements vscode.TreeItem {

updateShowOptions() {
const reviewThreads = this.pullRequest.reviewThreadsCache;
const reviewThreadsForNode = reviewThreads.filter(thread => !thread.isDeleted && thread.path === this.fileName);
let reviewThreadsForNode = reviewThreads.filter(thread => !thread.isDeleted && thread.path === this.fileName);

DecorationProvider.updateFileComments(
this.resourceUri,
this.pullRequest.getPullRequestId(),
this.fileName,
reviewThreadsForNode.length > 0,
);
/* Some comments are attached to the file and have not reference/selection in the content. Need to be removed here. */
reviewThreadsForNode = reviewThreadsForNode.filter((thread) => thread.line !== undefined);

if (reviewThreadsForNode.length) {
reviewThreadsForNode.sort((a, b) => a.line - b.line);
Expand Down

0 comments on commit 3a80875

Please sign in to comment.