
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
commit-from-action
Advanced tools
Utility class for making changes to a repository from a GitHub Action.
Utility class for making changes to a repository from a GitHub Action.
npm install --save commit-from-action@^2.0.6
yarn add commit-from-action@^2.0.6
import CommitManager from "commit-from-action"
import {writeFile} from "fs/promises"
await writeFile("abc.txt", "abc")
const commitManager = new CommitManager
try {
await commitManager.commit("Added file abc.txt")
await commitManager.push()
} catch (error) {
console.error(error)
} finally {
// Does some cleaning, should be called regardless of whether commit and push are successful or not.
await commitManager.finalize()
}
| Type | Default | Info | |
|---|---|---|---|
| autoApprove | boolean | true | If true, the created pull request will be automatically approved and merged. |
| autoRemoveBranch | boolean | true | If true, the created branch will be automatically deleted. Good for avoiding mess. |
| branch | string | randomly generated | Name of the temporary branch. If this is explicitly set, option `branchPrefix` is ignored. |
| branchPrefix | string | "action-" | Starting string of the temporary branch's name. The rest of it will be randomly generated. |
| commitMessage | string | "Modified repository in GitHub Action" | Default commit message to use, if commitManager.commit() is called without an argument. |
| githubTokenInputName | string | "githubToken" | The key of your action's input that passes the user's GitHub token. |
| ignoreFiles | string[] | [] | List of globs of files not to commit. |
| mergeMessage | string | "Automatically merged commits from pull {pullNumber}" | Commit message of the pull request's merge. |
| pullRequestBody | string | "Hewwo!" | Description of the automatically created pull request. |
| pullRequestTitle | string | "Automatic changes from GitHub Action" | Title of the automatically created pull request. |
Setting up:
git clone git@github.com:jaid/commit-from-action.git
cd commit-from-action
npm install
MIT License
Copyright © 2021, Jaid <jaid.jsx@gmail.com> (https://github.com/jaid)
FAQs
Utility class for making changes to a repository from a GitHub Action.
We found that commit-from-action demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.