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

TypeError: Cannot read properties of undefined (reading 'length') #56

Open
kandrewth opened this issue Oct 4, 2023 · 0 comments
Open

Comments

@kandrewth
Copy link

Dear team,

I am attempting to use the atlassian/gajira-create@v3 Github action to create a jira ticket as part of a workflow after a scan results in a failure in a previous step (scan-result). I am using the following code in the workflow:

- name: Log into Jira if result found
   id: jira-login
   if: always() && steps.scan-result.outcome == 'failure'
   uses: atlassian/gajira-login@v3
   env:
      JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
      JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
      JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

# If Jira Login successful, Create Jira Ticket
- name: Create Jira ticket
   id: create
   if: always() && steps.jira-login.outcome == 'success'
   uses: atlassian/gajira-create@v3
   with:
      project: ATP
      issuetype: Task
      summary: Found result
      description: test

The login action seems to complete successfully, however the ticket creation throws the following error:

Log into Jira if result found
   Run atlassian/gajira-login@v3
   env:
      JIRA_BASE_URL: ***
      JIRA_USER_EMAIL: ***
      JIRA_API_TOKEN: ***
   Successfully logged in.

Create Jira ticket
   Run atlassian/gajira-create@v3
   TypeError: Cannot read properties of undefined (reading 'length')
      at module.exports.execute (/home/runner/work/_actions/atlassian/gajira-create/v3/webpack:/create/action.js:28:1)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at exec (/home/runner/work/_actions/atlassian/gajira-create/v3/dist/index.js:32538:20)

Can anyone help me identify what is causing this issue and if it can be resolved? I have read previous posts that people have been able to create tickets using the action and from reviewing my inputs, I do not see any issues that could cause this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant