{"id":13513998,"url":"https://github.com/planetscale/ghcommit","last_synced_at":"2025-12-24T10:29:57.121Z","repository":{"id":151718599,"uuid":"624018107","full_name":"planetscale/ghcommit","owner":"planetscale","description":"Use GitHub's GraphQL API to commit files to a GitHub repository.","archived":false,"fork":false,"pushed_at":"2025-03-22T00:43:54.000Z","size":195,"stargazers_count":34,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-24T01:13:54.904Z","etag":null,"topics":["git","github","graphql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/planetscale.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-05T15:12:29.000Z","updated_at":"2025-03-22T00:40:55.000Z","dependencies_parsed_at":"2023-11-29T15:28:20.884Z","dependency_job_id":"5ac80e2b-2d5c-4363-a50e-275c145d74ba","html_url":"https://github.com/planetscale/ghcommit","commit_stats":null,"previous_names":[],"tags_count":78,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetscale%2Fghcommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetscale%2Fghcommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetscale%2Fghcommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planetscale%2Fghcommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/planetscale","download_url":"https://codeload.github.com/planetscale/ghcommit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246407400,"owners_count":20772126,"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":["git","github","graphql"],"created_at":"2024-08-01T05:00:42.338Z","updated_at":"2025-12-24T10:29:57.108Z","avatar_url":"https://github.com/planetscale.png","language":"Go","readme":"# ghcommit\n\nUse GitHub's GraphQL API `createCommitOnBranch` mutation to commit files to a GitHub repository.\n\nThere is a companion GitHub Action in the the [ghcommit-action](https://github.com/planetscale/ghcommit-action) repo.\n\n## Why?\n\nEnable keyless signing in CI environments. Especially useful for repos which require signed commits and have\nCI worklows that commit back to the repo (eg: code formatters, generators, etc).\n\nNormally in order to sign commits from within a CI pipeline you would need to setup and manage GPG or SSH keys\nin the CI pipeline. And you take on the risk of those keys be copied by developers with access to the CI environment.\nThe keys will need to be rotated as people leave the team or keys expire. Using `ghcommit` instead uses the GitHub\nGraphQL API to make git commits which are signed by GitHub's web flow GPG key.\n\n\u003e :warning: This is meant for use in CI environments and with small commits. For example, a CI workflow\nthat formats code and commits the changes. This is not meant to be used for large commits\nand should not be used in place of `git` for day-to-day development.\n\n## Install\n\n1. go install: `go install github.com/planetscale/ghcommit@latest`\n2. Binaries, tarballs, and docker images are available on the [github releases](https://github.com/planetscale/ghcommit/releases) page.\n\n## Usage\n\nA `GITHUB_TOKEN` environment variable must be set.\n\nThe `-r/--repository`, `-b/--branch`, and `-m/--message` flags are required.\n\nAt least one added/changed or deleted file must be specified.\n\nProvide a list of changed/added (`-a/--add`) or deleted (`-d/--delete`) files.  The `-a` and `-d` flags may be used multiple times.\n\n```console\nghcommit -r owner/repo -b branch --add newfile.txt --add changedfile.txt --delete deletedfile.txt\n```\n\nAll flags may be provided via environment variables. Run `ghcommit -h` to see the full list of flags and env vars.\n\n\u003e NOTE: Changes are not reflected on the local clone of the repository. The commit is made directly to the GitHub repository.\n\u003e This utility is meant to be run from CI pipelines where the local clone is ephemeral.\n\n## Alternatives\n\nAs mentioned above, it is possible to sign commits with GPG.\n\nAnother option which uses a form of keyless signing is the [sigstore/gitsign](https://github.com/sigstore/gitsign)\nproject.  However, as of April 2023, GitHub does not recognize signatures created by `gitsign` so\nthese commits will not be identified as \"verified\" by GitHub.\n\n## Releasing\n\nReleases are generated automatically on all successful `main` branch builds. This project uses\n[autotag](https://github.com/pantheon-systems/autotag) and [goreleaser](https://goreleaser.com/) to\nautomate this process.\n\nSemver (`vMajor.Minor.Patch`) is used for versioning and releases. By default, `autotag` will bump the\npatch version on a successful main build, eg: `v1.0.0` -\u003e `v1.0.1`.\n\nTo bump the major or minor release instead, include `[major]` or `[minor]` in the commit message.\nRefer to the autotag [docs](https://github.com/pantheon-systems/autotag#incrementing-major-and-minor-versions)\nfor more details.\n\nInclude `[skip ci]` in the commit message to prevent a new version from being released. Only use this\nfor things like documentation updates.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanetscale%2Fghcommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplanetscale%2Fghcommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanetscale%2Fghcommit/lists"}