giscus / giscus

A comment system powered by GitHub Discussions. :octocat: :speech_balloon: :gem:

Home Page:https://giscus.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to create discussion with request body.

jaune162 opened this issue · comments

This config generate by https://giscus.app/

<script src="https://giscus.app/client.js"
        data-repo="jaune162/books.jaune162.blog"
        data-repo-id="R_kgDOLYN10Q"
        data-category="Announcements"
        data-category-id="DIC_kwDOLYN10c4Cdh8Q"
        data-mapping="pathname"
        data-strict="0"
        data-reactions-enabled="1"
        data-emit-metadata="0"
        data-input-position="bottom"
        data-theme="light"
        data-lang="zh-CN"
        crossorigin="anonymous"
        async>
</script>

This is the request payload of my websit.

{
          "repo":  "jaune162/books.jaune162.blog",
          "input":  {
                    "repositoryId":  "R_kgDOLYN10Q",
                    "categoryId":  "DIC_kwDOIHQZms4CR5Q8",
                    "title":  "docs/design-pattern/design-principle/",
                    "body":  "# docs/design-pattern/design-principle/\n\n- 单一职责原则(Single Responsibility Principle, SRP)\n\nhttps://books.jaune162.blog/docs/design-pattern/design-principle/"
          }
}

The config of repo and repoId is correct. But the response body is {error: "Unable to create discussion with request body."}.

When I change the Discussion Category to General(DIC_kwDOLYN10c4Cdh8R)。It's works.

category="General"
categoryId="DIC_kwDOLYN10c4Cdh8R"

It may not work properly when the Discussion Category is Announcements.