-
-
Notifications
You must be signed in to change notification settings - Fork 102
Add parent_id
and lock_permissions
to reposition_channels
#2238
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
Add parent_id
and lock_permissions
to reposition_channels
#2238
Conversation
…bility and maintainability
…nitialization parameters
…sition_channels`
This should be the first Iteration of this feature. Tests and docs are not done yet!
Let me know about your opinions and I would be happy to implement them. |
I will take a look in a hour or so |
Signed-off-by: Christopher <github.android206@passmail.net>
(feature/reposition-channels)
(feature/reposition-channels)
… method. (feature/reposition-channels)
…feature/reposition-channels)
Signed-off-by: Christopher <github.android206@passmail.net>
Added a reason parameter to the ChannelRepositioner class in order to provide an explanation that will be recorded in the audit logs. (issue: feature/reposition-channels)
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.
Only small things. Thanks for working on this!
Co-authored-by: davfsa <davfsa@gmail.com> Signed-off-by: Christopher <github.android206@passmail.net>
…tionedChannel in special_endpoints Changed `RepositionChannelHelper` class to `RepositionedChannel` in special_endpoints.py and api/special_endpoints.py files. (issue #feature/reposition-channels)
…ure/reposition-channels)
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.
Pull Request Overview
This PR moves reposition_channels
into the special_endpoints
builder pattern and adds support for parent_id
and lock_permissions
when repositioning channels.
- Introduces
ChannelRepositioner
andRepositionedChannel
implementations inhikari/impl/special_endpoints.py
- Changes
RESTClient.reposition_channels
to return a repositioner builder instead of executing immediately - Updates API definitions, documentation, and tests to cover the new parameters
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
hikari/impl/special_endpoints.py | Adds ChannelRepositioner and RepositionedChannel classes, including parent and lock_permissions support |
hikari/impl/rest.py | Modifies reposition_channels to return a builder with the new parameters |
hikari/api/special_endpoints.py | Defines abstract builder interfaces for channel repositioning |
hikari/api/rest.py | Updates abstract reposition_channels to return the builder and documents usage |
tests/hikari/impl/test_special_endpoints.py | Adds tests for the new builder methods and parameters |
Comments suppressed due to low confidence (3)
hikari/impl/special_endpoints.py:303
- The docstring references
RepositionChannelHelper
, but the abstract class is namedRepositionedChannel
. Please update the reference to match the class name.
class RepositionedChannel(special_endpoints.RepositionedChannel):
hikari/api/rest.py:5720
- The parameter docs describe a mapping from channel to position, but the signature is
Mapping[int, Channel]
(position → channel). Please reconcile the description with the actual key/value ordering.
positions
hikari/api/special_endpoints.py:234
- The abstract
add_reposition_channel
requireslock_permissions
andparent
without defaults, but the implementation acceptsundefined.UndefinedOr
defaults. Consider making the API signature optional to match the implementation.
def add_reposition_channel(
…ion. (feature/reposition-channels)
…sitions properly (feature/reposition-channels)
Summary
reposition_channels
tospecial_endpoints
without breaking/deprecating anything.parent_id
andlock_permissions
for every channel.Checklist
nox
and all the pipelines have passed.Related issues
closes #523