-
Notifications
You must be signed in to change notification settings - Fork 1
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: Enable PR lint workflow #41
Conversation
- enable GH action for linting PRs - check PR title follows Conventional Commits specification (https://www.conventionalcommits.org/) - check yamllint and shellcheck - use smaller screenshot in readme
Reviewer's Guide by SourceryThis PR adds a new GitHub Actions workflow for linting pull requests. The workflow performs three main checks: validates PR titles against Conventional Commits specification, runs shellcheck on shell scripts, and runs yamllint on YAML files. The workflow is triggered on pull request events including when PRs are opened, edited, synchronized, or reopened. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 @martimlobao - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using
pull_request
instead ofpull_request_target
trigger unless you specifically need to access secrets in forked repo PRs - The
-x
flag for shellcheck follows source statements which could be a security risk. Consider removing it unless absolutely necessary
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟡 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 and I'll use the feedback to improve your reviews.
--- | ||
name: Lint PR | ||
on: # yamllint disable-line rule:truthy | ||
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.
🚨 suggestion (security): Consider security implications of using pull_request_target
While pull_request_target is sometimes necessary for fork PR workflows, it runs with repository secrets and elevated permissions. Ensure this is required for your use case and consider using regular pull_request if possible.
pull_request_target: | |
pull_request: |
Summary by Sourcery
Enable a GitHub Action workflow for linting pull requests, checking PR titles for compliance with the Conventional Commits specification, and running yamllint and shellcheck. Update the README to include a smaller screenshot.
CI:
Documentation: