Skip to content

Commit b678a9d

Browse files
committed
review 1 fixes
Signed-off-by: Vedansh Saini <[email protected]>
1 parent 6d67a62 commit b678a9d

File tree

2 files changed

+29
-15
lines changed

2 files changed

+29
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SCRUM Helper
22

3-
This chrome extension helps you to write scrums in google groups for FOSSASIA related projects. You need to add your github username, dates, and other options. It fetches your PRs, Issues, and the PRs you reviewed from Github API, and prefills the SCRUM. You can edit the scrum further to meet your needs.
3+
This chrome extension helps you to write scrum reports in Google Groups and other email clients for FOSSASIA related projects. You need to add your github username, dates, and other options. It fetches your PRs, Issues, and the PRs you reviewed from Github API, and prefills the SCRUM. You can edit the scrum further to meet your needs.
44

55
![SCRUMLOGO](docs/images/scrumhelper-png.png)
66

@@ -30,7 +30,7 @@ This chrome extension helps you to write scrums in google groups for FOSSASIA re
3030

3131
3. **Email Client Integration**
3232
- Seamless integration with various email clients
33-
- Maintains formatting consistency across platforms
33+
- Ensures consistent formatting across email clients, previews, and copied content.
3434
- Automatic subject line generation
3535
- Support for HTML content in compatible clients
3636

src/scripts/scrumHelper.js

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function allIncluded(outputTarget = 'email') {
1616
var lastWeekContribution = false;
1717
var githubPrsReviewData = null;
1818
var githubUserData = null;
19-
var githubPrsReviewDataProccessed = {};
19+
var githubPrsReviewDataProcessed = {};
2020
var showOpenLabel = true;
2121
var showClosedLabel = true;
2222
var userReason = '';
@@ -306,13 +306,19 @@ ${userReason}`;
306306
var items = githubPrsReviewData.items;
307307

308308
reviewedPrsArray = [];
309-
githubPrsReviewDataProccessed = {};
309+
githubPrsReviewDataProcessed = {};
310310

311311
for (var i = 0; i < items.length; i++) {
312312
var item = items[i];
313+
console.log(`Review item ${i + 1}/${items.length}:`, {
314+
number: item.number,
315+
author: item.user.login,
316+
type: item.pull_request ? "PR" : "Issue",
317+
state: item.state,
318+
title: item.title
319+
});
313320

314321
if (item.user.login === githubUsername) {
315-
// skips own pr from review
316322
continue;
317323
}
318324

@@ -322,8 +328,8 @@ ${userReason}`;
322328
var number = item.number;
323329
var html_url = item.html_url;
324330

325-
if (!githubPrsReviewDataProccessed[project]) {
326-
githubPrsReviewDataProccessed[project] = [];
331+
if (!githubPrsReviewDataProcessed[project]) {
332+
githubPrsReviewDataProcessed[project] = [];
327333
}
328334

329335
var obj = {
@@ -332,20 +338,20 @@ ${userReason}`;
332338
title: title,
333339
state: item.state,
334340
};
335-
githubPrsReviewDataProccessed[project].push(obj);
341+
githubPrsReviewDataProcessed[project].push(obj);
336342
}
337343

338-
for (var repo in githubPrsReviewDataProccessed) {
344+
for (var repo in githubPrsReviewDataProcessed) {
339345
var repoLi = '<li><i>(' + repo + ')</i> - Reviewed ';
340-
if (githubPrsReviewDataProccessed[repo].length > 1) {
346+
if (githubPrsReviewDataProcessed[repo].length > 1) {
341347
repoLi += 'PRs - ';
342348
} else {
343349
repoLi += 'PR - ';
344350
}
345351

346-
if (githubPrsReviewDataProccessed[repo].length <= 1) {
347-
for (var pr in githubPrsReviewDataProccessed[repo]) {
348-
var pr_arr = githubPrsReviewDataProccessed[repo][pr];
352+
if (githubPrsReviewDataProcessed[repo].length <= 1) {
353+
for (var pr in githubPrsReviewDataProcessed[repo]) {
354+
var pr_arr = githubPrsReviewDataProcessed[repo][pr];
349355
var prText = '';
350356
prText += `<a href='${pr_arr.html_url}' target='_blank'>#${pr_arr.number}</a> (${pr_arr.title}) `;
351357
if (pr_arr.state === 'open') {
@@ -358,8 +364,8 @@ ${userReason}`;
358364
}
359365
} else {
360366
repoLi += '<ul>';
361-
for (var pr1 in githubPrsReviewDataProccessed[repo]) {
362-
var pr_arr1 = githubPrsReviewDataProccessed[repo][pr1];
367+
for (var pr1 in githubPrsReviewDataProcessed[repo]) {
368+
var pr_arr1 = githubPrsReviewDataProcessed[repo][pr1];
363369
var prText1 = '';
364370
prText1 += `<li><a href='${pr_arr1.html_url}' target='_blank'>#${pr_arr1.number}</a> (${pr_arr1.title}) `;
365371
if (pr_arr1.state === 'open') {
@@ -387,6 +393,14 @@ ${userReason}`;
387393

388394
for (var i = 0; i < items.length; i++) {
389395
var item = items[i];
396+
console.log(`Processing item ${i + 1}/${items.length}:`, {
397+
number: item.number,
398+
title: item.title,
399+
state: item.state,
400+
isPR: !!item.pull_request,
401+
body: item.body ? item.body.substring(0, 100) + "..." : "no body"
402+
});
403+
390404
var html_url = item.html_url;
391405
var repository_url = item.repository_url;
392406
var project = repository_url.substr(repository_url.lastIndexOf('/') + 1);

0 commit comments

Comments
 (0)