-
Notifications
You must be signed in to change notification settings - Fork 87
added Standard closed label for issues #196
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
base: master
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR extends the issue-status labeling by introducing two new closed-state buttons, updates the popup UI to reflect Open/Merged/Closed options (including a new commit-display toggle), and removes the now-obsolete user blocker input along with its storage and event handling. Class diagram for updated scrumHelper.js data handlingclassDiagram
class StorageItems {
+string githubUsername
+string projectName
+string githubToken
+string lastWeekContribution
+string yesterdayContribution
+string showOpenLabel
+string showCommits
-string userReason
}
class allIncluded {
+allIncluded(outputTarget)
+Handles: githubUsername, projectName, githubToken, lastWeekContribution, yesterdayContribution, showOpenLabel, showCommits
-userReason = 'No Blocker at the moment'
}
StorageItems <|-- allIncluded
Class diagram for new issue state label renderingclassDiagram
class IssueLabelRenderer {
+issue_closed_button
+issue_opened_button
+issue_closed_completed_button
+issue_closed_notplanned_button
+renderIssueLabel(item)
}
class IssueItem {
+string state
+string state_reason
+string html_url
+string title
+string number
+string project
}
IssueItem --> IssueLabelRenderer: used by
Class diagram for main.js UI event handling changesclassDiagram
class MainUI {
+showOpenLabelElement
+showCommitsElement
-userReasonElement // removed
+handleBodyOnLoad()
+handleOpenLabelChange()
+handleShowCommitsChange()
-handleUserReasonChange() // removed
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Preeti9764 - I've reviewed your changes - here's some feedback:
- Consolidate the inline badge HTML in scrumHelper.js into a helper or CSS classes to avoid repetitive styling across status badges.
- Remove all residual
userReason
code and references (storage, comments, docs) now that the input has been removed to keep the codebase clean. - The updated “Show Open/Merged/Closed Labels” setting implies merged PR support, but the logic only handles open/closed states—ensure merged PRs are properly detected and labeled.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consolidate the inline badge HTML in scrumHelper.js into a helper or CSS classes to avoid repetitive styling across status badges.
- Remove all residual `userReason` code and references (storage, comments, docs) now that the input has been removed to keep the codebase clean.
- The updated “Show Open/Merged/Closed Labels” setting implies merged PR support, but the logic only handles open/closed states—ensure merged PRs are properly detected and labeled.
## Individual Comments
### Comment 1
<location> `src/scripts/main.js:11` </location>
<code_context>
let startingDateElement = document.getElementById('startingDate');
let endingDateElement = document.getElementById('endingDate');
let showOpenLabelElement = document.getElementById('showOpenLabel');
-let userReasonElement = document.getElementById('userReason');
+let userReasonElement = null; // userReason element removed from UI
let showCommitsElement = document.getElementById('showCommits');
</code_context>
<issue_to_address>
Consider removing all references to userReasonElement for clarity.
Since the UI element has been removed, deleting the variable and related code will help prevent confusion and reduce the risk of future errors.
Suggested implementation:
```javascript
let startingDateElement = document.getElementById('startingDate');
let endingDateElement = document.getElementById('endingDate');
let showOpenLabelElement = document.getElementById('showOpenLabel');
let showCommitsElement = document.getElementById('showCommits');
```
You should also search the rest of `src/scripts/main.js` for any other references to `userReasonElement` (such as assignments, event listeners, or logic using this variable) and remove those lines as well. If any functions or logic blocks depend on `userReasonElement`, refactor or remove them as appropriate to ensure the code remains clean and functional.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@hpdang does the label seems good ,please share your review .Thanks! |
@Preeti9764 a bit confusing to me: in your screenshot, in the beginning, it showed Opened Issue (#176) then the end, it showed not planned, so that issue is open or closed? |
It is closed as not planned. I just closed it as a not planned issue for testing the labels. As we decided to have separate labels for different types of issue closing, it is one of those types.Thanks! |
📌 Fixes
Fixes #186
📝 Summary of Changes
📸 Screenshots / Demo (if UI-related)
✅ Checklist
👀 Reviewer Notes
Add any special notes for the reviewer here
Summary by Sourcery
Introduce distinct labels for closed issues, add a toggle to display commits on open PRs, remove the blocker input field, and update UI and storage logic accordingly
New Features:
Enhancements: