concourse-slack-alert-resource icon indicating copy to clipboard operation
concourse-slack-alert-resource copied to clipboard

Do not send fixed on a new pipeline/job

Open hsiliev opened this issue 1 year ago • 3 comments

We're using instanced pipelines to handle PRs and the alert resource sends fixed for every job in the new instance of our pipeline

Per documentation:

Fixed is a special alert type that only alerts if the previous build did not succeed.

Can we change fixed to ignore the unknown state (no previous builds) or at least add a param to ignore new jobs?

hsiliev avatar Dec 07 '23 18:12 hsiliev

Good point! This project is on life support and minimally maintained, would you be willing to submit a PR?

arbourd avatar Mar 05 '24 13:03 arbourd

So I was looking at the source code and we skip the initial build to see if the pipeline is new: https://github.com/arbourd/concourse-slack-alert-resource/blob/main/out/main.go#L83-L86

But, instanced pipelines are before my time. I assume this value is not 1 as a result. Do you have any indicators from the API you can share with me @hsiliev re: a new instance pipeline?

arbourd avatar Apr 04 '24 14:04 arbourd

Hey @arbourd, that's in my todo list, but since it is happening on a side-project it might take a while to get there.

hsiliev avatar Apr 04 '24 14:04 hsiliev