-
Notifications
You must be signed in to change notification settings - Fork 671
Add project push rules configuration #520
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 project push rules configuration #520
Conversation
Hi @esabouraud I don't really understand why you removed the CreateMixin, it looks like creation is possible (from the docs and the code). The only thing that doesn't seem possible is to get a single rule. Did I miss something? |
Hi @gpocentek At first glance the
As for the API itself, it's a bit unusual in that push rules are not referenced by id. Rather they are optional attributes that can be edited. The documentation itself is inconsistent as it sometimes refers to "a push rule", and sometimes to "push rules". |
This endpoint is really weird, and indeed the mixins don't really work well together. The only solution I see to implement all the features, including create and delete, is to write class-specific methods instead of using the mixins. Mixins make most objects very simple to define, but sometimes duplicating a little bit of code is necessary. Could you try that? Thanks for your work! |
OK I've implemented the create and delete methods of the endpoint, while keeping things fairly nice and tidy (I think). It was mostly a matter of allowing delete without an object id. |
Thanks @esabouraud ! |
Thank you @gpocentek for your diligent work on this module. |
This PR introduces support for project push rules configuration.