Implement Commit Status API
This is preliminary implementation of Commit Status API, pretty much compatible with GitHub.
- The Commit Statuses are stored in separate table: ci_commit_status.
- The POST inserts a new row.
- To POST execute GitLab API
post :id/repository/commits/:sha/status
. This accepts dual authorization:
- Using authorized user
- Using ci-token to allow easy posting from CI Services
- This adds predefined variable to GitLab CI build environment: CI_BUILD_STATUS_URL, allowing to easy post status from within build (ex. with code coverage or other metrics).
- This adds statuses to commit's builds view.
- The commit's status is calculated taking into account status of all builds and all posted statuses.
- The commit statuses doesn't trigger notifications.
- The commit status API introduces two new privileges:
read_commit_statuses
andcreate_commit_status
. - We still miss a few tests and documentation updates for API and CI.
@dzaporozhets @sytses What do you think?