{"id":28610925,"url":"https://github.com/amezin/create-commit-action","last_synced_at":"2026-01-28T18:08:03.162Z","repository":{"id":294734553,"uuid":"987892644","full_name":"amezin/create-commit-action","owner":"amezin","description":"Create a verified detached commit through GitHub API","archived":false,"fork":false,"pushed_at":"2025-06-09T20:43:45.000Z","size":1432,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T21:33:23.274Z","etag":null,"topics":["action","actions","commit","github-action","github-actions","github-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amezin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-21T18:38:23.000Z","updated_at":"2025-06-09T20:42:24.000Z","dependencies_parsed_at":"2025-05-21T20:35:10.797Z","dependency_job_id":"461c1bfc-820d-4b1e-875a-20831c42632b","html_url":"https://github.com/amezin/create-commit-action","commit_stats":null,"previous_names":["amezin/create-commit-action"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/amezin/create-commit-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-commit-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-commit-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-commit-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-commit-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amezin","download_url":"https://codeload.github.com/amezin/create-commit-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-commit-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259360994,"owners_count":22845828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","actions","commit","github-action","github-actions","github-api"],"created_at":"2025-06-11T23:07:49.160Z","updated_at":"2026-01-28T18:08:03.157Z","avatar_url":"https://github.com/amezin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create Detached Commit\n\nCreate a commit through GitHub API, completely without `git` CLI.\n\n- The commit will be authored by the owner of API token.\n\n- The commit will be displayed by GitHub as \"verified\".\n\n- The commit can be created on top of any other commit - not just a branch head.\n\n- The commit won't belong to any branch. If necessary, other actions should be\n  used to create or update the branch - https://github.com/amezin/create-or-update-git-ref-action.\n\n## Usage example\n\nA workflow that generates a file and adds it to the `main` branch through a pull request:\n\nhttps://github.com/amezin/pull-request-generator/blob/main/.github/workflows/make-pull-request.yml\n\n## Currently unsupported\n\n- Deleting files\n\n- Conversion of line endings (should only matter on Windows)\n\n- Symlinks on Windows\n\n## Inputs\n\n### `message`\n\nThe commit message. No default value. Required input.\n\n### `files`\n\nFiles to include in the commit, one file or pattern per line.\n\nNo default value. Required input.\n\nSupports wildcard patterns -\nsee [`@actions/glob`](https://github.com/actions/toolkit/blob/main/packages/glob/README.md).\n\nSymbolic links are not followed - symlinks themselves are added to the commit.\n\nRelative paths are resolved against the default working directory -\n`${{ github.workspace }}` or `$GITHUB_WORKSPACE`.\n\nMay include unchanged files.\n\n\u003e [!WARNING]\n\u003e Currently, symlinks are unintentionally followed on Windows.\n\n\u003e [!WARNING]\n\u003e Currently, it's not possible to delete files using this action.\n\n### `toplevel`\n\nRoot/top-level directory of the repository.\n\nWith `files: subdir/a.txt` and `toplevel: subdir`, `a.txt` will be added to\nthe root directory of the repository.\n\n**Default**: the default working directory - `${{ github.workspace }}` or `$GITHUB_WORKSPACE`.\n\n### `parent`\n\nParent commit SHA.\n\n**Default**: `${{ github.sha }}` - the commit that triggered the workflow.\n\n### `repository`\n\nThe owner and repository name, in `owner/name` format.\n\n**Default**: `${{ github.repository }}` - the repository where the workflow was triggered.\n\n### `github-token`\n\nGitHub API token to use.\n\nMust have `contents: write` permission.\n\nThe application or user the token belongs to will become the author of the commit.\n\n**Default**: `${{ github.token }}`\n\n\u003e [!NOTE]\n\u003e With the default token, `github-actions[bot]` will be the commit author.\n\n## Outputs\n\n### `sha`\n\nSHA of the created commit.\n\n### `url`\n\nAPI URL of the created commit.\n\n### `html_url`\n\nBrowser URL of the created commit.\n\n### `commit`\n\nCommit object as JSON. Can be passed to [`fromJSON()`] function to extract the necessary data.\n\nSee https://docs.github.com/en/rest/git/commits#get-a-commit-object\n\n### `tree`\n\nTree object as JSON. Can be passed to [`fromJSON()`] function to extract the necessary data.\n\nSee https://docs.github.com/en/rest/git/trees#get-a-tree\n\n### `tree_sha`\n\nSHA of the created Git tree.\n\n### `tree_url`\n\nAPI URL of the created Git tree.\n\n## Why not GraphQL [`createCommitOnBranch`]\n\nThis action is intended to be used by workflows that update auto-generated\nfiles through pull requests.\n\nOf course, you can create a branch, then use [`createCommitOnBranch`], then\ncreate a pull request. But how to update the pull request, when something else\ngets merged into `main`, and the changes in the pull request probably need\nto be updated/re-generated?\n\nWith [`createCommitOnBranch`] your only option seems to be creating\na new branch for every run. You can't amend the commit, and you can't rebase\nthe branch and update the commit at once (in a way that won't trigger CI\nfor the pull request twice).\n\nHowever, if the commit is initially detached, you can simply update\npull request's head branch to point to the new commit.\n\n[`createCommitOnBranch`]: https://docs.github.com/en/graphql/reference/mutations#createcommitonbranch\n[`fromJSON()`]: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#fromjson\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famezin%2Fcreate-commit-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famezin%2Fcreate-commit-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famezin%2Fcreate-commit-action/lists"}