Skip to content

HedvigM Project GitHub Tracker#8

Open
HedvigM wants to merge 13 commits into
Technigo:mainfrom
HedvigM:main
Open

HedvigM Project GitHub Tracker#8
HedvigM wants to merge 13 commits into
Technigo:mainfrom
HedvigM:main

Conversation

@HedvigM

@HedvigM HedvigM commented Oct 1, 2021

Copy link
Copy Markdown

No description provided.

@annatbg annatbg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your Github tracker looks great on all devices and everything works just fine!

I'm very impressed with how clean and structured your code is Hedvig! Your comments were really helpful to me as well. There really wasn't anything I would have changed, except minor details such as cleaning up some comments (if they are not there on purpose, in that case: maybe change them to english?).

You have definitely met the requirements for the project.
There is always the opportunity to go back and improve the styling later, as you mentioned you would like to.

Very impressive work this week Hedvig, you should be really proud of yourself!

Comment thread code/app.js
Comment on lines +79 to +86
/* TODO:
1. få ut infon om commits på sidan
2. få ut commitsen i den rätta rutan


3. titta på hur Max hanterade "dates" från lektionen
*/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clever to include a to-do list in the actual code like this, I will try that! 👍🏻

Comment thread code/index.html

<canvas id="chart" class="canvas"></canvas>
</div>
<footer><h1>Hedvig Mejstedt 🦁</h1></footer>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice touch adding the footer!

Comment thread code/app.js
@@ -0,0 +1,108 @@
const USER = ''; // !!! Place your user over here !!!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this another version, for practice? Thats a great idea! 💯

Comment thread code/script.js


document.getElementById(`commits-${repo.name}`).innerHTML = `Number of commits: ${fetchedCommits.length}`;
//Funktionen skall gå ner en nivå till och bara visa commits_URL

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor detail, but perhaps change this to english? Or remove if it's not meant to be there.

Comment thread code/script.js
//This fetch is fetching all the pulls at the technigo user, so we have to sort everyone exept my user out "of the bag". Only my pulls for each project will show after this "hedvigsPulls" function.

document.getElementById(`pull-${repo.name}`).innerHTML = `Pull request was made ${new Date (hedvigsPulls[0].created_at).toLocaleDateString()}`;
//allt som skrivs inom parentesen efter get ElementById är en del av ID:t.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps this note is a work in progress-note to yourself, and something that can be removed?

Comment thread code/script.js
Comment on lines +8 to +44
//^^^^^^^^^^^^^^^^^^^^^^ REPOS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^//

const repos = `https://api.github.com/users/${userName}/repos`
fetch(repos)
.then(response => response.json())
.then(data => {
console.log(data)
//Fetching only the forked repos and the ones starts with "project" from my GitHub account.
const forkedRepos = data.filter(repo => repo.fork && repo.name.startsWith('project'))


//Username and userpic
profileContainer.innerHTML+= `
<img class="img" src="${data[0].owner.avatar_url}" alt="profile picture">
<a href="${data[0].owner.html_url}"><h2>${data[0].owner.login}</h2></a>
`

// Repos and fetched pulls from the functions down under.
forkedRepos.forEach((repo) => projects.innerHTML += `
<div class="repos" id="repos">


<a href="${repo.html_url}"><h3>${repo.name.substring(8).replace("-"," ")}</h3></a>


<p>The default branch is: ${repo.default_branch}</p>
<p>The latest push: ${new Date(repo.pushed_at).toLocaleDateString()}</p>
<p id="pull-${repo.name}">No pull request is yet made 🤷 </p>
<p id="commits-${repo.name}">There are no commits yet...</p>
</div>
`)


drawChart(forkedRepos.length)
getPullRequests(forkedRepos)
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I really appreciate how clean and structured your code is, the comments are very helpful. Great work!

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