Skip to content

Added support for Gitlab #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,20 @@ body,input,div,h3,h4,p,label,hr, #scrumReport{

.dark-mode .tooltip-container.tooltip-right .tooltip-bubble::after {
border-color: transparent #374151 transparent transparent;
}
}
#scrumReport b {
display: block;
margin-bottom: 4px;
margin-top: 16px;
}
#scrumReport b:first-child {
margin-top: 0;
}
#scrumReport ul {
margin-top: 0;
margin-bottom: 12px;
padding-left: 20px;
}
#scrumReport li {
margin-bottom: 2px;
}
23 changes: 14 additions & 9 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,23 @@
"*://mail.yahoo.com/*"
],
"js": ["scripts/jquery-3.2.1.min.js", "scripts/emailClientAdapter.js", "scripts/scrumHelper.js"]

}
],

"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self';"
},
"web_accessible_resources": [{
"resources": [
"/icons/night-mode.png",
"icons/night-mode.png"
],
"matches": ["<all_urls>"]
}],
"web_accessible_resources": [
{
"resources": [
"/icons/night-mode.png",
"icons/night-mode.png"
],
"matches": [
"<all_urls>"
]
}
],
"permissions": [
"tabs",
"storage",
Expand All @@ -50,6 +54,7 @@
"*://*.outlook.live.com/*",
"*://*.office.com/*",
"*://*.yahoo.com/*",
"https://api.github.com/*"
"https://api.github.com/*",
"https://gitlab.com/api/*"
]
}
212 changes: 136 additions & 76 deletions src/popup.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand All @@ -8,66 +9,100 @@
<link rel="stylesheet" type="text/css" href="index.css">
<script src="./scripts/fontawesome.js"></script>
<style type="text/css">
html,body{
width: 375px !important;
height: 600px !important;
max-height: 600px !important;
overflow-y: scroll;
background: #eae4e4;
}
</style>
html,
body {
width: 375px !important;
height: 600px !important;
max-height: 600px !important;
overflow-y: scroll;
background: #eae4e4;
}
</style>
</head>

<body>
<div class="pl-1 py-4 rounded-2xl">
<div class="bg-white px-4 py-4 mx-2 mb-2 rounded-3xl">
<div class="flex justify-between py-2">
<h3 class="text-3xl font-semibold ">Scrum Helper</h3>
<img src="icons/night-mode.png" alt="Night Mode" class="w-7 h-7 mx-3 cursor-pointer">
</div>
<div>
<p class="">Report your development progress by auto-fetching your Git activity for a selected period</p>
</div>


<div class="flex justify-between py-2">
<h3 class="text-3xl font-semibold ">Scrum Helper</h3>
<img src="icons/night-mode.png" alt="Night Mode" class="w-7 h-7 mx-3 cursor-pointer">
</div>
<div>
<p class="">Report your development progress by auto-fetching your Git activity for a selected period</p>
</div>

<div class="center mt-2 flex justify-between">
<label class="flex items-center justify-center gap-2 ">
Disable
<input type="checkbox" value="" id="enable" class="sr-only peer" >
<div class="relative w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600 dark:peer-checked:bg-blue-600"></div>
<span class=""></span>
Enable
</label>
<button id="settingsToggle">
<img id="settingsIcon" src="icons/settings-light.png" alt="Settings" class="w-7 h-7 mx-3 cursor-pointer">
</button>
<label class="flex items-center justify-center gap-2 ">
Disable
<input type="checkbox" value="" id="enable" class="sr-only peer">
<div
class="relative w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600 dark:peer-checked:bg-blue-600">
</div>
<span class=""></span>
Enable
</label>
<button id="settingsToggle">
<img id="settingsIcon" src="icons/settings-light.png" alt="Settings" class="w-7 h-7 mx-3 cursor-pointer">
</button>

</div>
</div>

<div class="rounded-2xl">
<div class=" border-gray-100 border-2 bg-white rounded-3xl px-4 py-4 mx-2 my-2">

<div id="reportSection" class="tab-content">
<div>
<h4>Your Project Name</h4>
<input id="projectName" type="text" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Enter your project name">

<input id="projectName" type="text"
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
placeholder="Enter your project name">
</div>

<div>
<h4>Platform</h4>
<div class="flex">
<label class="flex items-center gap-2">
<input type="checkbox" id="platformGithub" class="form-checkbox">
GitHub
</label>
<label class="flex items-center gap-2" style="margin-left: 40px;">
<input type="checkbox" id="platformGitlab" class="form-checkbox">
GitLab
</label>
</div>
</div>

<div id="githubUsernameContainer">
<h4>Your Github Username</h4>
<input id="githubUsername" type="text" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Required for fetching your contributions">
<input id="githubUsername" type="text"
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
placeholder="Required for fetching your contributions">
</div>

<div id="gitlabUsernameContainer" class="hidden">
<h4>Your GitLab Username</h4>
<input id="gitlabUsername" type="text"
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
placeholder="Required for fetching your contributions">
</div>

<div>
<p class="text-sm">Fetch your contributions between:</p>
<div class="flex justify-between items-center my-2 mx-4">
<div class="flex items-center gap-2">
<input type="radio" id="lastWeekContribution" name="timeframe" class="form-radio" onclick="toggleRadio(this)">
<input type="radio" id="lastWeekContribution" name="timeframe" class="form-radio">
<label for="lastWeekContribution">Last 7 days</label>
</div>
<div class="flex items-center gap-2">
<input type="radio" id="yesterdayContribution" name="timeframe" class="form-radio" onclick="toggleRadio(this)">
<input type="radio" id="yesterdayContribution" name="timeframe" class="form-radio">
<label for="yesterdayContribution">Last 1 day</label>
</div>
</div>



<div id="customDateContainer" class="flex justify-between items-center mt-2">
<div>
<label for="startingDate">Start Date:</label>
Expand All @@ -79,31 +114,38 @@ <h4>Your Github Username</h4>
</div>
</div>
</div>



<div class="col s12">
<br />
<input type="checkbox" id="showOpenLabel" class="form-checkbox h-4 w-4 text-blue-600">
<label id="checkboxLabel" for="showOpenLabel" class="text-gray-700 font-medium text-sm">Show Open/Closed Label</label>
<label id="checkboxLabel" for="showOpenLabel" class="text-gray-700 font-medium text-sm">Show Open/Closed
Label</label>
</div>
<div class="my-4">
<p class="text-sm font-medium">What is blocking you from making progress?</p>
<input id="userReason" type="text" class="w-full text-gray-800 mt-3 rounded-xl px-4 py-1" placeholder="Enter your reason">
<input id="userReason" type="text" class="w-full text-gray-800 mt-3 rounded-xl px-4 py-1"
placeholder="Enter your reason">

<hr class="border-t-2 border-gray-700 mt-1 ">
</div>
<div>
<div>
<h6 class="text-base font-semibold">Scrum Report</h6>
<div id="scrumReport"
contenteditable="true"
class="min-h-[200px] overflow-y-auto whitespace-pre-wrap border-2 border-gray-200 bg-gray-100 rounded-xl text-gray-800 p-2 my-2">

<div id="scrumReport" contenteditable="true"
class="min-h-[200px] overflow-y-auto whitespace-pre-wrap border-2 border-gray-200 bg-gray-100 rounded-xl text-gray-800 p-2 my-2">
</div>
</div>
<div class="flex justify-between gap-2">
<button id="generateReport" class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
<i class="fa fa-refresh"></i> Generate Report
<button id="generateReport"
class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
<i class="fa fa-refresh"></i> Generate Report
</button>
<button id="copyReport" class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
<i class="fa fa-copy"></i> Copy Report
<button id="copyReport"
class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
<i class="fa fa-copy"></i> Copy Report

</button>
</div>
</div>
Expand All @@ -112,18 +154,26 @@ <h6 class="text-base font-semibold">Scrum Report</h6>
<div id="settingsSection" class="tab-content hidden">

<div class="">
<p class="text-sm font-medium">Enter cache TTL <span class="text-sm text-gray-800 font-normal">(in minutes)</span>

<p class="text-sm font-medium">Enter cache TTL <span class="text-sm text-gray-800 font-normal">(in
minutes)</span>
<span class="tooltip-container">
<i class="fa fa-question-circle question-icon"></i>
<span class="tooltip-bubble">
We are caching the data to avoid redundant calls. By default the cache expires after 10 minutes, you can change it here to your desired time. We have given a refresh cache button in case you want to fetch fresh data right now.
We are caching the data to avoid redundant calls. By default the cache expires after 10 minutes, you
can change it here to your desired time. We have given a refresh cache button in case you want to
fetch fresh data right now.
</span>
</span>
</p>
<input type="text" id="cacheInput" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Write Cache TTL in minutes (Default 10 minutes)">
</p>
<input type="text" id="cacheInput"
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
placeholder="Write Cache TTL in minutes (Default 10 minutes)">
</div>
<div class="">
<button id="refreshCache" class="w-full mt-3 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded flex items-center justify-center gap-2 transition-colors duration-200">
<button id="refreshCache"
class="w-full mt-3 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded flex items-center justify-center gap-2 transition-colors duration-200">

<i class="fa fa-refresh"></i>
<span>Refresh Data (bypass cache)</span>
</button>
Expand All @@ -132,53 +182,63 @@ <h6 class="text-base font-semibold">Scrum Report</h6>
Use this button to fetch fresh data immediately.
</p>
</div>



</div>

<!-- asdfghjklkjhgfdsasdfghjkjhgfdsasdfghjk -->
<div class="border-gray-100 border-2 bg-white rounded-3xl px-4 py-2 mx-2 my-2">
<div>
<h4 class="font-semibold text-xl">Note:</h4>
<ul class="text-xs list-disc list-inside">
<li>The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week. (<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues/20">See this issue</a>.)

<li>The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days
ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week.
(<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues/20">See this issue</a>.)
</li>
<li>Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing and editing the report to ensure accuracy before sharing
<li>Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing
and editing the report to ensure accuracy before sharing

</li>
</ul>
</div>
</div>
</div>

<div class="mt-6 border-t border-gray-300">
<div class="bg-white rounded-3xl mx-2 mt-4 mb-2 p-4 border border-gray-100 shadow-sm">
<div class="flex items-center justify-center space-x-3">
<a target="_blank"
href="https://github.com/fossasia/scrum_helper"
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
<i class="fa fa-code text-sm"></i>
<span class="text-sm font-medium">View Code</span>
</a>
<a target="_blank"
href="https://github.com/fossasia/scrum_helper/issues"
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
<i class="fa fa-bug text-sm"></i>
<span class="text-sm font-medium">Report Issue</span>
</a>
</div>
</div>
<div class="mt-3 pt-3 border-t border-gray-200 flex justify-center items-center py-5">
<p class="text-xs text-gray-600 text-center">
Made with ❤️ by <strong>FOSSASIA</strong> •
<span class="text-gray-500 dark:text-gray-300">v2.0</span>
</p>
</div>


<div class="mt-6 border-t border-gray-300">
<div class="bg-white rounded-3xl mx-2 mt-4 mb-2 p-4 border border-gray-100 shadow-sm">
<div class="flex items-center justify-center space-x-3">
<a target="_blank" href="https://github.com/fossasia/scrum_helper"
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
<i class="fa fa-code text-sm"></i>
<span class="text-sm font-medium">View Code</span>
</a>
<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues"
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
<i class="fa fa-bug text-sm"></i>
<span class="text-sm font-medium">Report Issue</span>
</a>
</div>
</div>
<div class="mt-3 pt-3 border-t border-gray-200 flex justify-center items-center py-5">
<p class="text-xs text-gray-600 text-center">
Made with ❤️ by <strong>FOSSASIA</strong> •
<span class="text-gray-500 dark:text-gray-300">v2.0</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="scripts/jquery-3.2.1.min.js"></script>
<script type="text/javascript" type="text/javascript" src="materialize/js/materialize.min.js"></script>
<script src="scripts/gitlabHelper.js"></script>
<script src="scripts/main.js"></script>
<script src="scripts/scrumHelper.js"></script>
<script src="scripts/popup.js"></script>
</body>



</html>
Loading