Skip to content

Github Tracker Sherin#70

Open
Sherin-Susan-Thomas wants to merge 16 commits intoTechnigo:mainfrom
Sherin-Susan-Thomas:main
Open

Github Tracker Sherin#70
Sherin-Susan-Thomas wants to merge 16 commits intoTechnigo:mainfrom
Sherin-Susan-Thomas:main

Conversation

@Sherin-Susan-Thomas
Copy link
Copy Markdown

No description provided.

Comment thread code/script.js
Comment on lines +24 to +25
<h4> ${data.bio} </h4> <br>
<h4> Follow <a href="${data.html_url}"> <i class="fa fa-github" aria-hidden="true"></i> </a> </h4>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A more fitting HTML tag might be

here :)

Comment thread code/script.js
.then((userData) => {
console.log("userData", userData);
const filteredRepos = userData.filter(
(item) => item.fork == true && item.name.includes("project-") // to filter technigo projects
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

item.name.includes might be true if a project includes this string in its name. A better fit here might be item.name.startsWith

Comment thread code/script.js
repos.forEach((repo) => {
console.log("repo", repo);
fetch(
`https://api.github.com/repos/Technigo/${repo.name}/pulls?per_page=100`,
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 with the query param here :)

Comment thread code/script.js
.then((res) => res.json())
.then((data) => {
console.log("data", data);
const myPullRequest = data.find(
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 using the find method here!!! I used filter and I had to do some extra work with arrays 💯

Comment thread code/script.js
Comment on lines +69 to +73
if (myPullRequest) {
fetchCommits(myPullRequest.commits_url, repo.name);
} else {
document.getElementById(`commit-${repo.name}`).innerHTML =
"<b>Commits Done: </b> 0 (Pull request unavailable/Group project) ";
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 job with the conditional here.

Copy link
Copy Markdown

@faypi faypi left a comment

Choose a reason for hiding this comment

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

Great code overall! Easy to read and understand the logic. Good job Sherin!!

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