-
Notifications
You must be signed in to change notification settings - Fork 90
Fixing -closed -label- issue #207
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 refactors the ScrumHelper script to correct PR status labeling by removing closed/draft icons from the reviewed section, streamlining the PR processing loop with template literals, and introducing logic to suppress labels for both merged and closed PRs. Flow diagram for PR status label rendering logic (after fix)flowchart TD
A[Start PR rendering] --> B{Is PR a draft?}
B -- Yes --> C[Show draft label]
B -- No --> D{Is PR open?}
D -- Yes --> E[Show open label]
D -- No --> F{Is PR closed?}
F -- Yes --> G{Is PR merged?}
G -- Yes --> H[Show no label]
G -- No --> I[Show no label]
F -- No --> J[Show no label]
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 @manhuu14 - I've reviewed your changes - here's some feedback:
- Consider extracting the large PR/issue rendering loop into smaller helper functions to reduce duplication and make the flow easier to follow.
- Clean up the leftover commented-out branches (e.g. old closed/draft label logic) to keep the code tidy and avoid confusion.
- Replace or remove the console.log debug statements in favor of a consistent logging utility or eliminate them once validation is complete.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the large PR/issue rendering loop into smaller helper functions to reduce duplication and make the flow easier to follow.
- Clean up the leftover commented-out branches (e.g. old closed/draft label logic) to keep the code tidy and avoid confusion.
- Replace or remove the console.log debug statements in favor of a consistent logging utility or eliminate them once validation is complete.
## Individual Comments
### Comment 1
<location> `src/scripts/scrumHelper.js:1026` </location>
<code_context>
- ' </li>';
- nextWeekArray.push(li2);
- }
- if (item.state === 'open') {
- li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a> ${issue_opened_button}</li>`;
- } else if (item.state === 'closed') {
- li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a> ${issue_closed_button}</li>`;
</code_context>
<issue_to_address>
Inconsistent use of target='_blank' in anchor tags.
Please standardize the use of `target='_blank'` for all external links to ensure consistent navigation behavior.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@Preeti9764 can you review it. |
@manhuu14 the preview report is not getting generated.Thanks! |
Hi @Preeti9764, thank you for reviewing and pointing out the behavior regarding the preview report. ✔️ Based on your observation and the current state of the master branch, it seems the issue (Closed label on merged PRs in the reviewed section — #178) has already been addressed. 📝 In this PR, I had implemented: Logic to suppress the "Closed" label for merged PRs. Ensured only "Open" PRs show the correct label. Refactored the rendering logic with better structure and cleaner loops. Added debug logs for clarity during development. 🛠️ If the fix is now already present in the master branch (as you mentioned), this PR might be considered redundant unless there are any additional improvements or cleanups you'd like me to retain (e.g., refactored rendering or suppressed redundant code blocks). Please let me know if you'd like me to: Close this PR, Adjust it to keep only helpful refactor/cleanup, Or if anything else is needed on my part. Thanks again for your time and guidance! |
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.
need changes
@Preeti9764 changes? |
Fixes #178 — Closed label is visible for merged PRs in reviewed section.
Fixed incorrect status labeling in the reviewed PRs section.
Added logic to display only the "open" label for open PRs.
Prevented display of the "closed" label for merged PRs.
Ensured merged PRs are not mislabeled as closed.


📸 Screenshots
before:-
after:-
Summary by Sourcery
Fix status labeling in reviewed PRs by only displaying open labels for open pull requests and hiding closed labels for merged or closed PRs, and streamline the rendering logic.
Bug Fixes:
Enhancements: