Skip to content

feat: Adding codespell workflow#4173

Merged
yhakbar merged 6 commits intomainfrom
feat/adding-codespell-workflow
Apr 17, 2025
Merged

feat: Adding codespell workflow#4173
yhakbar merged 6 commits intomainfrom
feat/adding-codespell-workflow

Conversation

@yhakbar
Copy link
Copy Markdown
Collaborator

@yhakbar yhakbar commented Apr 17, 2025

Description

Adds codespell GitHub Actions workflow, and removes the existing one from CircleCI.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added codespell GitHub Actions workflow, and removed the existing one from CircleCI.

Summary by CodeRabbit

  • Chores
    • Switched spelling check automation from CircleCI to GitHub Actions. Spelling checks will now run automatically on pull requests using a new workflow. No changes to the main application or user interface.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terragrunt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 7:38pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 17, 2025

📝 Walkthrough

Walkthrough

The changes remove the codespell spelling check job from the CircleCI pipeline configuration and introduce a new GitHub Actions workflow to perform the same spelling checks. The CircleCI configuration file is updated to delete all references to the codespell job, while a new workflow file is added under .github/workflows/, configuring GitHub Actions to run codespell on push to main and pull request events. No other jobs or workflows in either CI system are affected.

Changes

File(s) Change Summary
.circleci/config.yml Removed the codespell job definition and all its invocations from the CircleCI pipeline.
.github/workflows/codespell.yml Added a new GitHub Actions workflow to run codespell on push to main and pull request events.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub
    participant GitHub Actions
    participant codespell

    GitHub->>GitHub Actions: Push to main or PR opened/synchronized/reopened
    GitHub Actions->>codespell: Checkout code and install dependencies
    GitHub Actions->>codespell: Run codespell on repository
    codespell-->>GitHub Actions: Report results
    GitHub Actions-->>GitHub: Annotate PR with codespell results
Loading

Suggested reviewers

  • levkohimins
  • denis256

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ad3286d and fe5b157.

📒 Files selected for processing (2)
  • .circleci/config.yml (0 hunks)
  • .github/workflows/codespell.yml (1 hunks)
💤 Files with no reviewable changes (1)
  • .circleci/config.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/codespell.yml
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: Build Without Go Proxy (darwin/amd64)
  • GitHub Check: Build Without Go Proxy (windows/amd64)
  • GitHub Check: Build Without Go Proxy (windows/386)
  • GitHub Check: Build Without Go Proxy (linux/amd64)
  • GitHub Check: Build Without Go Proxy (linux/arm64)
  • GitHub Check: Build Without Go Proxy (linux/386)
  • GitHub Check: Build Without Go Proxy (darwin/arm64)
  • GitHub Check: unessential
  • GitHub Check: build-and-test
  • GitHub Check: Pull Request has non-contributor approval

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@yhakbar yhakbar force-pushed the feat/adding-codespell-workflow branch from 9dd72f2 to ad3286d Compare April 17, 2025 17:17
@yhakbar yhakbar marked this pull request as ready for review April 17, 2025 17:18
@yhakbar yhakbar requested review from denis256 and lev-ok as code owners April 17, 2025 17:18
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/codespell.yml (3)

3-6: Review and refine workflow triggers
The pull_request trigger covers opened, synchronize, and reopened events—good for PR validation. Consider also adding a workflow_dispatch trigger to allow manual runs from the Actions tab, e.g.:

on:
  pull_request:
    types: [opened, synchronize, reopened]
  workflow_dispatch:

This provides flexibility for on‑demand spell checks.


16-23: Simplify default packages file creation
The heredoc works, but you can streamline it using echo, which is more concise:

- run: |
-   cat <<EOF > .mise-python-default-packages
-   codespell==2.4.0
-   EOF
-
-   echo "MISE_PYTHON_DEFAULT_PACKAGES_FILE=.mise-python-default-packages" >> "$GITHUB_ENV"
+ run: |
+   echo "codespell==2.4.0" > .mise-python-default-packages
+   echo "MISE_PYTHON_DEFAULT_PACKAGES_FILE=.mise-python-default-packages" >> "$GITHUB_ENV"

This reduces boilerplate and improves readability.


32-33: Enhance spell check reporting with Reviewdog
Consider piping codespell output into reviewdog to annotate typos inline in the PR:

- name: Run codespell with Reviewdog
  run: |
    codespell . | reviewdog -f=codespell -reporter=github-pr-review -filter-mode=nofilter
  env:
    REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This provides richer feedback directly in code diffs.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e7601c and ad3286d.

📒 Files selected for processing (2)
  • .circleci/config.yml (0 hunks)
  • .github/workflows/codespell.yml (1 hunks)
💤 Files with no reviewable changes (1)
  • .circleci/config.yml
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: unessential
  • GitHub Check: build-and-test
  • GitHub Check: Pull Request has non-contributor approval
🔇 Additional comments (1)
.github/workflows/codespell.yml (1)

24-31: Pinned action versions ensure stability
Using jdx/mise-action@v2 with explicit Python and MISE versions is a solid practice—it guarantees reproducible builds. No changes needed here.

- name: Create default packages file
run: |
cat <<EOF > .mise-python-default-packages
codespell==2.4.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why can't we add codespell to mise? And install it directly? because it will bring Python dependencies?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AFAIK, there isn't a codespell mise/asdf plugin that we can use.

What this does is have mise install python, then install the codespell package immediately afterwards.

@yhakbar yhakbar merged commit 450e38f into main Apr 17, 2025
17 checks passed
@yhakbar yhakbar deleted the feat/adding-codespell-workflow branch April 17, 2025 19:53
This was referenced May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants