prune-github-notifications
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

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 specified as a GH_TOKEN environment variable:

GH_TOKEN=$(gh auth token) npx prune-github-notifications

CLI 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 string[] ["subscribed"] Notification reason(s) to filter to.
--title string "^chore\(deps\): update .+ to" Notification title regular expression to filter to.

For example, providing all options on the CLI:

npx prune-github-notifications --auth $(gh auth token) --bandwidth 10 --reason subscribed --title "^chore.+ update .+ to"

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/ Notification title regular expression 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.

Readme

Keywords

none

Package Sidebar

Install

npm i prune-github-notifications

Weekly Downloads

3

Version

0.2.1

License

MIT

Unpacked Size

20.8 kB

Total Files

22

Last publish

Collaborators

  • joshuakgoldberg