JasonEtco / create-an-issue

A GitHub Action for creating a new issue from a template file.
MIT License
267 stars 83 forks source link

Add interpolation support to labels and assignees #166

Open jnewland opened 1 year ago

jnewland commented 1 year ago

Fixes https://github.com/JasonEtco/create-an-issue/issues/164.

fieldsfarmer commented 1 year ago

Thanks for the PR. I believe it could also resolve my issue: https://github.com/JasonEtco/create-an-issue/issues/168. Can someone approve this?

dblock commented 10 months ago

I have an active fork in https://github.com/dblock/create-a-github-issue if you want to port this?

fieldsfarmer commented 8 months ago

@dblock I found your fork did not work either.

# In the workflow yaml file:
      - name: Report success 2
        uses: dblock/create-a-github-issue@v3.1.1
        env:
          GITHUB_TOKEN: ${{ secrets.xxx }}
          launcher: "fieldsfarmer"
        with:
          filename: .github/ISSUE_TEMPLATE/template.md

# In the template.md
---
title: "Title"
labels: lable
assignees: {{env.launcher}}
---
Report generated at: `{{ date | date('YYYY-MM-DD, hh:mm z') }}`

The error is:

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/template.md!
✖  error     TypeError: list.split is not a function 
    at listToArray (/runner/_work/_actions/dblock/create-a-github-issue/v3.1.1/dist/index.js:38005:46)
    at createAnIssue (/runner/_work/_actions/dblock/create-a-github-issue/v3.1.1/dist/index.js:37974:102)

Does your fork include this PR?

@jnewland do you think your PR could fix my example?

fieldsfarmer commented 8 months ago

I patched this PR and created a action fieldsfarmer/create-an-issue@v0.0.4. Verified that it works.

dblock commented 8 months ago

@dblock I found your fork did not work either.

Right, someone needs to take this PR and finish it in my fork, with tests.