~nova/gh-pr-filter

ref: 6b3166faa03381e21f04996500b43c1f9e10779a gh-pr-filter/README.md -rw-r--r-- 1.6 KiB
6b3166fa — Nova DasSarma Docs 1 year, 7 months ago
  • gh-pr-filter: Get GitHub PR comments filtered by user and length Copyright (C) 2019 Novalinium nova@noblejury.com (Noble Jury Software)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Usage:

# Set GH_TOKEN with repo and read:discussion scopes
# ex `export GH_TOKEN=XXXXXXXXXXXXXX`
$ python3 main.py organization/repo_name user_name minimum_length
PR review and issue comments for organization/repo_name
user_name: user_name
minimum_length: minimum_length
PR#002 - Ipsum
Matching issue comments:
User Name at 2019-10-26 00:44:03 <https://api.github.com/repos/organization/repo_name/pulls/comments/xxxxxxxxx>
Some kinda comment here
PR#001 - Lorem
Matching review comments:
User Name at 2019-11-26 00:44:03 <https://api.github.com/repos/organization/repo_name/pulls/comments/xxxxxxxxx>
Some other kinda comment here

Install:

pip3 --user -r requirements.txt

Generate a GitHub Personal Access Token at https://github.com/settings/tokens with at least the repo and read:discussion scopes