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(workflows): add greeting workflow for new issues and PRs. #128

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/greeting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Greetings

on:
pull_request_target:
Copy link
Contributor

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.

types:
- opened
issues:
types:
- opened

jobs:
greeting:
runs-on: ubuntu-latest
if: ${{ github.actor != 'all-contributors[bot]' && github.actor != 'ryansurf' }}
Copy link
Contributor

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.

Suggested change
if: ${{ github.actor != 'all-contributors[bot]' && github.actor != 'ryansurf' }}
if: ${{ !contains(fromJson('["all-contributors[bot]", "ryansurf"]'), github.actor) }}

permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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 ⭐
Copy link
Owner

Choose a reason for hiding this comment

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

I like the message!

• Your support means a lot to us! 😊
pr-message: |
👋 Hi! Thanks for submitting your first pull request!
• We appreciate your effort to improve this project.
• If you're enjoying your experience, please consider giving us a star ⭐
• It helps us grow and motivates us to keep improving! 🚀
Loading