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

Adding Issue to Project not working #151

Open
rlshuhart opened this issue Sep 21, 2022 · 0 comments
Open

Adding Issue to Project not working #151

rlshuhart opened this issue Sep 21, 2022 · 0 comments

Comments

@rlshuhart
Copy link

Hi, I was having trouble adding an issue as a card on a project using api.projects.create_card. The below stack overflow described my situation exactly, so thanks to the author, and another kind person provided a workaround/solution. I'm also surprised I did not find an issue already opened on this (if I missed it, please forgive me).

https://stackoverflow.com/questions/70306360/github-api-add-an-issue-to-a-project

What I encounter when passing the content_id with the issue id and content_type as 'Issue' is a Validation Failed error message.

api.projects.create_card(column_id=col.id, content_id=issue.id, content_type='Issue')

====Error Body====
{
  "message": "Validation Failed",
  "errors": [
     {
        "resource": "Project Card",
        "code": "unprocessable",
        "field": "data",
        "message": "You must provide either a note or a contentId."
     }
  ],
  "documentation_url": "https://docs.github.com/enterprise/3.3/v3/projects/cards/#create-a-project-card"
}
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