Add support for mustache templates to assignees
See original GitHub issueSimilar to #119 would it be possible to add support for mustache templates for assignees?
I’m creating a process that automatically assigns a member from my team to an issue by passing the gh user as an environment variable. Maybe I’m missing some existing functionality that might already accomplish this?
This is my current issue_template header:
---
title: Update-stale-article-{{ env.ARTICLE }}
assignees: {{ env.ASSIGNEE }}
labels: article-maintenance
---
This fails with: Error: An error occurred while creating the issue. This might be caused by a malformed issue title, or a typo in the labels or assignees. Check .github/ISSUE_TEMPLATE.md!
In the logs, I can see
title: 'Update-stale-article-{{ env.ARTICLE }}',
assignees: { '[object Object]': null },
labels: 'article-maintenance'
but I know that the env.ASSIGNEE variable has a value because it is used in the body of the issue as well and populates without a problem.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Support mustache template for title + labels · Issue #74
Issue titles and bodies already support mustache (technically Nunjucks). Is there something specific that isn't working? All reactions.
Read more >Using Templates
OpenAPI Generator supports user-defined templates. This approach is often the ... Then, we'll add the necessary import to api.mustache .
Read more >The Joy of Mustache: Server Side Templates for the JVM
I added spring-boot-starter-mustache to my new project, and was up and running within seconds. I want to show you what a neat little...
Read more >PagerDuty mustache tags | Statuspage
PagerDuty sends data to Statuspage that can be used in Incident Templates via mustache tags. This allows you to “pull-in” additional information from ......
Read more >Using mustache templates as partial views in Rails 4?
I'm trying to use mustache views in Rails 4 instead of some old partial views that hosted some HTML templates I am sharing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@epiekarski the template does not let you use env vars, but you can just set the assignees directly in the action’s yaml file:
Hey folks - I’m fine with support templates for labels, assignees, and anything else. PRs welcome! It’d have to look similar to how we’re doing the title templating:
https://github.com/JasonEtco/create-an-issue/blob/4cc79e46650462b59761133ac18126b98c5e8a60/src/action.ts#L81-L84
That said: you should be able to use the
assignees
input already: https://github.com/JasonEtco/create-an-issue#inputsThere’s not an input for
labels
, but again I’d be happy to review a PR to add that support 👍