├── LICENSE ├── README.md ├── index.html ├── js ├── followers.js ├── following.js ├── gists.js └── repos.js ├── main.js └── screenshots ├── followers.jpeg ├── following.jpeg ├── gists.jpeg └── repositories.jpeg /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sakhawat Hossain 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitGittu 2 | 3 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 4 | 5 | GitGittu is a simple tool that allows users to view their GitHub repositories, gists, followers, and following. The tool is built with JavaScript and utilizes the GitHub REST API. 6 | 7 | ## Usage 8 | 9 | To use the tool, simply visit the [GitGittu website](https://shrudra.github.io/gitgittu/) and enter your GitHub username in the input field. Then click on the button for the information you want to view: Repositories, Gists, Followers, or Following. The information will be displayed in a table format below the button. 10 | 11 | ## Screenshots 12 | 13 | ### Repositories 14 | ![Repositories](screenshots/repositories.jpeg) 15 | 16 | ### Gists 17 | ![Gists](screenshots/gists.jpeg) 18 | 19 | ### Followers 20 | ![Followers](screenshots/followers.jpeg) 21 | 22 | ### Following 23 | ![Following](screenshots/following.jpeg) 24 | 25 | ## Star ⭐ History 26 | 27 | ![Star History Chart](https://api.star-history.com/svg?repos=shrudra/gitgittu&type=date) 28 | 29 | ## Development 30 | 31 | If you want to make modifications to GitGittu, you can clone the GitHub repository and make changes locally. Here are the steps to do so: 32 | 33 | 1. Clone the repository: 34 | 35 | ``` 36 | git clone https://github.com/shrudra/gitgittu.git 37 | ``` 38 | 39 | 2. Open the index.html file in your browser to view the current version of the tool. 40 | 41 | 3. Make any changes you want to the JavaScript code in the main.js file. 42 | 43 | 4. Test your changes by refreshing the index.html file in your browser. 44 | 45 | 5. Once you're satisfied with your changes, commit and push them to the GitHub repository: 46 | 47 | ``` 48 | git add . 49 | git commit -m "Description of changes made" 50 | git push 51 | ``` 52 | 53 | ## Contribute 54 | 55 | If you find any bugs or want to contribute to the project, feel free to submit an issue or pull request. 56 | 57 | # Donate 58 | If you find value in what I'm creating,‌ a book donation would be a great choice. 59 | 60 | Buy Me A Book 61 | 62 | ## License 63 | My Tool is licensed under the MIT License. See LICENSE for more information. 64 | 65 | ## Contact 66 | 67 | If you have any questions or want to reach out, you can email me at [sakhwt.hssain@gmail.com](mailto:sakhwt.hssain@gmail.com). 68 | 69 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GitGittu 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
32 | 33 |
34 |

GitGittu

35 |

A Super Tool to view a GitHub user's repos, gists, following and followers

36 | 37 |
38 | 39 |
40 | 41 |
42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
52 |
53 |
54 | 55 |
56 | 57 | 65 | 66 | 74 | 75 |
76 |
77 |
78 | 79 | 80 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /js/followers.js: -------------------------------------------------------------------------------- 1 | const submitBtn = document.querySelector("#submit-btn4"); 2 | submitBtn.addEventListener("click", async () => { 3 | const username = document.querySelector("#username").value; 4 | const url = `https://api.github.com/users/${username}/followers`; 5 | try { 6 | const response = await fetch(url); 7 | const data = await response.json(); 8 | let statusHTML = ""; 9 | data.forEach((status) => { 10 | statusHTML += ` 11 | 12 | ${status.login} 13 | 14 | ${status.html_url} 15 | 16 | `; 17 | }); 18 | document.querySelector("tbody").innerHTML = statusHTML; 19 | } catch (error) { 20 | console.error(error); 21 | } 22 | }); 23 | 24 | -------------------------------------------------------------------------------- /js/following.js: -------------------------------------------------------------------------------- 1 | const submitBtn = document.querySelector("#submit-btn3"); 2 | submitBtn.addEventListener("click", async () => { 3 | const username = document.querySelector("#username").value; 4 | const url = `https://api.github.com/users/${username}/following`; 5 | try { 6 | const response = await fetch(url); 7 | const data = await response.json(); 8 | let statusHTML = ""; 9 | data.forEach((status) => { 10 | statusHTML += ` 11 | 12 | ${status.login} 13 | 14 | ${status.html_url} 15 | 16 | `; 17 | }); 18 | document.querySelector("tbody").innerHTML = statusHTML; 19 | } catch (error) { 20 | console.error(error); 21 | } 22 | }); 23 | 24 | -------------------------------------------------------------------------------- /js/gists.js: -------------------------------------------------------------------------------- 1 | const submitBtn = document.querySelector("#submit-btn2"); 2 | submitBtn.addEventListener("click", async () => { 3 | const username = document.querySelector("#username").value; 4 | const url = `https://api.github.com/users/${username}/gists`; 5 | try { 6 | const response = await fetch(url); 7 | const data = await response.json(); 8 | let statusHTML = ""; 9 | data.forEach((status) => { 10 | statusHTML += ` 11 | 12 | 13 | ${status.html_url} 14 | ${status.created_at} 15 | 16 | `; 17 | }); 18 | document.querySelector("tbody").innerHTML = statusHTML; 19 | } catch (error) { 20 | console.error(error); 21 | } 22 | }); 23 | 24 | -------------------------------------------------------------------------------- /js/repos.js: -------------------------------------------------------------------------------- 1 | const submitBtn = document.querySelector("#submit-btn1"); 2 | submitBtn.addEventListener("click", async () => { 3 | const username = document.querySelector("#username").value; 4 | const url = `https://api.github.com/users/${username}/repos`; 5 | try { 6 | const response = await fetch(url); 7 | const data = await response.json(); 8 | let statusHTML = ""; 9 | data.forEach((status) => { 10 | statusHTML += ` 11 | 12 | 13 | ${status.name} 14 | ${status.language} 15 | ${status.html_url} 16 | 17 | `; 18 | }); 19 | document.querySelector("tbody").innerHTML = statusHTML; 20 | } catch (error) { 21 | console.error(error); 22 | } 23 | }); 24 | 25 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | const fetchData = (username, endpoint, columns) => { 2 | const request = new XMLHttpRequest(); 3 | request.open('GET', `https://api.github.com/users/${username}/${endpoint}`, true); 4 | 5 | request.onload = () => { 6 | const data = JSON.parse(request.response); 7 | 8 | if (request.status >= 200 && request.status < 400) { 9 | let statusHTML = ''; 10 | statusHTML += ''; 11 | columns.forEach(column => { 12 | statusHTML += `${column}`; 13 | }); 14 | statusHTML += ''; 15 | data.forEach(status => { 16 | statusHTML += ''; 17 | columns.forEach(column => { 18 | if (column === 'html_url') { 19 | statusHTML += `${status[column]}`; 20 | } else if (column === 'avatar_url') { 21 | statusHTML += ``; 22 | } else { 23 | statusHTML += `${status[column]}`; 24 | } 25 | }); 26 | statusHTML += ''; 27 | }); 28 | document.querySelector('tbody').innerHTML = statusHTML; 29 | } else { 30 | document.querySelector('tbody').innerHTML = 'User not found or an error occurred'; 31 | } 32 | } 33 | request.send(); 34 | } 35 | 36 | document.querySelector('#submit-btn').addEventListener('click', () => { 37 | const username = document.querySelector('#username').value.trim(); 38 | fetchData(username, 'repos', ['full_name', 'language', 'html_url']); 39 | }); 40 | 41 | document.querySelector('#submit-btn2').addEventListener('click', () => { 42 | const username = document.querySelector('#username').value.trim(); 43 | fetchData(username, 'gists', ['html_url', 'created_at']); 44 | }); 45 | 46 | document.querySelector('#submit-btn3').addEventListener('click', () => { 47 | const username = document.querySelector('#username').value.trim(); 48 | fetchData(username, 'following', ['avatar_url', 'login', 'html_url']); 49 | }); 50 | 51 | document.querySelector('#submit-btn4').addEventListener('click', () => { 52 | const username = document.querySelector('#username').value.trim(); 53 | fetchData(username, 'followers', ['avatar_url', 'login', 'html_url']); 54 | }); 55 | -------------------------------------------------------------------------------- /screenshots/followers.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neoooby-Doo/gitgittu/c741b6caa2aa0e3399ad50d541891a9579a40b80/screenshots/followers.jpeg -------------------------------------------------------------------------------- /screenshots/following.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neoooby-Doo/gitgittu/c741b6caa2aa0e3399ad50d541891a9579a40b80/screenshots/following.jpeg -------------------------------------------------------------------------------- /screenshots/gists.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neoooby-Doo/gitgittu/c741b6caa2aa0e3399ad50d541891a9579a40b80/screenshots/gists.jpeg -------------------------------------------------------------------------------- /screenshots/repositories.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neoooby-Doo/gitgittu/c741b6caa2aa0e3399ad50d541891a9579a40b80/screenshots/repositories.jpeg --------------------------------------------------------------------------------