Download the PHP package dragon-code/github-notifications without Composer
On this page you can find all versions of the php package dragon-code/github-notifications. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dragon-code/github-notifications
More information about dragon-code/github-notifications
Files in dragon-code/github-notifications
Package github-notifications
Short Description Reduce your notification burden on GitHub!
License MIT
Informations about the package github-notifications
GitHub Notifications
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:
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:
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
token
parameter passed when calling the console command - The
GITHUB_TOKEN
environment variable ~/.composer/auth.json
file~/.config/.composer/auth.json
file~/.config/composer/auth.json
file~/AppData/Roaming/Composer/auth.json
file~/composer/auth.json
file%USERPROFILE%/AppData/Roaming/Composer/auth.json
file
If the token is not found, you will receive a message about this.
Usage
To read all issue notifications:
To clear all issue notifications for the Laravel organization:
Or, if you are specifying a token:
In addition, you can use any part of the organization name and/or repository name to check against the template:
Pattern matching is implemented using the Str::is
method.
You can also specify several names:
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:
For example:
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:
You can also exclude certain repositories:
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/framework
andlaravel/breeze
will not be processed
Result
Before
Execute a console command with the following parameters:
After
After with --with-open
option
Execute a console command with the following parameters:
Support Us
❤️ The Dragon Code? Please consider supporting our collective on Boosty.
License
This package is licensed under the MIT License.