Skip to content

Prunes GitHub notifications you don't care about, such as automated dependency bumps. 🧹

License

Notifications You must be signed in to change notification settings

JoshuaKGoldberg/prune-github-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prune-github-notifications

Prunes GitHub notifications you don't care about, such as automated dependency bumps. 🧹

👪 All Contributors: 1 🤝 Code of Conduct: Kept 🧪 Coverage 📝 License: MIT 📦 npm version 💪 TypeScript: Strict

CLI

prune-github-notifications can be run on the CLI with an auth token for notifications access:

npx prune-github-notifications

get-github-auth-token is used to retrieve a GitHub auth token from process.env.GH_TOKEN or executing gh auth token.

CLI Options

Option Type Default Description
--bandwidth number 6 Maximum parallel requests to start at once.
--reason string[] ["subscribed"] Notification reason(s) to filter to.
--title string[] ["^chore\(deps\): update .+ to", /^build\(deps-dev\): bump .+ to"] Notification title regular expressions to filter to.
--watch number 0 A seconds interval to continuously re-run this on, if truthy.

For example, providing all options on the CLI:

npx prune-github-notifications --bandwidth 10 --reason subscribed --title "^chore.+ update .+ to"

Running in watch mode to clear notifications every ten seconds:

npx prune-github-notifications --watch 10

Node.js API

npm i prune-github-notifications
import { pruneGitHubNotifications } from "prune-github-notifications";

await pruneGitHubNotifications({ auth: "gho_..." });

If a process.env.GH_TOKEN is set, then the auth parameter will default to it:

await pruneGitHubNotifications();

Node.js Options

Only auth is required, and only if a GH_TOKEN isn't available.

Option Type Default Description
auth string process.env.GH_TOKEN GitHub authentication token with notifications access.
bandwidth number 6 Maximum parallel requests to start at once.
reason Set<string> Set {"subscribed"} Notification reason(s) to filter to.
title RegExp[] [/^chore\(deps\): update .+ to/, /^build\(deps-dev\): bump .+ to/] Notification title regular expressions to filter to.

For example, providing all options to the Node.js API:

await pruneGitHubNotifications({
	auth: "gho_...",
	bandwidth: 10,
	reason: subscribed,
	title: ["^chore.+ update .+ to"],
});

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md. Thanks! 💖

Contributors

Josh Goldberg
Josh Goldberg

🔧 🚧 🤔 💻 🐛

💙 This package was templated with create-typescript-app.

About

Prunes GitHub notifications you don't care about, such as automated dependency bumps. 🧹

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published