actions / first-interaction

An action for filtering pull requests and issues from first-time contributors
MIT License
766 stars 337 forks source link

🚀 Feature: Add support for GitHub Discussions #308

Open HomerusJa opened 2 hours ago

HomerusJa commented 2 hours ago

Feature Description

Add support for welcoming first-time contributors who create discussions, similar to how the action currently handles issues and pull requests. This would allow maintainers to provide a welcoming message to users who start their first discussion in a repository.

Use Case

Many repositories use GitHub Discussions as a community platform for questions, ideas, and announcements. Being able to welcome new community members when they start their first discussion would help create a more welcoming environment and guide them towards productive participation.

Currently, the action supports:

The proposal is to add:

Implementation Details

The implementation could follow the same pattern as issues and PRs:

  1. Add a new input parameter discussion-message to the action
  2. Add discussion event support in the action trigger
  3. Update the action to handle the discussion event type
  4. Document the new feature in the README

Example usage would look like:

- name: First interaction
  uses: actions/first-interaction@v1
  with:
    repo-token: ${{ secrets.GITHUB_TOKEN }}
    discussion-message: |
      Welcome to our community discussions! ...

Motivation

GitHub Discussions has become an integral part of many open source communities. The ability to welcome new discussion participants would:

Alternatives Considered

Currently, maintainers need to create custom workflows using the GitHub API to achieve this functionality, which is more complex and requires additional maintenance compared to using this established action.

I'd be happy to contribute to implementing this feature if desired! 🙌

github-actions[bot] commented 2 hours ago

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.