Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

pwhelper

ENTIRELY VIBECODED!!!

A small wrapper around pwclient that surfaces only the things you actually care about when babysitting a patch series — in particular, checks that aren't success.

pwclient is great but verbose: for a 31-patch series you have to run check-get per patch and skim a wall of mostly-green output to find the one warning. pwhelper does that for you.

Features

  • pwhelper -s <series-id> — fetch checks for every patch in a series in parallel and print only non-success ones.
  • pwhelper -p <patch-id> — same, for a single patch.
  • pwhelper list — list your submitted patches (uses a configured submitter id so you don't have to remember it).
  • Coloured output, with --all to also show successful checks.

Requirements

  • Python 3.8+
  • pwclient on $PATH and configured (i.e. ~/.pwclientrc works for plain pwclient list -S ...).

Install

Drop the script somewhere on your $PATH and make it executable. The repo ships it without a .py extension so you can call it as pwhelper:

git clone <this repo> ~/src/pwhelper
chmod +x ~/src/pwhelper/pwhelper
ln -s ~/src/pwhelper/pwhelper ~/.local/bin/pwhelper
# make sure ~/.local/bin is on PATH

Or copy it directly:

sudo install -m 0755 pwhelper /usr/local/bin/pwhelper

Config

Create ~/.config/pwhelper/config.ini (or ~/.pwhelperrc):

[default]
submitter = 217125

submitter is your patchwork submitter id (the number you'd otherwise pass to pwclient list -w). With it set, pwhelper list works with no args.

Usage

# Show all non-success checks for every patch in series 1087872.
pwhelper -s 1087872

# Same, but include successful checks too.
pwhelper -s 1087872 --all

# Single patch.
pwhelper -p 14548373

# List your submitted patches (uses config submitter).
pwhelper list

# Override submitter for one call.
pwhelper list -w 217125

# Hide checks from specific contexts (matches the `context:` field).
pwhelper -s 1087872 -i checkpatch series_format

# Tune parallelism (default 8 workers).
pwhelper -j 16 -s 1087872

Example output

series 1087872: 31 patches
14548373 [wireless-next,v2,01/31] wifi: mm81x: add bus.h
  [warning] ai-review: Series too long, not submitting
      https://wifibot.sipsolutions.net/results//1087872/ai-review

14548374 [wireless-next,v2,02/31] wifi: mm81x: add command.c
  [warning] ai-review: Series too long, not submitting
      https://wifibot.sipsolutions.net/results//1087872/ai-review
...

If everything is green:

series 1087872: 31 patches
all patches green

Notes

  • pwhelper shells out to pwclient; it doesn't talk to the patchwork XML-RPC API directly. Anything pwclient can't do, pwhelper can't do.
  • Coloured output is auto-disabled when stdout isn't a TTY, or when NO_COLOR is set.

About

thin pwclient wrapper to see series bot results

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages