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

Error: TypeError: Cannot read property 'toLowerCase' of null #80

Open
veitbjarsch opened this issue Jan 9, 2022 · 1 comment
Open

Comments

@veitbjarsch
Copy link

veitbjarsch commented Jan 9, 2022

Hi, I've tried your plugin. First of all I think it is an awesome work you did. Unfortunately I receive an error when I try to use it. I tried it with the latest release als well with the main branch.

This is the action output

Run tonyhallett/artifacts-url-comments@main
  with:
    prefix: New APK build: 
    suffix: Have a nice day.
    format: name
    addTo: pullandissues
    pullState: open
    errorNoArtifacts: true
    caseSensitive: false
    closeWords: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
    usePullTitle: true
    usePullBody: true
    useCommitMessages: true
    useBranch: true
    branchIssuesWords: issue, issues
    branchDelimiters: _, -
  env:
    GITHUB_TOKEN: ***
Error: TypeError: Cannot read property 'toLowerCase' of null

My pipeline looks like this:

name: Link Artifact

on:
  workflow_run:
    workflows: [Node.js]
    types: [completed]

jobs:
  artifacts-url-comments:
    runs-on: windows-2019
    steps:
      - run: echo Neuer Commit
      - name: add artifact links to pull request and related issues step
        uses: tonyhallett/artifacts-url-comments@main
        env:
          GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        with:
          prefix: "New APK build: "
          suffix: "Have a nice day."
          format: "name"
          addTo: "pullandissues"

The only place I saw a toLowerCase in your code it the addTo variable. As you can see above this variable was set. That's kinda strange. Unfortunately I don't know so much about creating github actions.

Maybe you can help me.

Update: The issue is in the addTo: "pullandissues" if I only use addTo: "pull" everything works as expected

@tonyhallett
Copy link
Owner

Update: The issue is in the addTo: "pullandissues" if I only use addTo: "pull" everything works as expected

Thanks for that.

Sorry for not responding but I currently do not have the time to revisit this. I would have to relearn / add logging statements / set up a repo to run against etc etc

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

2 participants