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

Variable $input of type AddProjectV2ItemByIdInput not provided! #342

Open
BatoolMM opened this issue Mar 25, 2023 · 1 comment
Open

Variable $input of type AddProjectV2ItemByIdInput not provided! #342

BatoolMM opened this issue Mar 25, 2023 · 1 comment

Comments

@BatoolMM
Copy link

BatoolMM commented Mar 25, 2023

I am trying to automate adding an issues to Projects using GHA

      - name: Add To RSF Programme Management Project
        uses: actions/add-to-project@v0.3.0

        with:
          project-url: https://github.com/orgs/aim-rsf/projects/9
          github-token: ${{ secrets.GH_TOKEN }}

I am not sure why it keeps getting this error - I have been trying to debug it for ages, any help is appreciated!

Run actions/add-to-project@v0.3.0
##[debug]Issue/PR owner: aim-rsf
##[debug]Project URL: https://github.com/orgs/aim-rsf/projects/9
##[debug]Project owner: aim-rsf
##[debug]Project number: 9
##[debug]Project owner type: orgs
##[debug]Project node ID: PVT_kwDOBlYxfM4AEvO5
##[debug]Content ID: undefined
Creating project item
Error: Request failed due to following response errors:
 - Variable $input of type AddProjectV2ItemByIdInput! was provided invalid value for contentId (Expected value to not be null)

The URL is correct but is it because the project is private?

@BatoolMM BatoolMM changed the title - Variable $input of type AddProjectV2ItemByIdInput Variable $input of type AddProjectV2ItemByIdInput not provided! Mar 25, 2023
@dmorgan-fa
Copy link

@BatoolMM, I was running into the same issue and it was because I was using the wrong trigger for the action when testing it (I was using a workflow dispatch to trigger the run, but it needs to be an issues or pull_request). What trigger were you using?

You might also want to try the latest version: 0.5.0 and make sure it's the new type of projects board you're trying to add it too, not GitHub projects (classic):

Use this action to automatically add the current issue or pull request to a GitHub project. Note that this action does not support GitHub projects (classic).

Repo README

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