Skip to main content

GitHubFileEditor

A Haystack component for editing files in GitHub repositories.

Basic Information

  • Type: haystack_integrations.github.src.haystack_integrations.components.connectors.github.file_editor.GitHubFileEditor

Inputs

ParameterTypeDefaultDescription
commandUnion[Command, str]Operation to perform ("edit", "undo", "create", "delete")
payloadDict[str, Any]Dictionary containing command-specific parameters
repoOptional[str]NoneRepository in owner/repo format (overrides default if provided)
branchOptional[str]NoneBranch to perform operations on (overrides default if provided)

Outputs

ParameterTypeDefaultDescription
resultstrDictionary containing operation result

Overview

Work in Progress

Bear with us while we're working on adding pipeline examples and most common components connections.

A Haystack component for editing files in GitHub repositories.

Supports editing, undoing changes, deleting files, and creating new files through the GitHub API.

Usage Example

components:
GitHubFileEditor:
type: github.src.haystack_integrations.components.connectors.github.file_editor.GitHubFileEditor
init_parameters:

Parameters

Init Parameters

These are the parameters you can configure in Pipeline Builder:

ParameterTypeDefaultDescription
github_tokenSecretSecret.from_env_var('GITHUB_TOKEN')GitHub personal access token for API authentication
repoOptional[str]NoneDefault repository in owner/repo format
branchstrmainDefault branch to work with
raise_on_failureboolTrueIf True, raises exceptions on API errors

Run Method Parameters

These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.

ParameterTypeDefaultDescription
commandUnion[Command, str]Operation to perform ("edit", "undo", "create", "delete")
payloadDict[str, Any]Dictionary containing command-specific parameters
repoOptional[str]NoneRepository in owner/repo format (overrides default if provided)
branchOptional[str]NoneBranch to perform operations on (overrides default if provided)