-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Hi there 👋 Thanks for the code.
Using an env var in the assignees field in the front matter of an issue template markdown doesn't work.
Is there a way to fix this:
Workflow:
- name: Create issue if patch failed
if:
some... logic...
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
with:
filename: .github/ISSUE_TEMPLATE/sync-failed.md
Issue template:
---
title: Sync Failed for PR {{ env.PR_NUMBER }}
labels: sync-failed
assignees: {{ env.PR_AUTHOR }}
---
## Sync Failed
The GitHub Action failed to do its thing from PR #{{ env.PR_NUMBER }} and @{{ env.PR_AUTHOR}} to the blah blah blah...Error:
Run JasonEtco/create-an-issue@v2
⬤ debug Reading from file .github/ISSUE_TEMPLATE/sync-failed.md
✖ error An error occurred while parsing the issue. This might be caused by a malformed issue title, or a typo in the labels or assignees. Check .github/ISSUE_TEMPLATE/sync-failed.md!
✖ error {
_errors: [],
assignees: {
_errors: [
'Expected array, received object',
'Expected string, received object'
]
}
}
Error: An error occurred while parsing the issue. This might be caused by a malformed issue title, or a typo in the labels or assignees. Check .github/ISSUE_TEMPLATE/sync-failed.md!
undefined
Removing the assignees front matter item fixes it. But I'd really like that dynamic assignment. Any fix?
Metadata
Metadata
Assignees
Labels
No labels