-
Notifications
You must be signed in to change notification settings - Fork 87
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>
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: