Hi Community,
I'm currently using Cloud Build bindings, specifically "_COMMIT_MESSAGE = $(commit.commit.message)" to capture GitHub commit messages. However, due to the large size of my PR, the combined commit message after a squash merge exceeds 4000 characters, then the build cannot run.
I attempted to truncate the commit message to 1000 characters using $(commit.commit.message[0:1000]). Unfortunately, this did not work, and I encountered the following error: "Failed to trigger build: [_COMMIT_MESSAGE -> $(commit.commit.message[0:1000])]: generic::invalid_argument: failed ParseJSONPath: string is not array or slice."
It appears that the JSONPath parser used behaves similarly to the kubectl JSONPath library. I found a related issue in the Kubernetes GitHub repository: kubectl should support [*] for strings in jsonpath · Issue #39500 · kubernetes/kubernetes (github.co.... This might be relevant to resolving the problem internally.
If anyone has encountered a similar issue or has alternative solutions, your advice would be greatly appreciated.
Thank you very much!