API to assign pipeline schedule ownership to any user
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=512601) </details> <!--IssueSummary end--> Hi, I want to automate the following process: - deactivate all pipeline schedules in a given project - run some custom code - reactivate all pipeline schedules in a given project For the execution of this script, I am using a technical user. If this user is not the owner of the pipeline schedules, it cannot switch the pipeline schedules to "inactive". As a workaround, the technical user becomes the owner of the pipeline schedule by calling the [talk ownership API endpoint](https://docs.gitlab.com/ee/api/pipeline_schedules.html#take-ownership-of-a-pipeline-schedule). After my custom code executed and the technical user reactivated all pipeline schedules again, I would like to reassign the ownership of the pipeline schedules to their previous owner. Unfortunately, the [edit pipeline schedule API endpoint](https://docs.gitlab.com/ee/api/pipeline_schedules.html#edit-a-pipeline-schedule) does not update the owner when sending a json like ```json {"owner_id": 123} ``` **Background** The script above is run by a technical user. If requires the pipeline schedules to be deactivated during execution. My personal user should be owner of those pipeline schedules for monitoring purposes. I want to get notified via email if a pipeline schedule failed.
issue