Skip to content

Github Tracker Technigo Week 7 - Amanda Tange#88

Open
amandatange wants to merge 5 commits intoTechnigo:mainfrom
amandatange:main
Open

Github Tracker Technigo Week 7 - Amanda Tange#88
amandatange wants to merge 5 commits intoTechnigo:mainfrom
amandatange:main

Conversation

@amandatange
Copy link
Copy Markdown

No description provided.

## The problem

Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
I used fetch to get the user data, which required 3 fetches - user data, pull requests, and commits. The styling was kept simple since the focus was to be able to display all the different data that was required. The biggest problem was data retrieval and getting it to actually show up on the site. The second biggest problem I had was that I had set up the fetches to all finish before moving on to displaying the data so the site took a very long time to load. That has been slightly remedied by splitting up the code into separate fetches but it still takes a fairly long time for the site to load.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This project was so intense and I am glad you managed to find the right solutions to the problems.


//"Draw" the chart here 👇

const myChart = (numberOfProjects) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is a clear, short and simple code of the chart coded compared to the template they showed us from the site. Easy to follow!


//Global variables
const usrName = 'amandatange';
let forkedRepos = []; // will contain filtered list of repos that have been forked
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good and clear explanation of the the different variables.

.then((dataPR) => {
//filter for every PR to match my profile (or in the case of the weather app, to michael's profile and id for the PR)
const pull = dataPR.filter(pr => pr.url.includes(repo.name)
&& (pr.user.login === repo.owner.login || pr.user.login === "michaelchangdk" && pr.id === 856976386))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adding another user here is impressing!


// since not all projects have a PR I don't have access to the commits from the PR API for all of them
// so I chose to use the commits api from the first fetch
// but I think this way the number of commits includes those made by the technigo team before I forked the project?
Copy link
Copy Markdown

@SteppbySteph SteppbySteph Feb 28, 2022

Choose a reason for hiding this comment

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

I think you are right here since looking at this repo, you made 5(?) commits and in total there are nine. Also, doing this was a good idea to actually add some commits for the project. Maybe you could have added further information through innerHTML like "commits from other user"(?)". Anyway, the result was simply great!

<p id='numberCommits' class='number-commits'>Number of commits: <span>${numberOfCommits}</span></p>
</section>`;
//If the repo doesn't have a PR it won't add this data
if (pull.length !== 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good use of the "not equal to" operator.


// the tags have classes that aren't used right now
// but I would like to try using them to style the layout with a more a advanced grid layout
main.innerHTML += `
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It was a lot of struggle with coding this week with fetching APIs and using them in functions. In the end you really did managed to fetch 'em all according to blue requierments. Be proud, you are amazing. It was really nice analyzing your code. Thank you, Amanda.

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