GoogleCloudPlatform / GoogleCloudPlatform/cloud-build-notifiers
should extract build id in another way when build status is unknown
Open
- Dominant language
- Go
- Stars
- 157
- Forks
- 144
- Avg merge
- 1h 34m
- Merged PRs (30d)
- 1
Description
In chat notifier, we extract the build id from the first 8 chars in the build id [Here](https://github.com/GoogleCloudPlatform/cloud-build-notifiers/blob/17dd0b47f357d5e408437b3b5558eb1d43c51325/googlechat/main.go#LL137C27-L137C42). But build id is empty when the build has status unknown and would throw this error:
```
http: panic serving 169.254.1.1:35855: runtime error: slice bounds out of range [:8] with length 0 goroutine 47
```
We should manually set the build id when the build status is unknown.
Contributor guide
Assessment
This issue has not been assessed yet.