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

Can't really make it work with ESLint #17

Open
valerioleo opened this issue Sep 2, 2021 · 2 comments
Open

Can't really make it work with ESLint #17

valerioleo opened this issue Sep 2, 2021 · 2 comments

Comments

@valerioleo
Copy link

valerioleo commented Sep 2, 2021

First of all, thanks for the massive efforts around reviewdog. It's in plain sight the amount of work you poured in for everybody to enjoy.

I have been trying to set reviewdog in my CI on Github Actions and I only managed to get reports in the PR like this:
image

But never to get code comments/suggestions.

This is my current action file:

name: reviewdog
on: [pull_request]
jobs:
  eslint:
    runs-on: ubuntu-latest

    name: runner / eslint

    steps:
      - uses: actions/checkout@v2
        with:
          submodules: recursive
          token: ${{ secrets.CI_ACCESS_TOKEN }}

      - uses: reviewdog/action-setup@v1
        with:
          reviewdog_version: latest

      - uses: reviewdog/action-eslint@v1
        env:
          REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          reporter: github-pr-review
          level: error
          filter_mode: added
      
      - uses: reviewdog/action-suggester@v1
        with:
          tool_name: eslint

Is there anything I'm missing?

In my understanding the reviewdog/action-eslint@v1 action will output the result and the reviewdog/action-suggester@v1 will print it as comments/suggestions. But really can't manage to make this work 🤷🏻‍♂️

Thank you so much for any help.

@airtonix
Copy link

It's pretty unclear how we're to use reviewdog effectively.

from my mere mortal peasant point of view, it looks like :

 - run: `eslint --fix` 
 - uses: reviewdog/action-suggester@v1
        with:
          tool_name: eslint

I say this because it says in the README.md :

...which suggests any code changes based on diff ...

@shogo82148
Copy link
Contributor

image

The image look like Annotation, not a review comment.

reviewdog uses Annotation if the GitHub token has no permission for writing you pull request.
(e.g. pull request from forked repository)
https://github.com/reviewdog/reviewdog/blob/f297ab3e3857d7b5639b65824b9c6d646b3c120a/cienv/github_actions.go#L110-L120

ref. reviewdog/reviewdog#1210

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