-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add review, approval info and linkify #831
Conversation
createdAt: graphQLPullRequest.createdAt, | ||
updatedAt: graphQLPullRequest.updatedAt, | ||
head: { | ||
label: graphQLPullRequest.headRef.name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible for headRef
or baseRef
to be undefined, if they've been deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be null based on the schema, I'd love to use the generated typings with strict null checks ;)
src/github/utils.ts
Outdated
labels: [] | ||
}; | ||
} | ||
|
||
export function parseGraphQLTimelineEvents(events: any[]): TimelineEvent[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to replace this any
with the types from graphql.ts
@@ -563,6 +608,9 @@ class ReviewNode { | |||
userLogin.href = this._review.user.url; | |||
userLogin.textContent = this._review.user.login; | |||
|
|||
const authorAssociation: HTMLSpanElement = document.createElement('span'); | |||
authorAssociation.textContent = `(${this._review.authorAssociation.toLocaleLowerCase()})`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authorAssociation
seems to be undefined when using the REST API. Also, when the authorAssociation is none
, I think we shouldn't render it
} | ||
|
||
export function convertRESTTimelineEvents(events: any[]): TimelineEvent[] { | ||
export function convertRESTTimelineEvents(events: any[]): Common.TimelineEvent[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if possible let's also replace any
with a real type here, avatar_url
isn't being converted to avatarUrl
Do you get the HTML directly from GitHub or do some conversions? Microsoft/vscode#xyz should also work |
@Tyriar we didn't do anything more if it's from github.com |
Add more timeline event info
Merge Event
Review Event Author Association
Linkify