When UpdateCondition is in effect in the post function, a special variable called target is added to the metadata to identify the comment to be updated.
When using the same template for several different jobs, the target variable can be used to avoid duplicate comments to be updated.
Add UpdateCondition to the exec function as well, similar to post
Test Case
Post
$ HELLO=test1 go run ./cmd/gitlab-comment post --org yuyaban --repo gitlab-comment --mr 1 -k hello -u 'Comment.HasMeta && Comment.Meta.TemplateKey == "hello"' --var target:"JOB_A"
$ HELLO=test2 go run ./cmd/gitlab-comment post --org yuyaban --repo gitlab-comment --mr 1 -k hello -u 'Comment.HasMeta && Comment.Meta.TemplateKey == "hello"' --var target:"JOB_A"
$ HELLO=test1 go run ./cmd/gitlab-comment post --org yuyaban --repo gitlab-comment --mr 1 -k hello -u 'Comment.HasMeta && Comment.Meta.TemplateKey == "hello"' --var target:"JOB_B"
Description
Two functions have been added.
Test Case
Post
Exec