Support setting commit status#82
Conversation
gitlab/objects.py
Outdated
There was a problem hiding this comment.
For consistency I'd call the attribute 'commitstatuses' instead of 'statuses' (to match the class name).
|
Looks good, but could you address my comments? Thanks! |
|
Sure, thanks for the review and suggestions. I update based on your recommendations. |
Support commit status updates. Commit status can be set by a POST to
the appropriate commit URL. The status can be updated by a subsequent
POST to the same URL with the same `name` and `ref`, but different
values for `state`, `description`, etc.
Note: Listing the commit statuses is not yet supported. This is done
through a different path on the server, under the `repository` path.
Example of use from the CLI:
# add a build status to a commit
gitlab project-commit-status create --project-id 2 \
--commit-id a43290c --state success --name ci/jenkins \
--target-url http://server/build/123 \
--description "Jenkins build succeeded"
7b96b0c to
3371008
Compare
|
OK, I addressed your comments by doing the following and rebased the topic branch fresh on master:
The usage example seems helpful to give a quick summary of the expectations of the multiple GitLab attributes for this operation: And the docstring that was in the Gitlab class function was a useful quick reference: At some point it would be nice to add this kind of info to the docs for the project-commit-status creation operation. |
Support setting commit status
|
Thanks for the patch. I'll add the documentation bits |
Support commit status updates. Commit status can be set by a POST to
the appropriate commit URL. The status can be updated by a subsequent
POST to the same URL with the same
nameandref, but differentvalues for
state,description, etc.