Skip to content

Check commit message for issue close pattern setting

Mario Celi requested to merge 487397-check-setting-commit-worker into master

What does this MR do and why?

We were not checking the project setting for auto closing issues if the closing pattern was located in a commit's message.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Make sure auto close is disabled for your project in Project settings -> Repository -> Branch defaults -> Auto-close referenced issues on default branch
  2. Create a new merge request and use the closing patter in a commit message with any open issue in the project. example: Closes #20 were 20 is the IID of a open issue in the same project.
  3. Merge the MR and before this change, the issue should still be closed.
  4. After this change, disabling the setting should prevent the issue from closing.
  5. Make sure sidekiq is running locally to test as closing is done in a worker

Related to #487397

Merge request reports