dragon-code/github-notifications
Composer 安装命令:
composer create-project dragon-code/github-notifications
包简介
Reduce your notification burden on GitHub!
关键字:
README 文档
README
GitHub Notifications was created by, and is maintained by
The Dragon Code, and is a simple command line tool to mark all notifications about issues or rejected PRs as read on a given organization.
Installation
PHP 8.2+ is required. To get the latest version, simply require the project using Composer:
composer global require dragon-code/github-notifications:*
Alternatively, you can simply clone the repo and run composer install in the folder.
Update global dependencies
To update global dependencies, use the console command:
composer global update
Authentication
You'll also need to create yourself a
personal access token
for GitHub's API with access to the notifications scope.
By default, we check several places for the presence of a token in the following order:
- The
tokenparameter passed when calling the console command - The
GITHUB_TOKENenvironment variable ~/.composer/auth.jsonfile~/.config/.composer/auth.jsonfile~/.config/composer/auth.jsonfile~/AppData/Roaming/Composer/auth.jsonfile~/composer/auth.jsonfile%USERPROFILE%/AppData/Roaming/Composer/auth.jsonfile
If the token is not found, you will receive a message about this.
Usage
To read all issue notifications:
notifications read
To clear all issue notifications for the Laravel organization:
notifications read laravel
Or, if you are specifying a token:
notifications read laravel --token {...}
In addition, you can use any part of the organization name and/or repository name to check against the template:
notifications read laravel/framework # or notifications read lara*/fra # or notifications read framework # or notifications read work # or notifications read fra*rk
Pattern matching is implemented using the Str::is method.
You can also specify several names:
notifications read laravel/framework laravel/jet
When determining the name, the str_starts_with function is
used.
Options
By default, only those Issues and Pull Requests that have been closed or merged are marked as read.
But you can define the parameters yourself:
-r, --except-repository Exclude repositories from processing -i, --except-issues Exclude issues from processing -p, --except-pulls Exclude Pull Requests from processing -m, --except-mentions Exclude notifications with your mention from processing -o, --with-open Process including open Issues and Pull Requests -n, --no-interaction Do not ask any interactive question -q, --quiet Do not output any message
For example:
# except issues + with open notifications read laravel -ion
With this set of options, notifications that have:
- whose repository name begins with the word
laravel - Pull Requests only, both open and closed
- will not be asked to continue in the console
You can call the console command to display help information:
notifications read --help
You can also exclude certain repositories:
notifications read laravel -ion -r laravel/framework -r laravel/breeze
With this set of options, notifications that have:
- whose repository name begins with the word
laravel - Pull Requests only, both open and closed
- will not be asked to continue in the console
- repositories
laravel/frameworkandlaravel/breezewill not be processed
Result
Before
Execute a console command with the following parameters:
notifications read -n --except-mentions
After
After with --with-open option
Execute a console command with the following parameters:
notifications read -n --except-mentions --with-open
Support Us
❤️ The Dragon Code? Please consider supporting our collective on Boosty.
License
This package is licensed under the MIT License.
dragon-code/github-notifications 适用场景与选型建议
dragon-code/github-notifications 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 831 次下载、GitHub Stars 达 6, 最近一次更新时间为 2024 年 03 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「notifications」 「github」 「console」 「notify」 「clean」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dragon-code/github-notifications 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dragon-code/github-notifications 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dragon-code/github-notifications 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Handles basic OAuth/OAuth2 authentication along with classes for common services
A Laravel Nova package that adds a notification feed in your Nova app.
MediaWiki extension that allows embedding external content, specified by URL, into your wiki pages
Laravel package for the simplification and integration of many of your users most wanted login providers. Installation is a breeze. Never worry about OAuth again.
GitHub Webhook Listener with plugin-based API for creating your own triggerered actions
Captures outgoing SMS notifications
统计信息
- 总下载量: 831
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-28


