notify-webhook icon indicating copy to clipboard operation
notify-webhook copied to clipboard

Fix gentoo bug 965835, cleanup/fix other issues

Open ferringb opened this issue 3 months ago • 1 comments

So... I wasn't much willing to reconfigure my IDE to not reformat, so the first commit is a ruff reformat of the repo.

There are two main commits here:

  • make this debuggable via CLI. Specifically argument passing rather than stdin consumption, which in turn allows pdb.set_trace(). I also flipped on pretty print for any json dumping.
  • the fixes in question. The commit message for that is below.

Specifically, that's this:

    Fix exception for deletion events and force validation.
    
    Fixes
    * added boolean deleted and created fields per v3 spec.  These indicate
      if it's a ref deletion, new ref created, etc.
    
    * fixed the exception for deletion events
    
    * forced data annotation via dataclass, thus documenting the event structure.
      I did this explicitly because there are no tests and I had to rework a lot
      of this, so might as well use a dataclass to ensure I didn't drop any event
      data.  This is not runtime enforcement however.
    
    * fixed the comparison urls sent for a ref creation event.
    
    This is larger than intended, but the data validation I had to shove in to
    verify I didn't break anything.  The result is simpler/cleaner however.

ferringb avatar Nov 11 '25 17:11 ferringb