Skip to content

Merge Request API no longer returns boolean values for work_in_progress

Summary

API for merge requests returns 0 or null for work_in_progress instead of true or false.

Steps to reproduce

Call merge requests API for a Merge Request that is in WIP: curl https://<instance_url>/api/v3/projects/<project_id>/merge_requests/<mr_id>.json?private_token=<private_token>

Actual behavior: work_in_progress is 0

Expected behavior

work_in_progress is true

Version Info

We're running on Gitlab Community Edition 8.6.0

Possible fixes

I believe the bug was introduced because the work_in_progress? method lost the !! that coerced the regex match into boolean values.

See this commit: acf9778e

If someone familiar with the project can confirm my thinking I'm happy to make a MR with a spec in spec/requests/api/merge_requests_spec.rb