Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@maccuaa/git-clean
Advanced tools
Keeping the number of branches in your git repository sane.
Use this scipt to identify stale git branches that should be deleted. It does this by iterating over every branch in the repository and getting the last commit author, and the date of the last commit.
# globally
npm i -g @maccuaa/git-clean
# in your project
npm i -D @maccuaa/git-clean
Once installed, you must configure some parameters for git-clean.
It is recommended to create a .gitcleanrc
file in the root of your project.
git-clean uses the rc library for finding and loading configs. It is possible to define these settings in other places as well, for a list of all supported option please see the rc project.
This example also shows the default values git-clean uses.
# .gitcleanrc
#
# Required
#
# the URL to the remote Git server
REMOTE_URL =
#
# Optional
#
# comma separated list of Jira project codes that you want to display links for
JIRA_PROJECTS =
# the name of your main branch. Generally this is the _master_ branch
MAIN_BRANCH = master
# comma separated list of branches that are protected and should not be deleted.
# branches matching any of PROTECTED_BRANCHES values these values will not be displayed by git-clean.
PROTECTED_BRANCHES = HEAD, origin/master
# If you have email address updates for your git users, you can use this to map them to the correct email address.
EMAIL_ALIAS = old.com:new.com|old1.com:new1.com|old2.com:new2.com
# SMTP Settings
# see nodeemailer for more support servers
# https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json
SMTP_SERVER = Hotmail
SMTP_USER = <username>
SMTP_PASSWORD = <password>
# Teams Channel Webhook Connector Endpoint
# See https://docs.microsoft.com/en-us/microsoftteams/office-365-custom-connectors
TEAMS_WEBHOOK_URL = https://XXXXX.webhook.office.com/webhookb2/XXXXX
For large projects with multiple developers and a large number of branches it is recommended to commit a .gitcleanrc
file in the root of your project.
install git-clean as a devDependency
FAQs
CLI tool for finding stale Git branches
The npm package @maccuaa/git-clean receives a total of 5 weekly downloads. As such, @maccuaa/git-clean popularity was classified as not popular.
We found that @maccuaa/git-clean 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.