Conversation
hejmaria
left a comment
There was a problem hiding this comment.
Great job! You fulfill all the requirements and the GitHub tracker works. Your code is clean and readable, and your design is personal as always. Thanks for an inspiring site!
| <h2>Projects:</h2> | ||
| <main id="projects"></main> | ||
|
|
||
|
|
|
|
||
| <div id="list"></div> | ||
|
|
||
| </div> <!--closing tag grid item--> |
There was a problem hiding this comment.
Great reminder! I should use comments like these more often. It is so easy to delete the wrong one ><
| avatar.src = data.avatar_url | ||
| }) | ||
|
|
||
| // FETCHES MY REPOS |
There was a problem hiding this comment.
I like the clean headings to comment your code. Makes it very readble.
| .then((data) => { | ||
| const myPullRequests = data.filter((pullRequest) => pullRequest.user.login === USER); | ||
| // IF ELSE STATEMENT FOR 0 PULLS? | ||
| document.getElementById(`pull-request-${repo.name}`).innerHTML = `Pull requests: ${myPullRequests.length}` |
There was a problem hiding this comment.
You have solved this in another way than Maks (or was it jennie?) showed us. I actually like yours better. It is more understandable when you visit the site.
| </div>` | ||
| } | ||
|
|
||
| // SORTS THE REPOS IN CHRONOLOGICAL ORDER BY DATE |
There was a problem hiding this comment.
The famous sorting function! I used it as well :) Maybe reverse the order to get the latest and most advanced project first?
GitHub Tracker
A site that keeps track of my Github repositories.
The project name (with url), latest push, number of commits and pull request is fetched from the Github API, along with my profile info.
The problem
I fetched all my repos and used the filter method to only keep the ones forked from Technigo that start with "project".
I fetched the other data using a similar method, either directly from the API if possible, and filtered it when necessary.
For sorting the repos in order by date, I used a function that I found on stack overflow to avoid a lot of issues with dates in js.
My plan was to use grid for my layout, however, that part is NOT complete yet (as of deadline) and I will keep working on it.
The page works on different devices, but I plan to make the project-divs look more unified in height.
View it live
https://annathunberg-githubtracker.netlify.app/