{"id":23529708,"url":"https://github.com/jaid/commit-from-action","last_synced_at":"2025-04-22T17:24:29.906Z","repository":{"id":50776671,"uuid":"224995106","full_name":"Jaid/commit-from-action","owner":"Jaid","description":"Utility class for making changes to a repository from a GitHub Action.","archived":false,"fork":false,"pushed_at":"2023-03-08T04:38:39.000Z","size":5651,"stargazers_count":2,"open_issues_count":10,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-22T17:24:15.177Z","etag":null,"topics":["action","actions","class","commit","fs","git","git-commit","github-action","github-actions","library","push","utility","vcs"],"latest_commit_sha":null,"homepage":"https://github.com/Jaid/commit-from-action","language":"JavaScript","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/Jaid.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"Jaid","custom":"https://twitch.tv/products/jaidchen"}},"created_at":"2019-11-30T10:26:16.000Z","updated_at":"2023-03-10T09:05:27.000Z","dependencies_parsed_at":"2023-01-29T02:45:38.159Z","dependency_job_id":null,"html_url":"https://github.com/Jaid/commit-from-action","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fcommit-from-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fcommit-from-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fcommit-from-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fcommit-from-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jaid","download_url":"https://codeload.github.com/Jaid/commit-from-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250285942,"owners_count":21405337,"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","class","commit","fs","git","git-commit","github-action","github-actions","library","push","utility","vcs"],"created_at":"2024-12-25T21:12:47.042Z","updated_at":"2025-04-22T17:24:29.857Z","avatar_url":"https://github.com/Jaid.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Jaid","https://twitch.tv/products/jaidchen","https://github.com/sponsors/jaid"],"categories":[],"sub_categories":[],"readme":"# commit-from-action\n\n\n\u003ca href=\"https://raw.githubusercontent.com/jaid/commit-from-action/master/license.txt\"\u003e\u003cimg src=\"https://img.shields.io/github/license/jaid/commit-from-action?style=flat-square\" alt=\"License\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/sponsors/jaid\"\u003e\u003cimg src=\"https://img.shields.io/badge/\u003c3-Sponsor-FF45F1?style=flat-square\" alt=\"Sponsor commit-from-action\"/\u003e\u003c/a\u003e  \n\u003ca href=\"https://actions-badge.atrox.dev/jaid/commit-from-action/goto\"\u003e\u003cimg src=\"https://img.shields.io/endpoint.svg?style=flat-square\u0026url=https%3A%2F%2Factions-badge.atrox.dev%2Fjaid%2Fcommit-from-action%2Fbadge\" alt=\"Build status\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/commit-from-action/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/commits-since/jaid/commit-from-action/v2.0.6?style=flat-square\u0026logo=github\" alt=\"Commits since v2.0.6\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/commit-from-action/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/jaid/commit-from-action?style=flat-square\u0026logo=github\" alt=\"Last commit\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/commit-from-action/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/jaid/commit-from-action?style=flat-square\u0026logo=github\" alt=\"Issues\"/\u003e\u003c/a\u003e  \n\u003ca href=\"https://npmjs.com/package/commit-from-action\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/commit-from-action?style=flat-square\u0026logo=npm\u0026label=latest%20version\" alt=\"Latest version on npm\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/commit-from-action/network/dependents\"\u003e\u003cimg src=\"https://img.shields.io/librariesio/dependents/npm/commit-from-action?style=flat-square\u0026logo=npm\" alt=\"Dependents\"/\u003e\u003c/a\u003e \u003ca href=\"https://npmjs.com/package/commit-from-action\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/commit-from-action?style=flat-square\u0026logo=npm\" alt=\"Downloads\"/\u003e\u003c/a\u003e\n\n**Utility class for making changes to a repository from a GitHub Action.**\n\n\n\n\n\n## Installation\n\n\u003ca href=\"https://npmjs.com/package/commit-from-action\"\u003e\u003cimg src=\"https://img.shields.io/badge/npm-commit--from--action-C23039?style=flat-square\u0026logo=npm\" alt=\"commit-from-action on npm\"/\u003e\u003c/a\u003e\n\n```bash\nnpm install --save commit-from-action@^2.0.6\n```\n\n\u003ca href=\"https://yarnpkg.com/package/commit-from-action\"\u003e\u003cimg src=\"https://img.shields.io/badge/Yarn-commit--from--action-2F8CB7?style=flat-square\u0026logo=yarn\u0026logoColor=white\" alt=\"commit-from-action on Yarn\"/\u003e\u003c/a\u003e\n\n```bash\nyarn add commit-from-action@^2.0.6\n```\n\n\n\n## Example\n\n\n```javascript\nimport CommitManager from \"commit-from-action\"\nimport {writeFile} from \"fs/promises\"\n\nawait writeFile(\"abc.txt\", \"abc\")\n\nconst commitManager = new CommitManager\ntry {\n  await commitManager.commit(\"Added file abc.txt\")\n  await commitManager.push()\n} catch (error) {\n  console.error(error)\n} finally {\n  // Does some cleaning, should be called regardless of whether commit and push are successful or not.\n  await commitManager.finalize()\n}\n```\n\n\n\n\n\n\n\n## Options\n\n\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDefault\u003c/th\u003e\n\u003cth\u003eInfo\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eautoApprove\u003c/td\u003e\n\u003ctd\u003eboolean\u003c/td\u003e\n\u003ctd\u003etrue\u003c/td\u003e\n\u003ctd\u003eIf true, the created pull request will be automatically approved and merged.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eautoRemoveBranch\u003c/td\u003e\n\u003ctd\u003eboolean\u003c/td\u003e\n\u003ctd\u003etrue\u003c/td\u003e\n\u003ctd\u003eIf true, the created branch will be automatically deleted. Good for avoiding mess.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ebranch\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003erandomly generated\u003c/td\u003e\n\u003ctd\u003eName of the temporary branch. If this is explicitly set, option `branchPrefix` is ignored.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ebranchPrefix\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003e\"action-\"\u003c/td\u003e\n\u003ctd\u003eStarting string of the temporary branch's name. The rest of it will be randomly generated.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ecommitMessage\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003e\"Modified repository in GitHub Action\"\u003c/td\u003e\n\u003ctd\u003eDefault commit message to use, if commitManager.commit() is called without an argument.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003egithubTokenInputName\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003e\"githubToken\"\u003c/td\u003e\n\u003ctd\u003eThe key of your action's input that passes the user's GitHub token.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eignoreFiles\u003c/td\u003e\n\u003ctd\u003estring[]\u003c/td\u003e\n\u003ctd\u003e[]\u003c/td\u003e\n\u003ctd\u003eList of globs of files not to commit.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003emergeMessage\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003e\"Automatically merged commits from pull {pullNumber}\"\u003c/td\u003e\n\u003ctd\u003eCommit message of the pull request's merge.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003epullRequestBody\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003e\"Hewwo!\"\u003c/td\u003e\n\u003ctd\u003eDescription of the automatically created pull request.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003epullRequestTitle\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003e\"Automatic changes from GitHub Action\"\u003c/td\u003e\n\u003ctd\u003eTitle of the automatically created pull request.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Development\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDevelopment hints for maintaining and improving commit-from-action\u003c/b\u003e\u003c/summary\u003e\n\n\n\nSetting up:\n```bash\ngit clone git@github.com:jaid/commit-from-action.git\ncd commit-from-action\nnpm install\n```\n\n\u003c/details\u003e\n\n## License\n[MIT License](https://raw.githubusercontent.com/jaid/commit-from-action/master/license.txt)  \nCopyright © 2021, Jaid \\\u003cjaid.jsx@gmail.com\u003e (https://github.com/jaid)\n\n\u003c!---\nReadme generated with tldw v7.1.0\nhttps://github.com/Jaid/tldw\n--\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fcommit-from-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaid%2Fcommit-from-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fcommit-from-action/lists"}