GoogleCloudPlatform / cloud-build-notifiers

Notifier images for Cloud Build, complete with build status filtering and Google Secret Manager integration
Apache License 2.0
138 stars 143 forks source link

Added a template function 'replace' to BlockKitTemplate parser #161

Closed ezeYaniv closed 1 year ago

ezeYaniv commented 1 year ago

Fixes #153 and #160

This lets the user replace substrings in .json template variables. The most pressing need is to remove (or escape) double quotes, which breaks the template due to json not expecting unescaped double quotes.

The Cloud Build .Build object has some properties which come with double quotes: .Build.FailureInfo.Detail is one such object: a typical FailureInfo object looks like:

failureInfo:
  detail: 'Build step failure: build step 7 "gcr.io/google-appengine/exec-wrapper"
    failed: step exited with non-zero status: 1'
  type: USER_BUILD_STEP
google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

prabenzom commented 1 year ago

/gcbrun