You need to sign in or sign up before continuing.
Access and add custom comments received from Ruby condition section of the policy 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 theruby
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 theruby
condition inside the.triage-policies.yml
file, and then access thatcustom variable
inside thecomment-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 thecomment-action
section as mentioned here, and also as per the documentation onlyboolean
valaues are understood by theruby
section. - I would like to know if that is possible with the
gitlab-triage
project? or is it something that can be done through onlytriage-ops
project?
References
- For now I have referrences couple of
MR's
andIssues
that were created related to this, but was not able to find any answer's related to that. Links to the references below - #100
- #280
Example attached below for required output.
Forum Link - https://forum.gitlab.com/t/unable-to-access-custom-messages-inside-the-comments-section-of-policies-file/79956