Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: astral-sh/ruff-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1
Choose a base ref
...
head repository: astral-sh/ruff-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2
Choose a head ref
  • 1 commit
  • 44 files changed
  • 1 contributor

Commits on Dec 3, 2024

  1. Convert from composite to typescript (#17)

    # Summary
    
    Converts the action from a [composite to
    javascript](https://docs.github.com/en/actions/sharing-automations/creating-actions/about-custom-actions#types-of-actions).
    Most importantly to make use of prebuilt libraries and helpers like
    [actions/toolkit](https://github.com/actions/toolkit).
    
    The structure and features are modeled after
    [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv)
    
    ## Changes
    
    1. Download the ruff executable for the current platform from the GitHub
    releases
    2. Add ruff to the PATH
    3. Validate the downloaded ruff executable against its checksum
    4. Cache ruff in the [Tool
    Cache](https://github.com/actions/toolkit/tree/main/packages/tool-cache)
    to speed up runs on self-hosted runners
    5. Support semver ranges to define the ruff version to install
    
    ## 🚨 Breaking changes
    
    Removes the `changed-files` input.
    
    This input could previously be used to run ruff only on files changed in
    a PR. The functionality was implemented by calling another action. This
    repo should focus on providing a quick and easy way to use ruff in
    GitHub Actions, not add more functionality on top of ruff.
    
    The previous functionality can be replicated with:
    
    ```yaml
    - uses: actions/checkout@v4
    - name: Get changed files
      id: changed-files
      uses: tj-actions/changed-files@v45
      with:
        files: |
          **.py
    - name: Run ruff on changed files only 
      uses: astral-sh/ruff-action@v2
      with:
        src: ${{ steps.changed-files.outputs.all_changed_files }}
    ```
    
    This was tested here:
    https://github.com/astral-sh/ruff-action/actions/runs/12017035736/job/33498508269
    eifinger authored Dec 3, 2024
    1 Configuration menu
    Copy the full SHA
    f2e3221 View commit details
    Browse the repository at this point in the history
Loading