Github PR Organizer & Formatter

Organizes and tabs PRs to make it easier to see what to prioritize.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
HappyViking
今日安裝
0
安裝總數
7
評價
0 0 0
版本
1.8.0
建立日期
2023-08-30
更新日期
2024-06-04
尺寸
171.7 KB
授權條款
MIT
腳本執行於

If you're interested in the source code:

https://github.com/andersonaddo/greasyfork-userscripts/tree/main/github-pr-formatter

This script makes use of GraphQL queries to fetch more information on PRs. When the script realizes you're on the /pulls page of your repo, it queries the GraphQL api to fetch more PR info. To do this, it'll need a Github Access Token to do the queries in your name. Only read access to repos is needed. You can decide to use Github's new fine-grained tokens, but not all Github teams allow that (which matters, if you're using this for work like I do). The classic Github tokens have a better chance of being supported by your Github team.

Regardless of which repo's /pulls page you're on and which arguments you're searching against, this script always uses the same arguments to query the GraphQL:

is:open is:pr involves:@me archived:false repo:${repo}

where repo is also something you provide on setup once the script is supplied.

The script caps the number of PRs it fetches from the api. If there's any PR being shown on the /pulls page that wasn't in the api response (whether the script reached it's cap or the PR doesn't match the predefined query), the script just won't sort it (so it won't be put under any header and won't be given any badges).

There are 3 headers:

  • Requires Attention:

    • PRs that are yours with but have no assignee
    • PRs that are yours with changes requested
    • PRs that are yours that have a failing CI test who's title doesn't contain a whitelisted substring (you can add those in the userscript settings)
    • PRs that have requested a [new] review from you.
  • Others - Yours: PRs that are yours but don't require attention

  • Others - Misc: PRs that are not yours and don't require attention

The settings for this userscript will be in the footer of Github on any repo's /pulls page.