-
Notifications
You must be signed in to change notification settings - Fork 224
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: create check-for-typos.yml #1636
Conversation
WalkthroughA new GitHub Actions workflow file named Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (1)
.github/workflows/check-for-typos.yml (1)
11-12
: Suggest updating the step name for clarity.The current step name "Checkout Actions Repository" is slightly misleading. This step is checking out the repository where the workflow is running, not specifically the Actions repository.
Consider updating the name to be more accurate:
- name: Checkout Repository uses: actions/checkout@v4This small change improves clarity and accurately describes the action being performed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- .github/workflows/check-for-typos.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/check-for-typos.yml (2)
6-9
: Job definition looks good!The job is well-defined with a clear name and runs on the latest Ubuntu version, which is appropriate for most cases.
1-15
: Overall, this is a valuable addition to the project.The new workflow for spell-checking is a great initiative to improve code quality. With the suggested improvements (additional trigger events, pinned action versions, and potential configuration), this will become an even more robust and useful tool in your development process.
Great job on implementing this automated spell-checking capability!
name: Typo Check Action | ||
|
||
on: | ||
workflow_dispatch: |
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.
🛠️ Refactor suggestion
Consider adding more trigger events for automated checks.
The workflow is currently set to run only on manual dispatch. While this is useful for on-demand checks, consider adding more trigger events to automate the process. For example:
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
push:
branches: [main, develop]
This would run the spell check automatically on new pull requests, updates to existing pull requests, and pushes to main branches, ensuring consistent code quality.
- name: Check spelling | ||
uses: crate-ci/typos@master |
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.
🛠️ Refactor suggestion
Recommend pinning the typos action to a specific version and consider adding configuration.
-
Pin the action version:
Currently, the workflow uses themaster
branch of thecrate-ci/typos
action. This can lead to unexpected changes if the action is updated. It's generally a good practice to pin to a specific version for stability.- name: Check spelling uses: crate-ci/[email protected] # Replace with the latest stable version
-
Consider adding configuration:
Thetypos
action supports various configuration options. You might want to add some to customize the behavior. For example:- name: Check spelling uses: crate-ci/[email protected] with: config: .github/typos-config.toml write_changes: false
This assumes you have a
typos-config.toml
file in your.github
directory. If not, you can create one to specify custom dictionaries, ignored words, or file patterns to exclude.
Summary by CodeRabbit