立即开始
GitHub Tools

Github Create Or Update File Contents

通过 Aident Loadout 使用 GitHub Tools 的 Github Create Or Update File Contents。执行前查看输入、输出、设置、价格和风险。

写入操作风险等级 2/5OAuth 连接

服务提供商说明

Creates a new file or updates an existing file in a GitHub repository; SHA can be provided to validate file updates, automatically fetched if not provided.

价格与限制

价格
免费操作
统一支付
暂不支持

输入

  • shastring
    The blob SHA of the file being replaced. Automatically fetched if not provided. If a 409 conflict occurs (SHA mismatch due to concurrent modifications), the action will automatically retry up to 5 times with exponential backoff and jitter.
  • pathstring
    必填
    The full path to the file in the repository, including the filename and extension. Do not include leading slashes.
  • repostring
    必填
    The name of the repository (not case sensitive, without the `.git` extension).
  • ownerstring
    必填
    The account owner of the repository (not case sensitive).
  • branchstring
    The branch name. Defaults to the repository's default branch if omitted. If a non-existent branch is specified, the action will automatically fall back to the repository's default branch. For empty repositories, omitting this parameter is recommended to let GitHub initialize wit…
  • contentstring
    必填
    The new file content. Can be provided as plain text (will be automatically encoded to Base64) or as Base64-encoded text. GitHub API requires Base64 encoding, which this action handles automatically.
  • messagestring
    必填
    The commit message for this file creation or update.
  • author__datestring
    Author's timestamp (ISO 8601 format). Defaults to committer's date if author details are provided but date is not.
  • author__namestring
    Author's name. If specified, `author_email` is also required. Defaults to committer details; if all committer/author details omitted, GitHub uses authenticated user.
  • author__emailstring
    Author's email. If specified, `author_name` is also required. Defaults to committer details; if all committer/author details omitted, GitHub uses authenticated user.
  • committer__datestring
    Committer's commit timestamp (ISO 8601 format). Defaults to current time if committer details are provided but date is not.
  • committer__namestring
    Committer's name. If specified, `committer_email` is also required. GitHub uses authenticated user if all committer/author details omitted.

可观察输出

  • data
    必填
    Data from the action execution
  • errorstring
    Error if any occurred during the execution of the action
  • successfulboolean
    必填
    Whether or not the action execution was successful or not

使用此操作的技能

相关使用场景

尚未关联经过验证的相关使用场景。

官方来源

服务提供商来源