Improve pipeline triggers API
What does this MR do?
/api/v4/projects/:id/trigger/pipeline that replaces
Previous build trigger was user-less, the new pipeline trigger is user-aware. This MR introduces backend changes to make it user aware. The new create token with API will have a user assigned.
This MR also introduces trigger description and slightly improves API:
POST /api/v4/projects/:id/triggers- creates a trigger with permission of current user and requires description,
PUT /api/v4/projects/:id/triggers/:trigger_id- updates a trigger description,
POST /api/v4/projects/:id/triggers/:trigger_id/take- takes ownership of trigger,
POST /api/v4/projects/:id(/ref/:ref)/trigger/pipeline- returns
This also contains a part of changes that are introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9277. And it's there to solve this story: https://gitlab.com/gitlab-org/gitlab-ce/issues/27156.
Does this MR meet the acceptance criteria?
- Changelog entry added
- Documentation created/updated
- API support added
- Added for this feature/bug
- All builds are passing
- Conform by the merge request performance guides
- Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
- Squashed related commits together