Unable to access custom messages inside the comments section of policies file

,

Help to get the custom messages in the comment section of triage-policies.yml file

Behaviour

  • I am currently making use of .triage-policies file for some automation in which I have some set of conditions and custom code to do the automation
  • The coding is done in the .rb files and is reffered inside the .triage-policies.yml file in the ruby section of the policies file.
  • The current behaviour of the code inside the custom .rb files is such that it checks for some conditions and depending on that generates some message/ output and returns it back to the function call inside the .triage-policies.yml file.

Requirement

The requirement is as belows :-

  • I would like to access the message that I return from the custom .rb files to the ruby condition inside the .triage-policies.yml file, and then access that custom variable inside the comment-action section of the .triage-policies.yml file.
  • Currently there is only support of created_at, updated_at, closed_at, web_url etc for us to access in the comment-action section as mentioned here, and also as per the documentation only boolean valaues are understood by the ruby section.
  • I would like to know if that is possible with the gitlab-triage project? or is it something that can be done through only triage-ops project?

References

Example attached below

Thanks for the help.

The issue was solved over here - Access and add custom comments received from Ruby condition section of the policy file. (#309) · Issues · GitLab.org / ruby / gems / GitLab Triage · GitLab

1 Like