
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
delete-github-branches
Advanced tools
Delete GitHub Branches that match patterns.
includesBranchPatterns
excludesBranchPatterns
dryRun
modeInstall with npm:
npm install delete-github-branches
Usage
$ delete-github-branches
Options
--owner Owner name for repository: **owner**/repo
--repo Repo name for repository: owner/**repo**
--token GitHub Token. you can use als GITHUB_TOKEN env
--includesBranchPatterns includes branch patterns split by command.
--excludesBranchPatterns excludes branch patterns split by command. "master,develop,developer"
--baseUrl GitHub API base Url.
--dryRun if this flag is on, run dry-run mode
Examples
$ delete-github-branches --owner azu --repo delete-github-branches-test --token <TOKEN>
$ delete-github-branches --owner azu --repo delete-github-branches-test --token <TOKEN> --includesBranchPatterns "/feature\/.*/" --dryRun
(async () => {
const results = await deleteGitHubBranches({
owner: "azu",
repo: "delete-github-branches-test",
excludesBranchPatterns: ["master", "develop", "/feature/.*/"],
GITHUB_TOKEN: process.env.GITHUB_TOKEN!,
dryRun: true // <= dry run mode
});
assert.deepStrictEqual(results, [
{ branchName: "develop", deleted: false, reason: "It is ignored by includes/excludes patterns" },
{ branchName: "feature/a", deleted: false, reason: "It is ignored by includes/excludes patterns" },
{ branchName: "feature/b", deleted: false, reason: "It is ignored by includes/excludes patterns" },
{ branchName: "master", deleted: false, reason: "It is ignored by includes/excludes patterns" },
{ branchName: "will-be-deleted", deleted: true }
]);
})()
See Releases page.
Install devDependencies and Run npm test
:
npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu
FAQs
Delete GitHub Branches that match patterns.
The npm package delete-github-branches receives a total of 361 weekly downloads. As such, delete-github-branches popularity was classified as not popular.
We found that delete-github-branches 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.