Closed legalsylvain closed 4 years ago
Hi @sbidoul. Thanks for your review. In retrospect, I think that my first proposal was a little too radical ! I took out 2 of the 5 commits. I refactored 2 commits
LGTM, thanks! Ideally this should be in two different PRs, if only to avoid conflating two independent topics in the same newsfragment.
LGTM, thanks! Ideally this should be in two different PRs, if only to avoid conflating two independent topics in the same newsfragment.
feature 1) GITHUB_STATUS_IGNORED
and GITHUB_CHECK_SUITES_IGNORED
configurable
--> available here : https://github.com/OCA/oca-github-bot/pull/111
feature 2) Add BOT_TASKS_IGNORED
--> available here : https://github.com/OCA/oca-github-bot/pull/112
This PR provides a refactoring of
config.py
andenvironment.sample
files.When I discovered this project, I was quite lost between that two files because some things was in one or in the other, (or in both). So this PR is an attempt to make a little clean and remove duplicated code or comment.
Before this PR : 1) some default values was present in the
environment.sample
file, other in theconfig.py
file, other in both.2) Some description was present in both files like for
BOT_TASKS
value, and inconsistent between two files (keys was missing) : Description 1 : https://github.com/OCA/oca-github-bot/blob/master/src/oca_github_bot/config.py#L50 Description 2 : https://github.com/OCA/oca-github-bot/blob/master/environment.sample#L373)
GITHUB_STATUS_IGNORED
andGITHUB_CHECK_SUITES_IGNORED
was hardcoded inconfig.py
file, and so not configurable.4)
BOT_TASKS
was enumerating the tasks to run. So during an upgrade of the lib, if the value wasall
, the new features was enabled by default (without changing theenvironment
file) but if the value was notall
the new features was disabled by default, that is not consistent. SoBOT_TASKS
is replace byBOT_TASKS_IGNORED
assuming that most of the time, only some features are disabled and we want to have new features enabled by default.Important Note : Once merged (if accepted ;-)), the custom
environment
file should be updated for the existing bots that are running. (At least the OCA one) adding the following keys. (if not still defined with a custom values.)