ncipollo / release-action

An action which manages a github release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: Error 404 A Discussion could not be created. Make sure you passed a valid category name

RolfMoleman opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

error: Error 404 A Discussion could not be created. Make sure you passed a valid category name
when discussion variable set to "Announcements" or "announcements"

To Reproduce

in workflow:

- name: Create a GitHub release if: "!cancelled()" uses: ncipollo/release-action@v1.13.0 with: allowUpdates: true body: ${{ steps.tag_version.outputs.changelog }} discussionCategory: "announcements" generateReleaseNotes: true makeLatest: true name: Release ${{ steps.tag_version.outputs.new_tag }} tag: ${{ steps.tag_version.outputs.new_tag }}

Expected behavior
A clear and concise description of what you expected to happen.

Announcements type of discussion to be created

Screenshots
If applicable, add screenshots to help explain your problem.

Can provide if required

You need to make sure Announcements exists as a category in your repo - https://docs.github.com/en/discussions/managing-discussions-for-your-community/managing-categories-for-discussions

The API will fail if you try and pick a category which doesn't exist in the repo. I don't think announcements was always part of the default category set (this repo doesn't have it) so you probably need to add it manually in your discussion settings.

That field may also be case sensitive.

Hi @ncipollo it's definitely enabled on the specific repo, discussions are also definitely enabled on the same repo, where Announcements are a GitHub default.
I've tried upper and lowercase quoted and unquoted but get the same results.

Announcements is apparently a special discussion format and it won't work with the API. See response from github team here: goreleaser/goreleaser#2304. I'll update the readme to mention this.

You might also be able to get it to work if you use a personal access token which has admin rights to the repo (as opposed to the default token). If you try that and it works let me know and I'll update the readme :)