The discussion revolves around the inability to update group owners via the Ruby or REST API in Discourse. typeoneerror notes that while owner_usernames can be assigned during group creation via the Ruby API, they cannot be updated afterward — this limitation also exists on the REST API side, where ownership assignment is restricted to group creation. typeoneerror questions whether this is intentional or warrants a pull request (PR), suggesting that the Ruby API may need groups#add_owners and groups#remove_owner methods to match REST functionality. zogstrip reminds that the UI uses the API and points to a guide on reverse-engineering it. typeoneerror confirms no existing methods handle ownership updates in the Ruby API and considers making direct HTTP PUT requests to /admin/groups/:group_name/owners as a workaround. sam acknowledges potential gaps in the API gem and encourages contributors to submit PRs to fill them. Finally, blake announces that new methods — group_add_owners and group_remove_owners — have been added to the discourse_api gem, enabling programmatic management of group owners via Ruby. Example usage is provided, confirming the issue has been resolved in the gem.
The ruby API shows an option to assign owner_usernames on create_group and update_group. The create_group seems to work (and the owner is there after the group is created) but it appears that owner_usernames are only assignable on createon the REST side of things. So we can’t promote a user to an existing group owner without the UI (at least with the Ruby API).
Is this by design or is this worth a PR? Am I correct in assuming the Ruby side of things would need matching methods for groups#add_owners and groups#remove_owner?