Skip to content

Commit

Permalink
Use Discussions for ideas and questions
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Aug 2, 2024
1 parent bd26351 commit 0478d20
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ data class GithubIssueTemplates(
val update: Boolean = generate,
/** Whether to automatically assign developers to issues. */
val assignDevelopers: Boolean = true,
/** Whether to use the GitHub Discussions tab. */
val useDiscussions: Boolean = true,
/** The category for Ideas/Feature Requests in the Discussions feature; or `null` to not use it. */
val ideasDiscussionCategory: String? = "ideas",
/** The category for Questions in the Discussions feature; or `null` to not use it. */
val questionsDiscussionCategory: String? = "q-a",
/** The type label to apply to bugs; or `null` to not apply a label. */
val bugTypeLabel: String? = "bug",
/** The type label to apply to feature requests; or `null` to not apply a label. */
Expand Down
41 changes: 34 additions & 7 deletions repoman/src/main/resources/templates/CONTRIBUTING.md.kte
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,31 @@ Thank you for wanting to contribute to this project! :tada::+1:
> for this project, or even outright reject it.

#### **You have a question?**
Search the [Discussions][1] and [Stackoverflow][3] to see whether your question
@if(meta.files.githubIssueTemplates.questionsDiscussionCategory != null)
Search the [Discussions][questions] to see whether your question
has already been answered, or ask your question there.
Please do **not** make an issue on the Github repository.
@else
Please check the links on the [New Issue][new-issue] page,
or find more info on the [Spoofax Support][support] page.
@endif


#### **You have an idea or feature request?**
@if(meta.files.githubIssueTemplates.ideasDiscussionCategory != null)
Search the [Discussions][ideas] to see whether your question
has already been answered, or ask your question there.
Please do **not** make an issue on the Github repository.
@else
Please check the links on the [New Issue][new-issue] page,
or find more info on the [Spoofax Support][support] page.
@endif


#### **You found a bug**
Search the [Issues][2] to ensure the bug has not been reported before.
Search the [Issues][issues] to ensure the bug has not been reported before.

If the bug is new, open a new issue with a _clear title and description_.
If the bug is new, [open a new issue][new-issue] with a _clear title and description_.
Please indicate:
- what you did,
- what you expected to happen, and
Expand All @@ -48,7 +64,11 @@ Thank you! Please open a GitHub pull request with the patch.


#### **You wrote a patch that adds a new feature or changes an existing one**
Please open an issue _first_, so we can discuss the change.
@if(meta.files.githubIssueTemplates.ideasDiscussionCategory != null)
Please [create a discussion topic][ideas] _first_, so we can discuss the change.
@else
Please [open an issue][new-issue] _first_, so we can discuss the change.
@endif


#### **You want to contribute to the documentation or test suite**
Expand All @@ -60,6 +80,13 @@ Thanks! :heart: :heart: :heart:

[Programming Languages Group](https://pl.ewi.tudelft.nl/), [Delft University of Technology](https://www.tudelft.nl/)

[1]: https://github.com/${meta.repoOwner}/${meta.repoName}/discussions
[2]: https://github.com/${meta.repoOwner}/${meta.repoName}/issues
[3]: https://stackoverflow.com/
@if(meta.files.githubIssueTemplates.questionsDiscussionCategory != null)
[questions]: https://github.com/${meta.repoOwner}/${meta.repoName}/discussions/categories/${meta.files.githubIssueTemplates.questionsDiscussionCategory}
@endif
@if(meta.files.githubIssueTemplates.ideasDiscussionCategory != null)
[ideas]: https://github.com/${meta.repoOwner}/${meta.repoName}/discussions/categories/${meta.files.githubIssueTemplates.ideasDiscussionCategory}
@endif
[issues]: https://github.com/${meta.repoOwner}/${meta.repoName}/issues
[new-issue]: https://github.com/${meta.repoOwner}/${meta.repoName}/issues/new/choose
[support]: https://spoofax.dev/support/

Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@
@endif
blank_issues_enabled: false
contact_links:
- name: 📚 Spoofax Documentation
- name: 📚 Spoofax 2 Documentation
url: https://www.spoofax.dev/
about: Documentation about Spoofax and all included Meta-Languages.
about: Spoofax 2 documentation and all included meta-languages.
@if(meta.documentationLink != null)
- name: 📚 ${meta.title} Documentation
url: ${meta.documentationLink}
about: Documentation for this project.
@endif
- name: ⁉️ Spoofax Support Page
url: https://www.spoofax.dev/support
about: Information on Spoofax Support, and how to get in touch.
- name: 🙋🏽 Spoofax Users Channel
url: https://slde.slack.com/archives/C7254SF60
about: The Spoofax Users channel on Slack. See the Spoofax Support Page on how to gain access.
@if(meta.files.githubIssueTemplates.useDiscussions)
- name: 💬 Discussions
url: https://github.com/${meta.repoOwner}/${meta.repoName}/discussions/
about: Alternatively, ask questions in the Discussions tab.
@if(meta.files.githubIssueTemplates.questionsDiscussionCategory != null)
- name: 🙏 Ask a Question
url: https://github.com/${meta.repoOwner}/${meta.repoName}/discussions/categories/${meta.files.githubIssueTemplates.questionsDiscussionCategory}
about: Ask questions in the Discussions.
@endif
@if(meta.files.githubIssueTemplates.ideasDiscussionCategory != null)
- name: 💡 Propose an Idea or Feature
url: https://github.com/${meta.repoOwner}/${meta.repoName}/discussions/categories/${meta.files.githubIssueTemplates.ideasDiscussionCategory}
about: Propose ideas and feature requests in the Discussions.
@endif
- name: 🛡️ Security issue
url: https://github.com/${meta.repoOwner}/${meta.repoName}/security/advisories/new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ class GenerateCommandTests: FunSpec({
generate: true
update: true
assignDevelopers: true
useDiscussions: true
ideasDiscussionCategory: "feature-requests"
questionsDiscussionCategory: "ask-a-question"
bugTypeLabel: "Type-Bug"
featureRequestTypeLabel: "Type-Enhancement"
questionTypeLabel: "Type-Question"
Expand Down

0 comments on commit 0478d20

Please sign in to comment.