Filter github triggers after github posts the webhook

Hi Concourse gurus,

We trigger one of our pipeline jobs based on merges to a specific branch of a git repo. The same trigger is used by multiple jobs in the pipeline. The file in git repo is a yaml file that contains blocks related to each of the jobs in the pipeline.
Internally each job checks if the changes in the merge are related to the specific job and if so, continues with its processing. If the change is not related to the job, it simply returns.

I am wondering if there is a way to further filter the trigger for changes in the file and actually trigger the job only if the block related to the job has been modified in the yaml file.

Thanks in advance.

It would depend on how the resource determines if there is a new version. I’m not aware of any existing resources that work with the granularity you’re looking for but if you can figure out how to implement it you could write your own resource.