runbot/forwardport/tests
Xavier Morel 8e67aed792 [IMP] runbot_merge: limit spamming on PR close
When closing a PR, github completely separates the events "close the
PR" and "comment on the PR" (even when using "comment and close" in
the UI, a feature which isn't even available in the API). It doesn't
aggregate the notifications either, so users following the PR for
one reason or another get 2 notifications / mails every time a PR
gets merged, which is a lot of traffic, even more so with
forward-ported PRs multiplying the amount of PRs users are involved
in.

The comment on top of the closure itself is useful though: it allows
tracking exactly where and how the PR was merged from the PR, this
information should not be lost.

While more involved than a simple comment, *deployments* seem like
a suitable solution: they allow providing links as permanent
information / metadata on the PRs, and apparently don't trigger
notifications to users.

Therefore, modify the "close" method so it doesn't do
"comment-and-close", and provide a way to close PRs with non-comment
feedback: when the feedback's message is structured (parsable as
json) assume it's intended as deployment-bound notifications.

TODO: maybe add more keys to the feedback event payload, though in my
      tests (odoo/runbot#222) none of the deployment metadata
      outside of "environment" and "target_url" is listed on the PR
      UI

Fixes #224
2019-11-21 08:10:39 +01:00
..
conftest.py [IMP] *: unify gh test API between runbot and fw-bot 2019-10-10 10:11:48 +02:00
test_batches.py [FIX] forwardport: co-dependent FPs where one PR is updated 2019-10-15 08:54:25 +02:00
test_limit.py [IMP] runbot_merge: limit spamming on PR close 2019-11-21 08:10:39 +01:00
test_simple.py [IMP] runbot_merge: limit spamming on PR close 2019-11-21 08:10:39 +01:00
test_weird.py [FIX] forwardport: FP PR getting CI'd after initial FP check 2019-10-01 20:51:31 +02:00
utils.py [IMP] forwardbot: reduce length of fw branch name 2019-10-10 11:37:27 +02:00