Fix API requests for branch names ending in .txt
What does this MR do?
Fixes #217097 (closed)
Similar to gitlab-foss!13474 (merged), we ensure that the branch API always returns JSON blobs. This fixes #217097 (closed), where branch names ending in .txt
would cause a Ruby object-as-string reference like #<API::Entities::Branch:0x00007f3685daca10>
to be returned as the content of the API request.
I think these tests should work, however as it is tied to the gitlab-test repo, a branch named ends-with.txt
must be pushed there before the tests will be pass. I do not have permission to do that, and cannot raise an MR to a non-existing branch, so this would have to be done by someone from gitlab-org.
Does this MR meet the acceptance criteria?
Conformity
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Daniel Stone