Bug #95383 github mysql-oca-bot asks for contribution even if one exists
Submitted: 16 May 2019 0:50 Modified: 19 May 2019 22:54
Reporter: Daniel Black Email Updates:
Status: Closed Impact on me:
Category:Licensing Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Omer Barnir CPU Architecture:Any

[16 May 2019 0:50] Daniel Black
Feature request 1:

e.g: https://github.com/mysql/mysql-server/pull/243

It should be possible to put in the "I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it." comment without OCA bot asking for it again.

Feature request 2:

It should also check the first (initial) comment on a pull request for the text:


I assumed it would pick it up, then I forgot about it.

feature request 3:

Can't the mysql-oca-bot be triggered by a callback from github rather than a cron? With this contributors would see a immediate request for OCA contribution rather than in the next 24 hrs sometime.

How to repeat:
Feature request 1:

create PR
add new comment of the contribution text

Feature request 2:

create PR with the comment being the contribution text

Feature request 3:

create a PR and get and immediate mysql-oca-bot response
[16 May 2019 22:22] Omer Barnir
Hi Daniel,

Thanks for your suggestions.
#1 and #2 are similar - to have the bot check if a 'confirm' statement was made and if so not to ask for it again - we will implement this change in the next few days.

As for #3, I'm afraid it is not feasible as implementing a 'callback' function as it requires a setup on the MySQL side that can be triggered by a call from Github and that presents some challenges from the security aspect (this is one of the  reasons this was set as a cronjob on the MySQL side - so all the information can be gathered from / updated to Github)

However, we can set the cronjob to run every hour and not once a day - so the feedback about the need for OCA or confirmation will be much faster
[16 May 2019 23:55] Daniel Black
I suspected security considerations where the reasons for sticking with a cron.

Increasing to hourly would solve the issue and I think the guideline should be based on that the user gets the request OCA notice with the same workday. So even up to 4 hrs is ok.

Just my opinion. Thanks for listening and committing to fixing items 1 & 2.
[17 May 2019 22:12] Omer Barnir
Enhancements #1 and #2 are in place - cron should no longer post requests for confirmation if a confirmation notice was posted earlier by the PR owner.

Enhancement #3 is not implemented (explained above) but frequency of cron was increased to every four hours so a more immediate response will be provided for needing to sign an OCA or confirm contribution is under it. 

Thanks again for the suggestions
[19 May 2019 22:54] Daniel Black
Thanks for the implementation Omer