rbtools.api.resource.validate_diff_commit¶
Resource definitions for diff commit validation.
Added in version 6.0: This was moved from rbtools.api.resource.
Classes
|
Singleton resource for commit validation. |
- class rbtools.api.resource.validate_diff_commit.ValidateDiffCommitResource(transport: Transport, payload: JSONDict, url: str, token: str | None = None, **kwargs)[source]¶
Bases:
ItemResourceSingleton resource for commit validation.
This corresponds to Review Board’s Validate Diff Commit List Resource.
- __firstlineno__ = 22¶
- __static_attributes__ = ()¶
- validate_commit(repository: str, diff: bytes, commit_id: str, parent_id: str, parent_diff: bytes | None = None, base_commit_id: str | None = None, validation_info: str | None = None, **kwargs: QueryArgs) HttpRequest[source]¶
Validate the diff for a commit.
- Parameters:
repository (
str) – The name of the repository.diff (
bytes) – The contents of the diff to validate.commit_id (
str) – The ID of the commit being validated.parent_id (
str) – The ID of the parent commit.parent_diff (
bytes, optional) – The contents of the parent diff.base_commit_id (
str, optional) – The base commit ID.validation_info (
str, optional) – Validation information from a previous call to this resource.**kwargs (
dictofrbtools.api.request.QueryArgs) – Query arguments to include with the request.
- Returns:
The validation result.
- Return type: