feat(api): pipeline inputs support (#3194) · python-gitlab/python-gitlab@306c4b1
@@ -429,6 +429,7 @@ def trigger_pipeline(
429429ref: str,
430430token: str,
431431variables: dict[str, Any] | None = None,
432+inputs: dict[str, Any] | None = None,
432433**kwargs: Any,
433434 ) -> ProjectPipeline:
434435"""Trigger a CI build.
@@ -439,15 +440,22 @@ def trigger_pipeline(
439440 ref: Commit to build; can be a branch name or a tag
440441 token: The trigger token
441442 variables: Variables passed to the build script
443+ inputs: Inputs passed to the build script
442444 **kwargs: Extra options to send to the server (e.g. sudo)
443445444446 Raises:
445447 GitlabAuthenticationError: If authentication is not correct
446448 GitlabCreateError: If the server failed to perform the request
447449 """
448450variables = variables or {}
451+inputs = inputs or {}
449452path = f"/projects/{self.encoded_id}/trigger/pipeline"
450-post_data = {"ref": ref, "token": token, "variables": variables}
453+post_data = {
454+"ref": ref,
455+"token": token,
456+"variables": variables,
457+"inputs": inputs,
458+ }
451459attrs = self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
452460if TYPE_CHECKING:
453461assert isinstance(attrs, dict)