mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00

Proper attribution is important in general, but especially for external contributors. Before this change, and the previous change fixing authorship deduplication, it was rather easy for a "squashed" conflict commit (attributed to the 'bot for lack of a really clean option) to get merged by mistake. This commit changes two things: * The mergebot now refuses to stage commits without an email set, the github API rejects those commits anyway so any integration mode other than `merge` would fail, just with a very unclear error * The forwardbot now creates commits with an empty author / committer email when the pull request as a whole has multiple authors / committers. This leverages the mergebot update. Also clean up the staging process to provide richer error reporting using bespoke exceptions instead of simple assertions. I'm not sure we've ever encountered most of these errors so they're really sanity checks but the old reporting would be... less than great. Fixes #505
9 lines
158 B
Python
9 lines
158 B
Python
class MergeError(Exception):
|
|
pass
|
|
class FastForwardError(Exception):
|
|
pass
|
|
class Mismatch(MergeError):
|
|
pass
|
|
class Unmergeable(MergeError):
|
|
...
|