Allow fields from rule definition to be used in actions
If it was possible to recall parts of the current rule definition in the actions (such as comments) this could lead to allowing less rigidity when defining comments that repeat the contents of the rule itself.
For example, the comment could be rewritten using placeholders for the current rule's settings:
- name: Mark stale issues with no milestone for closure
conditions:
date:
attribute: updated_at
condition: older_than
interval_type: months
interval: 12
milestone: No Milestone
state: opened
actions:
comment: |
Hi {{author}},
This issue will be closed, as it meets the following criteria:
* No activity in the past {#{rule[:conditions][:date][:interval]} #{rule[:conditions][:date][:interval_type]}}
* Milestone: {#{rule[:conditions][:milestone]}}
* Status: {#{rule[:conditions][:state]}}