Skip to content

Display reviewers on description page - #951

Merged
Rachel Macfarlane (RMacfarlane) merged 2 commits into
masterfrom
rmacfarlane/reviewers
Feb 22, 2019
Merged

Rachel Macfarlane (RMacfarlane) merged 2 commits into
masterfrom
rmacfarlane/reviewers

Conversation

@RMacfarlane

@RMacfarlane Rachel Macfarlane (RMacfarlane) commented Feb 13, 2019 •

Copy link
Copy Markdown
Contributor

reflow-sidebar

Displays reviewers and labels in a sidebar. Will tackle adding new reviewers and labels in a separate PR

const seen = new Map<string, boolean>();
for (let i = reviewEvents.length -1; i >= 0; i--) {
const reviewer = reviewEvents[i].user;
if (!seen.get(reviewer.login)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to filter out pull request creator as their comments are being labeled as reviews as well.

}
}

pullRequestModel.prItem.reviewRequests.forEach(request => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

GitHub.com sorts the results by alphabetical order.

Comment thread preview-src/index.ts
const descriptionNode = document.getElementById('description');
descriptionNode.innerHTML = '';
const bodyHTML = !pr.body ? '<i>No description provided</i>' : pr.bodyHTML;
const descriptionElement = renderComment({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this intentional that now we render the description as a comment? I kind of like the ui before.

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.

Do you mean having the information about the merge as the title of the description?
screen shot 2019-02-14 at 2 53 05 pm
screen shot 2019-02-14 at 2 54 11 pm

@rebornix Peng Lyu (rebornix) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One code change request with two suggestions. The code works as expected.

@rebornix Peng Lyu (rebornix) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

2 participants