Closed gilescope closed 5 months ago
You don't need the full list if you search for a specific one. Sorting by PR number will not help find *your** PRs.
An easy and INefficient option to check a specific PR is prdoc check | grep 1234
but you can do better :)
prdoc check --help
Check one or more prdoc files for validity
Usage: prdoc check [OPTIONS]
Options:
-f, --file <FILE> Directly specify the file to be checked. It can be relative to the base directory
-c, --config <CONFIG> [env: PRDOC_CONFIG=]
-n, --number <NUMBER> number
-d, --prdoc-folders <PRDOC_FOLDERS> [env: PRDOC_FOLDERS=]
-l, --list <LIST> Get the list of PR numbers from a file
-s, --schema <SCHEMA> Schema to be used. Passing this flag/ENV overrides the value from the config [env: PRDOC_SCHEMA=]
-j, --json Output as json
-h, --help Print help
You should prefer:
prdoc check -n 1234
Yeah, but if the program is going to list multiple PRs, it may as well do them sorted. And yes prdoc check | sort
does work but it's just surprising it's not done automatically. Small tweak for a better UX should the user hold the tool in this particular way.
prdoc run from root could sort the PR numbers before it checks them so it's easier to search for your one: