Skip to content

[Nightly] Opening PR description page from tree not working when PR is not checked out - #2500

Merged
Rachel Macfarlane (RMacfarlane) merged 2 commits into
masterfrom
issue2499
Feb 17, 2021
Merged

[Nightly] Opening PR description page from tree not working when PR is not checked out#2500
Rachel Macfarlane (RMacfarlane) merged 2 commits into
masterfrom
issue2499

Conversation

@RMacfarlane

Copy link
Copy Markdown
Contributor

Fixes #2499

Comment thread src/view/reviewManager.ts Outdated
await this.updateState();
await openDescription(this._context, this._telemetry, createdPR, this._folderRepoManager, this);
const treeNodes = await this.changesInPrDataProvider.getChildren();
const descriptionNode = treeNodes[0] as DescriptionNode;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid relying on position 0 and casting, you could expose a getDescriptionNode on PullRequestChangesTreeDataProvider.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, adding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Nightly] Opening PR description page from tree not working when PR is not checked out

2 participants