mergeable
mergeable copied to clipboard
Bug Report: Validator "contents" returns error
The following code returns error:
version: 2
mergeable:
- when: pull_request.opened, pull_request.reopened
name: test
validate:
- do: contents
files:
pr_diff: true
must_exclude:
regex: 'Submodule'
message: 'some message'
pass:
- do: comment
payload:
body: >
Passed!
fail:
- do: comment
payload:
body: >
Failed!
error:
- do: comment
payload:
body: >
An error has occurred!
This is the other file in the PR that is expected to be caught by contents and returns fail:

This is the result on GitHub, while it was expected that "Failed!" is returned:

Does anybody know why do I get an error here? How can I get more information about the error?
UPDATE:

This error message in text format:
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at Function.from (buffer.js:313:9)
at Function.getContent (/app/lib/github/api.js:113:21)
at async Contents.validate (/app/lib/validators/contents.js:62:23)
at async Promise.all (index 0)
at async processWorkflow (/app/lib/flex/lib/processWorkflow.js:104:20)
at async executeMergeable (/app/lib/flex/flex.js:40:3)
at async /app/lib/mergeable.js:102:7
at async Promise.all (index 0)