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

feat: add github release discussion category configuration option #297

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

maikelvdh
Copy link
Member

This allows to enable to create a discussion from a GitHub release. See: https://github.blog/changelog/2021-04-06-releases-support-comments-and-reactions-with-discussion-linking/

@github-actions github-actions bot added bump:minor Pull Requests that update the Minor SemVer version after merging initial development labels Jul 5, 2024
Copy link
Collaborator

@jstmlr jstmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Does this require extra permissions that need to be documented?

src/github.ts Show resolved Hide resolved
@maikelvdh
Copy link
Member Author

Does this require extra permissions that need to be documented?

No same permissions seem required, though as mentioned here in case one will configure this on a repository then this repository should have discussions enabled and have the category name configured also established. There is no RestAPI yet for discussions it seems which we could leverage to validate this from within the code, though given the errors are pretty clear I don't think that is a big deal for now.

@KevinDeJong-TomTom
Copy link
Collaborator

Does this require extra permissions that need to be documented?

No same permissions seem required, though as mentioned here in case one will configure this on a repository then this repository should have discussions enabled and have the category name configured also established. There is no RestAPI yet for discussions it seems which we could leverage to validate this from within the code, though given the errors are pretty clear I don't think that is a big deal for now.

I believe that information around availability of repository features (issues, discussions, ..) is already present in github.context.payload.pull_request.base.repo, which you can directly access. See also; https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request

image

@maikelvdh
Copy link
Member Author

maikelvdh commented Jul 5, 2024

I believe that information around availability of repository features (issues, discussions, ..) is already present in github.context.payload.pull_request.base.repo, which you can directly access. See also; https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request

Correct that is possible, though given the clear error messaging in case it is not present and the configuration is quite descriptive towards discussions I decided to leave it out.

@maikelvdh maikelvdh merged commit 98ff47b into master Jul 8, 2024
7 checks passed
@maikelvdh maikelvdh deleted the release-with-discussion branch July 8, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump:minor Pull Requests that update the Minor SemVer version after merging initial development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants