32 Commits

Author SHA1 Message Date
Kevin Stillhammer 0ce1b0bf8b refactor version resolving (#353) 2026-04-12 13:44:40 +02:00
Kevin Stillhammer 9b8caf6c41 Add manifest-file input (#352) 2026-04-11 19:14:05 +02:00
Kevin Stillhammer 9b2efb7fd8 Add support for pep440 version specifiers (#150)
Fixes: #147
2025-05-26 20:20:17 +02:00
robertHowlett 257550e917 docs: Explain that the default behaviour is ruff check (#142)
This tripped me up, I use ruff for both checking & formatting and
expected it to do both by default.
2025-05-19 10:36:40 +00:00
Kevin Stillhammer ea12b8ac41 Inform user of unsupported old version (#134)
Versions older than v0.0.247 do not have binaries in the GitHub releases
2025-05-07 13:28:39 +00:00
Avasam 94d4d711a6 Mention the --diff flag for format --check (#104)
Just like for the action run adding annotations, the CI is the place
where you'd want extra information.

Especially information that tells you *how* to fix an issue, which is
relevant when a contributor doesn't want to / can't run the tool locally
(an edit through the GitHub UI could be more convenient, don't want to
bother installing extra tools locally, they're having issues not picking
up the right Ruff version when ran locally, etc.)

It's also easier to opt-out of copy-pasting this flag, than not knowing
about it in the first place.

Hence I think this documentation change is a positive to help anyone
integrate this action into their CI for check+formatting by looking at
the readme.
2025-03-19 13:53:29 +01:00
Kevin Stillhammer aecd4a32f6 Extend information on install only (#102)
Closes: #100
2025-03-16 21:10:00 +01:00
Dave Johansen d8f577dec4 Support requirements.txt for version-file (#68) 2025-02-06 17:41:44 +01:00
Adam Turner f14634c415 Read the [project.optional-dependencies] and [dependency-groups] tables (#66)
I'd quite like to use `ruff-action`'s auto-detection feature, but it
currently doesn't read the `[project.optional-dependency]` table, and
support for the PEP 735 `[dependency-groups]` table is currently limited
to only the special-cased `dev` key, and does not account for the
possibility of `{include-group="..."}` inline tables, as [described by
the PEP](https://peps.python.org/pep-0735/#dependency-group-include).

I have guessed how to make the tests work, as the only JS development I
do is plain JS (sans frameworks), so TypeScript is still quite new to me
-- feel free to push required changes to this branch.

A
2025-01-31 22:47:17 +01:00
Kevin Stillhammer 0a5dfb89f1 Fix Markdown link to Install the latest version (#58)
Fixes: #54
2025-01-26 18:22:17 +01:00
Christian Clauss f6d50c4b88 update readme to v3 (#35) 2024-12-31 11:28:59 +01:00
Kevin Stillhammer 7a82f1f7e4 Default to ruff-version from pyproject.toml (#30)
Closes: #9 

Changes the default behavior to:

- Search for a pyproject.toml in the repo root
- Search in project.dependencies and dependency-groups.dev for ruff
- If none is found use latest

Support for requirements.txt files can be added later
2024-12-23 11:07:46 +01:00
Christian Clauss e5ab5d43a6 README.md: astral-sh/ruff-action@v1 --> v2 (#21)
README.md upgraded to match
https://github.com/astral-sh/ruff-action/releases
```diff
- - uses: astral-sh/ruff-action@v1
+ - uses: astral-sh/ruff-action@v2
```
2024-12-06 08:49:52 +01:00
Kevin Stillhammer f2e3221107 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
2024-12-03 17:18:31 +01:00
David J. Felix d0a0e814ec docs: fix references to chartboost action (#7)
Minor fix to documentation -- looks like you missed a few chartboost
references.
2024-10-01 11:29:08 -05:00
Charlie Marsh ad8ad9ec2e Update some documentation 2024-09-29 19:39:38 -04:00
Charlie Marsh beb1d37bb7 Update README.md 2024-09-29 19:24:56 -04:00
Charlie Marsh 7e5f451d8a Update README.md 2024-09-29 19:24:25 -04:00
Charlie Marsh 7388145ba9 Update README to reflect fork (#2) 2024-09-29 19:22:10 -04:00
Amin Sadeghi 79eabade54 Document changed-files keyword in README 2024-04-04 15:34:23 -04:00
brucearctor 6e7156986b Merge branch 'main' into configure_check_or_format_mode 2024-03-25 07:30:03 -07:00
Yoshihisa Mochihara e31dbd6695 Add ruff format example in README 2024-03-19 19:38:06 +01:00
Yoshihisa Mochihara f8abd91ecb Revert "support ruff mode Argument"
This reverts commit 17a2e52c32.
2024-03-19 19:36:55 +01:00
Yoshihisa Mochihara 17a2e52c32 support ruff mode Argument
Users can now specify the mode of ruff to be 'check' or 'format' using the mode input.
2024-03-13 00:07:19 +01:00
Zach Borboa 38ef108542 Clean up section headers 2024-03-07 05:05:40 -05:00
Raphael Boidol c0661673e2 Update README.md
Change links to point to up to date URLs
2024-02-18 19:30:44 +01:00
Christian Clauss 5619897516 Update README.md 2024-02-18 01:44:15 +01:00
Christian Clauss b22a8e1c0d README.md: Update the Ruff version 2024-02-17 13:33:54 +01:00
Yoni Melki 1c2f7b23b4 Update README.md 2023-06-18 21:25:59 +03:00
brucearctor 9a777ad092 args 2023-04-03 10:23:03 -07:00
brucearctor ed9d6e65a4 cleaned 2023-04-02 20:34:03 -07:00
brucearctor 3d92e63259 Initial commit 2023-03-31 08:38:06 -07:00