Skip to content

Commit 9c1982b

Browse files
authored
Merge pull request #228 from vedansh-5/titleChange
PATCH : changed title in issues and PRs
2 parents 4d5b94a + 48d94c9 commit 9c1982b

File tree

9 files changed

+415
-9
lines changed

9 files changed

+415
-9
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug Report / Feature Request
3+
about: Report a bug or request a new feature
4+
title: '[Bug/Feature]: <short description>'
5+
labels: ['needs triage']
6+
assignees: ''
7+
---
8+
9+
### 🔍 Actual Behaviour
10+
11+
What is currently happening?
12+
13+
### ✅ Expected Behaviour
14+
15+
What should ideally happen?
16+
17+
### 📸 Screenshots
18+
19+
If applicable, add screenshots to help explain the issue.
20+
21+
### 🧪 Steps to Reproduce (for bugs)
22+
23+
1. Go to '...'
24+
2. Click on '...'
25+
3. Scroll down to '...'
26+
4. See the error
27+
28+
### 💡 Possible Solution
29+
30+
(Optional) Suggest a fix or reason for the bug.
31+
32+
### 🙋‍♂️ Would You Like to Work on It?
33+
34+
Yes / No

.github/workflows/publish-chrome.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
C3ElB,KAAK,CAACW,OAAO,IAAI,OAAOX,KAAK,CAACW,OAAO,KAAK,QAAQ,IAAIX,KAAK,CAACW,OAAO,CAACM,WAAW,CAAC,CAAC,CAACC,QAAQ,CAAC,mBAAmB,CAAE,EAAE;MACnHnB,OAAO,CAACoB,IAAI,CAAC,6EAA6E,CAAC;MAC3F,OAAO;QACHxB,OAAO,EAAE,KAAK;QACdyB,UAAU,EAAE,IAAI;QAChBnB,OAAO,EAAE;MACb,CAAC;IACL;IACA,MAAMD,KAAK;EACf;AACJ,CAAC;;AAED;AACA,OAAO,MAAMqB,YAAY,GAAG,MAAAA,CAAO;EAAEC,OAAO;EAAEC,OAAO;EAAEtB,OAAO;EAAEuB,SAAS;EAAEC,MAAM;EAAEC,eAAe;EAAEC,mBAAmB,GAAG;AAAK,CAAC,KAAK;EACjI,IAAI;IACA,MAAMC,OAAO,GAAG;MACZN,OAAO;MAAE;MACTC,OAAO;MAAE;MACTtB,OAAO;MACPuB,SAAS;MACTC,MAAM;MACNC,eAAe;MACfC;IACJ,CAAC;IACD;IACA,MAAMlC,MAAM,GAAG,MAAMP,oBAAoB,CAAC0C,OAAO,CAAC;IAClD,OAAOnC,MAAM,CAACC,IAAI;EACtB,CAAC,CAAC,OAAOM,KAAK,EAAE;IACZD,OAAO,CAACC,KAAK,CAAC,wBAAwB,EAAEA,KAAK,CAAC;IAC9C,MAAMA,KAAK;EACf;AACJ,CAAC;AAED,OAAO,MAAM6B,qBAAqB,GAAG,MAAAA,CAAOC,YAAY,EAAEd,UAAU,KAAK;EACrE,IAAI;IACA,MAAMvB,MAAM,GAAG,MAAMN,yBAAyB,CAAC;MAAE2C,YAAY;MAAEd;IAAW,CAAC,CAAC;IAC5E,OAAOvB,MAAM,CAACC,IAAI;EACtB,CAAC,CAAC,OAAOM,KAAK,EAAE;IACZD,OAAO,CAACC,KAAK,CAAC,kCAAkC,EAAEA,KAAK,

Screenshot 2025-05-30 205822.png

34.6 KB
Loading

docs/images/old_icon.png

3.83 KB
Loading

docs/images/standalone2.png

68.4 KB
Loading

image.png

42.8 KB
Loading

src/icons/image copy.png

11.5 KB
Loading

src/icons/image.png

Lines changed: 349 additions & 0 deletions
Loading

src/scripts/scrumHelper.js

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,15 +1417,20 @@ ${userReason}`;
14171417
startDateFilter = new Date(lastWeek.toISOString().split('T')[0] + 'T00:00:00Z');
14181418
endDateFilter = new Date(today.toISOString().split('T')[0] + 'T23:59:59Z');
14191419
}
1420+
1421+
const today = new Date();
1422+
today.setHours(0,0,0,0);
1423+
const itemCreatedDate = new Date(item.created_at);
1424+
itemCreatedDate.setHours(0,0,0,0);
1425+
const isCreatedToday = today.getTime() === itemCreatedDate.getTime();
14201426

1421-
const isNewPR = prCreatedDate >= startDateFilter && prCreatedDate <= endDateFilter;
1427+
const isNewPR = prCreatedDate >= startDateFilter && prCreatedDate << endDateFilter;
14221428
const prUpdatedDate = new Date(item.updated_at);
14231429
const isUpdatedInRange = prUpdatedDate >= startDateFilter && prUpdatedDate <= endDateFilter;
14241430

14251431
// Check if PR has commits in the date range
14261432
const hasCommitsInRange = item._allCommits && item._allCommits.length > 0;
14271433

1428-
log(`[PR DEBUG] PR #${number} - isNewPR: ${isNewPR}, isUpdatedInRange: ${isUpdatedInRange}, state: ${item.state}, hasCommitsInRange: ${hasCommitsInRange}, created: ${item.created_at}, updated: ${item.updated_at}`);
14291434

14301435
if (platform === 'github') {
14311436
// For existing PRs (not new), they must be open AND have commits in the date range
@@ -1439,10 +1444,21 @@ ${userReason}`;
14391444
continue;
14401445
}
14411446
}
1442-
prAction = isNewPR ? 'Made PR' : 'Existing PR';
1447+
prAction = isNewPR ? 'Made PR' : 'Updated PR';
14431448
log(`[PR DEBUG] Including PR #${number} as ${prAction}`);
1449+
1450+
if (isCreatedToday && item.State === 'open') {
1451+
prAction = 'Made PR';
1452+
} else {
1453+
prAction = 'Updated PR';
1454+
}
14441455
} else if (platform === 'gitlab') {
1445-
prAction = isNewPR ? 'Made Merge Request' : 'Existing Merge Request';
1456+
prAction = isNewPR ? 'Made Merge Request' : 'Updated Merge Request';
1457+
if (isCreatedToday && item.State === 'open') {
1458+
prAction = 'Made Merge Request';
1459+
} else {
1460+
prAction = 'Updated Merge Request';
1461+
}
14461462
}
14471463

14481464
if (isDraft) {
@@ -1507,25 +1523,31 @@ ${userReason}`;
15071523
nextWeekArray.push(li2);
15081524
}
15091525

1526+
const today = new Date();
1527+
today.setHours(0,0,0,0);
1528+
const itemCreatedDate = new Date(item.created_at);
1529+
itemCreatedDate.setHours(0,0,0,0);
1530+
const isCreatedToday = today.getTime() === itemCreatedDate.getTime();
1531+
const issueActionText = isCreatedToday ? 'Opened Issue' : 'Updated Issue'
15101532
if (item.state === 'open') {
1511-
li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a>${showOpenLabel ? ' ' + issue_opened_button : ''}</li>`;
1533+
li = `<li><i>(${project})</i> - ${issueActionText}(#${number}) - <a href='${html_url}'>${title}</a>${showOpenLabel ? ' ' + issue_opened_button : ''}</li>`;
15121534

15131535
} else if (item.state === 'closed') {
15141536

15151537

15161538
// Use state_reason to distinguish closure reason
15171539
if (item.state_reason === 'completed') {
1518-
li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a> ${issue_closed_completed_button}</li>`;
1540+
li = `<li><i>(${project})</i> - ${issueActionText}(#${number}) - <a href='${html_url}'>${title}</a> ${issue_closed_completed_button}</li>`;
15191541
} else if (item.state_reason === 'not_planned') {
1520-
li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a> ${issue_closed_notplanned_button}</li>`;
1542+
li = `<li><i>(${project})</i> - ${issueActionText}(#${number}) - <a href='${html_url}'>${title}</a> ${issue_closed_notplanned_button}</li>`;
15211543
} else {
1522-
li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a> ${issue_closed_button}</li>`;
1544+
li = `<li><i>(${project})</i> - ${issueActionText}(#${number}) - <a href='${html_url}'>${title}</a> ${issue_closed_button}</li>`;
15231545
}
15241546

15251547

15261548
} else {
15271549
// Fallback for unexpected state
1528-
li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a></li>`;
1550+
li = `<li><i>(${project})</i> - ${issueActionText}(#${number}) - <a href='${html_url}'>${title}</a></li>`;
15291551
}
15301552

15311553
log('[SCRUM-DEBUG] Added issue to lastWeekArray:', li, item);

0 commit comments

Comments
 (0)