AnswerDotAI / AnswerDotAI/ghapi

Adding Issue to Project not working

オープン
#151 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
685
フォーク
70
平均マージ
1分
マージ済み PR(30日)
2

説明

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"
}
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, python
領域
api
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。