openflagr / flagr-archived

[Archived] - Merged and move to https://github.com/openflagr/flagr
https://openflagr.github.io/flagr
Apache License 2.0
33 stars 7 forks source link

Adding support for Webhooks (rebase of #38) #71

Closed wejendorp closed 2 years ago

wejendorp commented 2 years ago

This is a rebase of #38 with gorm2 change. We rely on the webhooks for internal auditing, and would like to avoid running off our fork if possible.

Description

Adding a webhook for notifying other services when a change happens in flagr.

Pretty much a copy of #410 which seems to be stale. Simplified it a bit and removed the slack portion of it, since there seems to be some discussions on how to implement that in a sane way.

After this is merged we can rebase #410 and get the slack notification going

Motivation and Context

Useful for keeping an audit style log in another system

How Has This Been Tested?

By running the test suite, and done manual testing locally

Currently investigating why the rebased image fails to start in the demo state. panic: no such table: flags_tags; no such table: flags_tags update: I see the same issue from the current main branch.

Types of changes

Checklist:

codecov-commenter commented 2 years ago

Codecov Report

Merging #71 (76b386f) into main (ff97ea7) will decrease coverage by 1.09%. The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   80.96%   79.86%   -1.10%     
==========================================
  Files          28       31       +3     
  Lines        2222     2404     +182     
==========================================
+ Hits         1799     1920     +121     
- Misses        334      383      +49     
- Partials       89      101      +12     
Impacted Files Coverage Δ
pkg/notify/client.go 58.76% <58.76%> (ø)
pkg/notify/notify.go 61.53% <61.53%> (ø)
pkg/notify/webhook.go 76.92% <76.92%> (ø)
pkg/handler/crud.go 86.84% <100.00%> (+0.51%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

github-actions[bot] commented 2 years ago

Stale pull request message