Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Adding Issue to Project not working

Open
#151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github, python
Domain
api

Research direction

Start with api.projects.create_card and compare its content_id and content_type handling with GitHub's project-card API documentation and the linked Stack Overflow workaround. Done means passing an issue creates a project card without the Validation Failed response.

Written by the indexing model from the issue text.

Description

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"
}
Dominant language
Python
Stars
687
Forks
69
Avg merge
1m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AnswerDotAI/ghapi

All issues in AnswerDotAI/ghapi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.