-
Notifications
You must be signed in to change notification settings - Fork 32
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(workflows): add greeting workflow for new issues and PRs. #128
Conversation
Reviewer's Guide by SourceryThis pull request adds a new GitHub Actions workflow file named 'greeting.yml' to implement a greeting system for new issues and pull requests. The workflow is designed to welcome first-time contributors with personalized messages for both issues and pull requests, encouraging engagement and project growth. File-Level Changes
Tips
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @K-dash - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟡 Security: 1 issue found
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor != 'all-contributors[bot]' && github.actor != 'ryansurf' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (performance): Consider using a more scalable approach for actor exclusions
The current hardcoded list of excluded actors might become difficult to maintain as it grows. Consider using a separate configuration file or a more dynamic approach for managing excluded users.
if: ${{ github.actor != 'all-contributors[bot]' && github.actor != 'ryansurf' }} | |
if: ${{ !contains(fromJson('["all-contributors[bot]", "ryansurf"]'), github.actor) }} |
name: Greetings | ||
|
||
on: | ||
pull_request_target: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 issue (security): Be cautious when using 'pull_request_target' event
The 'pull_request_target' event can be a security risk if not handled carefully, as it runs workflows with repository secrets on PRs from forks. Ensure that this workflow doesn't execute any untrusted code from the PR.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
issue-message: | | ||
👋 Hi! Thanks for opening your first issue! | ||
• We're excited to see your contribution. | ||
• If you find this project helpful, please consider giving it a star ⭐ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the message!
I like the idea! The messages are nice and I like asking to consider giving a star to promote the project. Good work! |
General:
Code:
Change Summary
@ryansurf
I added a GitHub Actions workflow (
greeting.yml
) that displays a greeting message for newly opened issues and pull requests!Exclude certain actors (
all-contributors[bot]
andryansurf
) and automatically send a welcome message for first-time contributors.Include separate messages for issue and pull request to thank external contributors and promote project stars😊
Reference:
https://dev.to/hidaytrahman/greet-to-the-new-pr-and-issue-creator-in-github-action-1-k89
https://github.com/actions/first-interaction
Summary by Sourcery
Add a GitHub Actions workflow to greet new contributors on opening issues or pull requests, with personalized messages for each type of contribution, while excluding specific actors.
New Features:
CI: