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

Unable to create discussion with request body. #1323

Open
jaune162 opened this issue Feb 26, 2024 · 2 comments
Open

Unable to create discussion with request body. #1323

jaune162 opened this issue Feb 26, 2024 · 2 comments

Comments

@jaune162
Copy link

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

@jaune162
Copy link
Author

@jaune162
Copy link
Author

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.

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