-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
_onlyModified is failing #27
Comments
It also returns an error for |
These are unreleased features still, so you need to use the |
I tried using
I mentioned it here: #22 (comment) |
I got the same error as @jouni when using This works to check only modified files. It uses another action to grab only changed files and then vale checks that file. This works until _onlyModified is working.
|
Per errata-ai/vale-action#27 (comment) Signed-off-by: Roger Sheen <[email protected]>
Per errata-ai/vale-action#27 (comment) Signed-off-by: Roger Sheen <[email protected]>
Just raising my hand to support adding onlyAnnotateModifiedLines to this great action. And thanks to @tjperry07 for the workaround! |
Hi, looking forward to using this flag. Any news on a fix? Thanks. |
Getting a new release out is on my to-do list, but I don't have a concrete timeline. |
irt https://github.com/blockstackpbc/devops/issues/527 considering this known Vale issue: errata-ai/vale-action#27
irt https://github.com/blockstackpbc/devops/issues/527 considering this known Vale issue: errata-ai/vale-action#27
@pierrebeitz do you have any thoughts here? My inclination is to move away from using raw Git commands in favor of using GitHub's API ( |
@jdkato at first sight that sounds very reasonable! |
This should be fixed on |
To report back: I just updated our workflow, and it seems to be working nicely. Notably, I changed from [push] to [pull_request], and now the workflow checks all files within a PR, not just the ones within one commit. Here’s our config: name: Vale
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
- name: vale
uses: errata-ai/vale-action@master
with:
styles: |
https://github.com/errata-ai/Microsoft/releases/latest/download/Microsoft.zip
https://github.com/errata-ai/Google/releases/latest/download/Google.zip
https://github.com/errata-ai/write-good/releases/latest/download/write-good.zip
config: https://raw.githubusercontent.com/vaadin/docs/master/.vale.ini
files: __onlyModified
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
@jouni: I think that should be fixed now. |
…sts (#422) See errata-ai/vale-action#27 for more info.
What about |
Yes, I think so -- but testing the action adequately has proven difficult, so YMMV. |
I’m testing it in our docs, and I’m getting inconsistent results. See vaadin/docs#144 Some checks are annotated correctly, but some are missing (for example heading case, we require using Title Case). The result varies between runs: 7 annotations after a couple of clean runs, and the only 4 annotations after making an edit that should add one more error. |
Any advice here? It’s a bit problematic for us at the moment. We get a lot of noise from the existing errors/warnings in our content, and it’s hard to focus on the modified lines. We also sometimes get false positives, and we have Vale as a required check in PRs, so that prevents non-admins from merging. I hope this is a problem in our config/styles (instead bugs in Vale), but I haven’t been able to fix it. |
There seems to be a lot of different topics being discussed here.
I won't be able to help here without specific examples. Running Vale from the command line (locally) should provide an indication of whether the issue is with Vale itself or the action. |
Sorry about that. I don’t want to be noisy, but I’m struggling a bit to understand all the issues together. I’ll try to stick to the issue about annotating the correct lines in a PR.
Perhaps I’ve then misunderstood how the action should work with PRs. I understood that it should always annotate all changes within one PR, not just for the last commit in the PR. My mistake then. But I feel the current behavior is problematic, as it means we can’t rely on Vale as a required check for PRs. It means that if the last commit in a PR branch doesn’t contain any Vale errors, any errors in the previous commits can go unnoticed (when viewing changes from all commits, only one of the files has annotations).
If that’s intended behavior, then I understand it. But what I don’t understand is why Vale didn’t give an error for the changed line there, where the heading is changed from “Required Tools” to “Required Tools”. We require title case, see our check for that: Headings.yml. Maybe that’s some issue in our config, as it didn’t work in another commit (vaadin/docs@85d8aca) either (update: tried locally, and I do get an error for that line) |
The most useful outcome would be for Vale to run against all changes in a PR, since the basis for approval of a PR is the set of all changes in the PR. |
It's not just the last commit; it's every commit individually. It seems like you'd like it to be every commit collectively. In other words, This is possible, but less straightforward since the it only applies to PRs (whereas the the current functionality can apply to pushes too) and the content of a line can change between commits. For now, I think just using |
sorry to chime in late again, but lockdown along with close child cares is just eating up time :) i initially implemented @jouni, have you tried 0d66d6f? that seems to work for us at work and should give feedback on whole PRs and not single commits. does not work for "push" though as outlined by @jdkato. |
@pierrebeitz, thanks for the suggestion (and thanks for that contribution 👍 ). We are using vale-action@master at the moment, with |
Thanks again to @jdkato for being very responsive 🙇 |
Oh, only now I realize that I meant |
I'm using this same configuration, and find that this setup encourages gradually solving existing issues in the files that are being changed. Since you already have some context about the information on that file, normally it's not a big extra effort to review the identified issues (this may be different if you have very big files though). |
I'm testing out the Vale action for onlyModified and I am getting the following failure.
Warning: User-specified path (__onlyModified) is invalid; falling back to 'all'.
You can review my code and test here https://github.com/tjperry07/vale-setup/pull/1/checks?check_run_id=1413681722
action file
The text was updated successfully, but these errors were encountered: