Skip to content
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

option(s) to submit fixes #68

Open
yarikoptic opened this issue Aug 15, 2023 · 5 comments
Open

option(s) to submit fixes #68

yarikoptic opened this issue Aug 15, 2023 · 5 comments

Comments

@yarikoptic
Copy link

For a PR it would be a commit to the same branch. (we do similar for adding changelog entries to PRs upon a specific label being present: https://github.com/datalad/release-action/blob/master/add-changelog-snippet/action.yml#L23 )

For a run within a non-PR branch - would be a new PR against that branch.

@ferdnyc
Copy link

ferdnyc commented Jun 26, 2024

@yarikoptic

Hmm. Certainly doable from the codespell end, since it has a -w mode that writes back changes, and when run that way it reports:

FIXED: relative/path/to/first/file.xtn
FIXED: relative/path/to/other/code.xtn

and etc.

So it'd just be a matter of git add <foo> for each file listed, and then commit the changes.

...Arguably that functionality may be out of scope for this action, though, because it's "codespell with annotations" — and there's no real point in making annotations for spelling errors that are automatically fixed. It's kind of taking things in a different direction, functionality-wise.

A separate action to run codespell and auto-apply the changes, instead of making annotations, might actually make more sense, despite the seeming redundancy of two different actions to run codespell. (In truth there are multiple codespell actions already, so adding an "auto-apply codespell fixes" action would just be expanding the existing set of choices.)

@yarikoptic
Copy link
Author

IMHO there is no need for a separate action and indeed could be just a matter of adding an option and committing/pushing. FWIW, here is a "live" fresh request for such a feature

@ferdnyc
Copy link

ferdnyc commented Aug 24, 2024

@yarikoptic ¯\_(ツ)_/¯ I'm not a dev/committer here, just another user... but since I'm also the only one who's responded here in over a year, I think it's safe to assume that "quickly" is probably way off the table.

@larsoner
Copy link
Member

Would it be enough to allow actions-codespell to have a "write" mode and then you use autofix.ci or something similar to push the fix to the given PR?

I also wonder if it's easier instead to use pre-commit.ci to do it instead for most people

@yarikoptic
Copy link
Author

but pushing from CI is easy for a PR, isn't it?

people who use pre-commit.ci typically do not even wan to use actions-codespell since they have codespell in their pre-commit config.

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

No branches or pull requests

3 participants