0.6.0 โ€ข Published 6 months ago

prune-github-notifications v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

CLI

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

npx prune-github-notifications

CLI Options

OptionTypeDefaultDescription
--authstringprocess.env.GH_TOKEN or executing gh auth tokenAuth token for GitHub from octokit-from-auth.
--bandwidthnumber6Maximum parallel requests to start at once.
--reasonstring[]["subscribed"]Notification reason(s) to filter to.
--titlestring[]["^chore\(deps\): update .+ to", /^build\(deps-dev\): bump .+ to"]Notification title regular expressions to filter to.
--watchnumber0A seconds interval to continuously re-run this on, if truthy.

For example, providing all functional 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.

OptionTypeDefaultDescription
authstringprocess.env.GH_TOKENGitHub authentication token with notifications access.
bandwidthnumber6Maximum parallel requests to start at once.
reasonSet<string>Set {"subscribed"}Notification reason(s) to filter to.
titleRegExp[][/^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

๐Ÿ’™ This package was templated with create-typescript-app.

0.6.0

6 months ago

0.5.0

10 months ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago