- Notifications
You must be signed in to change notification settings - Fork673
Support setting commit status#82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -787,6 +802,7 @@ class Project(GitlabObject): | |||
managers = [ | |||
('branches', ProjectBranchManager, [('project_id', 'id')]), | |||
('commits', ProjectCommitManager, [('project_id', 'id')]), | |||
('statuses', ProjectCommitStatusManager, [('project_id', 'id')]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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 tothe appropriate commit URL. The status can be updated by a subsequentPOST to the same URL with the same `name` and `ref`, but differentvalues for `state`, `description`, etc.Note: Listing the commit statuses is not yet supported. This is donethrough 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"
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
name
andref
, but differentvalues for
state
,description
, etc.