GitHub - Create/Update File
Update an existing file or create a new one via a direct commit
GitHub: Create/Update File
5Description
The GitHub: Create/Update File node is the ultimate action for autonomous AI workflows. It allows your Deforge agents to actively write code, modify configuration files, or generate documentation directly into a GitHub repository. Behind the scenes, this node automatically checks if a file exists, handles the SHA hashing required by GitHub's API, encodes your new text into Base64, and pushes a clean commit to the branch of your choice.
This node unlocks true "AI Developer" capabilities. When passed as a Tool to an LLM node, your agent gains the ability to execute code changes autonomously. Whether it's fixing a typo, updating a dependency, or writing a brand new script, this node acts as the agent's hands.
Common Use Cases
- Autonomous Bug Fixing: Combine this node with the GitHub: Read File tool, allowing an LLM to read a broken file, generate the corrected code, and immediately commit the fix to a new branch.
- Automated Documentation: Trigger a workflow whenever new code is merged, passing the changes to an LLM to generate an updated
README.mdorCHANGELOG.md, and pushing the update directly to the repository. - Dynamic Configuration Management: Build workflows that automatically update JSON or YAML configuration files (like pricing tiers, feature flags, or environment variables) based on external triggers like a Stripe payment or a Slack command.
Inputs
The input connections this node accepts:
NameDescriptionTypeFlowThe flow of the workflowFlowRepositoryRepository (e.g., octocat/Hello-World)TextFile PathFile Path (e.g., src/index.js)TextNew ContentThe new text/code content of the fileTextCommit MessageCommit messageTextBranchBranch to commit to (defaults to main/master if empty)TextOutputs
The output connections this node provides:
NameDescriptionTypeFlowThe Flow to continueFlowCommit URLThe URL of the created commitTextCommit SHAThe SHA hash of the commitTextToolThe tool version of this node, to be used by LLMsToolFields
The configurable fields this node provides:
NameDescriptionTypeRepositoryRepository (e.g., owner/repo)Value: ``TextFile PathPath to the fileValue:README.mdTextNew ContentThe new text/code content of the fileValue: ``TextAreaCommit MessageCommit MessageValue: Update file via Deforge AgentTextBranchTarget BranchValue: mainTextGitHubConnect your GitHub accountDefaultValue: ``socialLast updated on