From 71f43e672a12823c4374f134ea6a4d1d003c6245 Mon Sep 17 00:00:00 2001 From: Amin Jalal Date: Sat, 16 Nov 2024 20:53:00 +0300 Subject: [PATCH] Add ability to view contributor's contributions. --- Contributors/contributor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Contributors/contributor.js b/Contributors/contributor.js index 0c2c9a4..8b81124 100644 --- a/Contributors/contributor.js +++ b/Contributors/contributor.js @@ -54,12 +54,16 @@ function renderStats(repoData, contributors) { // Render the list of contributors function renderContributors(contributors) { const contributorsContainer = document.getElementById("contributors"); + const getContributionsLink = function(userName) { + const contributionLink = `https://github.com/YadavAkhileshh/Alien-Invasion-Defense/commits?author=${userName}`; + return contributionLink; + } contributorsContainer.innerHTML = contributors.map(({ login, contributions, avatar_url, html_url }) => `
${login}'s avatar

${login}

-

Contributions: ${contributions}

+ Contributions: ${contributions}

GitHub Profile
`).join('');