move-labeled-or-milestoned-issue icon indicating copy to clipboard operation
move-labeled-or-milestoned-issue copied to clipboard

Receive `#ERROR# TypeError: Cannot read property 'columns' of null` on run.

Open benjamin-hull opened this issue 4 years ago • 10 comments

I'm trying to set up this action on a private repo, and receive the following log on run:

Run konradpabjan/[email protected]
This project is configured at the repo level. Repo Owner:[Owner Org], repo name:[Private repo] project number#17
#ERROR# TypeError: Cannot read property 'columns' of null

My workflow YAML looks like this:

on:
  issues:
    types: [labeled]
jobs:
  Move_Labeled_Issue_On_Project_Board:
    runs-on: ubuntu-latest
    steps:
    - name: Move labeled or milestoned issue to a specific project column
      uses: konradpabjan/[email protected]
      with:
        action-token: "${{ secrets.WORKFLOW_ACTIONS }}"
        project-url: "https://github.com/[Owner]/[Repo]/projects/17"
        column-name: "Needs Info"
        label-name:  "Awaiting more info"
        columns-to-ignore: "Done"

The project URL is definitely correct, as are the names of the columns and labels.

This is my first attempt at using actions, so I could be missing something. Any ideas? Thanks in advance!

benjamin-hull avatar Jul 29 '20 02:07 benjamin-hull

Your project URL needs to have the actual owner and repo names, something like:

project-url: https://github.com/konradpabjan/move-labeled-or-milestoned-issue/projects/17

If the URL is correct, you should see output that says something like This project is configured at the repo level. Repo Owner: konradpabjan, repo name: move-labeled-or-milestoned-issue project number#17

konradpabjan avatar Jul 29 '20 09:07 konradpabjan

Oh - yes, I've just redacted the owner and repo names in the example config and logs here as it's a private repo. The URL in the real config is correct, and yep, I get that output in the logs.

So I don't think that's the issue. Any other ideas?

benjamin-hull avatar Jul 29 '20 12:07 benjamin-hull

Had the same issue.

For people finding this old issue in the future: action-token: "${{ secrets.WORKFLOW_ACTIONS }}" Remove the quotes here => action-token: ${{ secrets.WORKFLOW_ACTIONS }}

emre1702 avatar Apr 28 '21 23:04 emre1702

@benjamin-hull Did you find a fix for this?

@emre1702 This did not change the error for me.

ian-steffy avatar Apr 25 '22 13:04 ian-steffy

Dear all,

I have the same error: #ERROR# TypeError: Cannot read properties of null (reading 'columns')

Any news about it?

fabiovinci avatar Mar 03 '23 11:03 fabiovinci

I am getting the same error :

#ERROR# TypeError: Cannot read properties of null (reading 'columns')

... could it be because this a new project, and by new I mean the newer version of GitHub Projects, the legacy ones being discontinued?

fredericsimard avatar Aug 17 '23 21:08 fredericsimard

I am getting the same error :

#ERROR# TypeError: Cannot read properties of null (reading 'columns')

... could it be because this a new project, and by new I mean the newer version of GitHub Projects, the legacy ones being discontinued?

I am also having the same error currently. I have a suspicion you are correct @fredericsimard but I'm hoping you're incorrect lol 😓 😅

colinwilliams91 avatar Aug 27 '23 02:08 colinwilliams91

This Issue #28 actually has a comment pointing to a better way to achieve similar things that worked for me!

colinwilliams91 avatar Aug 27 '23 04:08 colinwilliams91

@colinwilliams91 I believe this might fix the issue. I'll try that tomorrow and let you know.

fredericsimard avatar Aug 27 '23 20:08 fredericsimard

@colinwilliams91 Turns out there is no need for an action with the new Projects, you can use Workflows to move issues and PRs in a project and put them in a specific column. More details here:

  • https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/quickstart-for-projects#configure-built-in-automation
  • https://github.com/orgs/community/discussions/8076

fredericsimard avatar Aug 31 '23 14:08 fredericsimard