Week 7 - GitHub Tracker - Fay Pistikozoglou#101
Open
faypi wants to merge 8 commits intoTechnigo:mainfrom
Open
Conversation
jiiinCho
reviewed
Feb 28, 2022
jiiinCho
left a comment
There was a problem hiding this comment.
Your website works without any errors, links direct to correct page also it’s designed for mobile responsive :) Your script is clean enough to follow the function flow. Great work! Just one comment might be to add a margin in your
element, giving some space in desktop display. Good job again!| fetch(API_URL, options) // options object is passed as 2nd argument to fetch() function. | ||
| .then(res => res.json()) | ||
| .then(data => { | ||
| const myRepos = data.filter((forkedRepos) => forkedRepos.fork == true && forkedRepos.name.startsWith("project-")) |
| const commitUrl = mostRecentCommit.html_url | ||
| const commitDateString = mostRecentCommit.commit.author.date | ||
| const commitDate = Date.parse(commitDateString) | ||
| const commitTimeSince = timeSince(commitDate) |
There was a problem hiding this comment.
great to use function definition for displaying date 👍
|
|
||
| } | ||
|
|
||
| const handlePullRequest = (repoElementId, myPullRequests) => { |
There was a problem hiding this comment.
good readability to define handlePullRequest separately!
code/script.js
Outdated
| }) | ||
|
|
||
| myPullRequests | ||
| .map(pullRequest => pullRequest.review_comments_url) |
There was a problem hiding this comment.
I just wonder if you need both map and forEach?
Author
There was a problem hiding this comment.
I separated the 2 just to have a bit cleaner code. It is totally optional :) Thanks for checking though!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://fay-github-tracker.netlify.app/