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
fix: Calculate check conclusion from annotations #1170
fix: Calculate check conclusion from annotations #1170
Conversation
206164f
to
14435d7
Compare
Looking forward to this :-) |
@carmanchris31 is there a reason why it's still a draft? |
I wanted to cover the new code with tests to make sure it works as intended. I haven’t gotten to it yet but will do so when I can (I’ll happily accept help to get this done sooner). |
Looking forward to this as well! To be honest I thought |
If someone guides me a bit on how to approach the tests, I might be able to do them (0 experience with go). I'm also waiting for this to land so it's in our best interest. 😁 |
Finally found some time to add tests for the updated conclusion method. I just want to double check a couple things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really looking forward to seeing this merged. This is a much needed feature indeed for all of us using https://github.com/reviewdog/action-eslint.
The current behavior of our GitHub Actions that use action-eslint
is as follows:
- As I have tested and can be seen in the existing source code, the value of the
level
param seems to translate to the behavior we want as a conclusion of theaction-eslint
check when there are>0
annotations.- So, if we specify
error
(or don't specify a value forlevel
, since this is the default behavior), then as soon as there is one warning (or notice), the GHA conclusion will be anfailure
- On the other hand, if we specify
warning
the GHA won't fail even if there are 200 errors
- So, if we specify
This behavior of the level
param struck me as a weird one. But let's accept it as valid.
Having said that, what makes sense would be to have the result of the action be dependent on the type of annotations that are present in the linting output, in order to be able to actually only fail if there are errors (while being able to report warnings without failing when there are no errors).
This desired behavior is what this PR solves, and it looks good to me.
Thank you @carmanchris31 !
Looking forward to seeing this merged and being able to use a new version of action-eslint
with this expected behavior soon
P.S. Regarding:
I don't have a strong opinion. I think I also lean towards counting them as "neutral" |
@mgrachev Could you please take a look at this? |
ed9f295
to
a923587
Compare
Addressed the merge conflict |
Looking forward to this; after it is merged, I can fix jordemort/action-pyright#31 |
Any update on this? |
It's been a good while with no activity. What can we do to move this forward? |
@haya14busa, any chance we can get this approved? |
it'd be a great christmas present. I have a couple of long-running PRs waiting on this |
github actions don't support a neutral status do they? |
Probably not, but this is for the result of a check run which does. |
has this stalled? |
@danieleades yes unfortunately... we just need the right person to approve and merge... |
@haya14busa Can you help with this? |
Trying again... @haya14busa can you please merge this for us? This is a substantial quality of life improvement that has been ready for 8 months now. 🙏 |
Perhaps @i-sevostyanov can help? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi, @carmanchris31! We merged your PR to reviewdog! 🐶 We just invited you to join the @reviewdog organization on GitHub. Thanks again! |
Since reviewdog#1170 we can dynamically calculate the check conclusion from annotations if a level config isn't provided. However, reviewdog defaulted level to error, which prevented the dynamic calculation from ever running.
Followup required: #1426 |
#1170 broke reverse compatibility
This attempts to address reviewdog/action-eslint#62 by calculating the conclusion of a check run based on the level of the annotations.
That is to say:
For reverse compatibility, the config Level takes precedence when provided.