Skip to content

fix: cleaned up and added roles aswell as comments #1010

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cherryl1k
Copy link
Collaborator

@cherryl1k cherryl1k commented Aug 6, 2025

added some roles that i left out in my first pull request (there's a lot of roles sorry)
aswell as comments
and this needs to be tested in the main .gg/linux server first before being merged

Summary by Sourcery

Bug Fixes:

  • Add missing OS roles (_endeavouros, _solus, grey_question) to the role count component

Copy link
Contributor

sourcery-ai bot commented Aug 6, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Extends the role count cog by adding three missing OS roles to the configuration.

Class diagram for updated OS roles configuration in rolecount.py

classDiagram
    class RoleConfig {
        +int id
        +str name
    }
    class RoleCountCog {
        +os_ids: List[RoleConfig]
        +lang_ids: List[RoleConfig]
    }
    RoleCountCog --> "*" RoleConfig : contains
    %% Highlight new roles
    class EndeavourOS_Role {
        +id = 1386793599483646044
        +name = "_endeavouros"
    }
    class Solus_Role {
        +id = 1367198731115434035
        +name = "_solus"
    }
    class GreyQuestion_Role {
        +id = 1297922102917206109
        +name = "grey_question"
    }
    RoleCountCog ..> EndeavourOS_Role : added
    RoleCountCog ..> Solus_Role : added
    RoleCountCog ..> GreyQuestion_Role : added
Loading

File-Level Changes

Change Details Files
Extend role count configuration with missing OS roles
  • Add EndeavourOS role entry with ID 1386793599483646044
  • Add Solus role entry with ID 1367198731115434035
  • Add generic 'other OS' (grey_question) role entry with ID 1297922102917206109
tux/cogs/guild/rolecount.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

github-actions bot commented Aug 6, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @cherryl1k - I've reviewed your changes - here's some feedback:

  • Consider moving the static role ID list into an external config (JSON/YAML) or database so you don’t need to modify the code every time a new role is added.
  • The role entries aren’t sorted—keeping them in alphabetical or numeric order will make future diffs and lookups much clearer.
  • It might be helpful to add a startup check that logs a warning if any configured role ID isn’t found in the guild, so typos or missing roles are caught early.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider moving the static role ID list into an external config (JSON/YAML) or database so you don’t need to modify the code every time a new role is added.
- The role entries aren’t sorted—keeping them in alphabetical or numeric order will make future diffs and lookups much clearer.
- It might be helpful to add a startup check that logs a warning if any configured role ID isn’t found in the guild, so typos or missing roles are caught early.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

cloudflare-workers-and-pages bot commented Aug 6, 2025

Deploying tux with  Cloudflare Pages  Cloudflare Pages

Latest commit: 98c78ae
Status: ✅  Deploy successful!
Preview URL: https://bfbc0b39.tux-afh.pages.dev
Branch Preview URL: https://rolecount-fix-missing-roles.tux-afh.pages.dev

View logs

Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@96a7a58). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tux/cogs/guild/rolecount.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main   #1010   +/-   ##
======================================
  Coverage        ?   9.61%           
======================================
  Files           ?     123           
  Lines           ?   10422           
  Branches        ?    1280           
======================================
  Hits            ?    1002           
  Misses          ?    9316           
  Partials        ?     104           
Flag Coverage Δ *Carryforward flag
database 0.31% <ø> (?) Carriedforward from 9cba8da
integration 5.85% <0.00%> (?)
unit 6.30% <0.00%> (?)

*This pull request uses carry forward flags. Click here to find out more.

Components Coverage Δ
Core Bot Infrastructure 16.43% <ø> (?)
Database Layer 0.00% <ø> (?)
Bot Commands & Features 0.00% <0.00%> (?)
Event & Error Handling ∅ <ø> (?)
Utilities & Helpers ∅ <ø> (?)
User Interface Components 0.00% <ø> (?)
CLI Interface ∅ <ø> (?)
External Service Wrappers ∅ <ø> (?)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cherryl1k cherryl1k force-pushed the rolecount/fix-missing-roles branch from 46a9616 to 02379b9 Compare August 6, 2025 20:23
@cherryl1k cherryl1k changed the title fix: added missing roles fix: cleaned up and added roles aswell as comments Aug 6, 2025
@cherryl1k cherryl1k force-pushed the rolecount/fix-missing-roles branch 2 times, most recently from d1efe3f to 6a9d1a4 Compare August 9, 2025 23:42
@cherryl1k cherryl1k force-pushed the rolecount/fix-missing-roles branch from 6a9d1a4 to 98c78ae Compare August 18, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant