Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add templating data for run actions #104

Closed
FoxxMD opened this issue Aug 22, 2022 · 1 comment
Closed

Add templating data for run actions #104

FoxxMD opened this issue Aug 22, 2022 · 1 comment
Labels
API CM API (server or client) enhancement New feature or request

Comments

@FoxxMD
Copy link
Owner

FoxxMD commented Aug 22, 2022

Per suggestion from #93 by @CuriousLyz -- add already run actions to templating data.

Action results are already collected for event auditing but need to pass them to rule invocation code.

@FoxxMD FoxxMD added enhancement New feature or request API CM API (server or client) labels Aug 22, 2022
FoxxMD added a commit that referenced this issue Aug 26, 2022
…e requested data

* Implement interfaces for template parts
* Refactor Action constructor to take an object for runtime options (cleaner, more extensible)
* Refactor subreddit resource and snoowraputils content rendering and organization to use objects of optional data rather than required arguments
  * Make almost all data optional and only parse/render if included
  * Move rule results parsing/formatting into own function
  * Refactor footer render to use renderContent (DRY)
* Add some requested template data #104
  * {{item.subreddit}} #87
  * {{check}} #87
* Updated templating documentation
FoxxMD added a commit that referenced this issue Aug 30, 2022
* Add top-level 'actionSummary' template variable that renders a markdown list of action results
* Add individual action result/data, in the same structure as rules, under the top-level 'actions' template variable
@FoxxMD
Copy link
Owner Author

FoxxMD commented Sep 1, 2022

Available in 0.12.1

@FoxxMD FoxxMD closed this as completed Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API CM API (server or client) enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant