yuzutech / annotations-action

GitHub action to create annotations from a JSON file
MIT License
31 stars 15 forks source link

Error: Not Found #42

Closed tsigouris007 closed 2 years ago

tsigouris007 commented 2 years ago

Continuously stumbling on a generic error:

Run yuzutech/annotations-action@v0.1.0
  with:
    repo-token: ***
    input: ./annotations.json
Error: Not Found

The annotations.json file is there and statically defined to test this as:

    {
      "file": "temp3.jsx",
      "start_line": 5,
      "end_line": 10,
      "title": "title for my annotation",
      "message": "my message",
      "annotation_level": "failure"
    }
]  

The temp3.jsx file is also there. But Error: Not Found keeps on giving. My action is:

name: Annotations
on:
  pull_request:
    paths:
      - '*.js'
      - '*.jsx'
jobs:
  Annotations:
    runs-on: self-hosted
    steps:
      - uses: actions/setup-node@v1
      - uses: actions/checkout@v2
      - name: Annotate
        if: github.event_name == 'pull_request'
        uses: yuzutech/annotations-action@v0.1.0
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          input: ./annotations.json

I also tried with input: annotations.json and input: $(pwd)/annotations.json but same error. Am I doing something wrong?

tsigouris007 commented 2 years ago

Got it. I was using v1 instead of v3.

ggrossetie commented 2 years ago

We should update the example section on the README. I guess that's why you were using v0.1.0 instead of the latest version?

tsigouris007 commented 2 years ago

Yeah I copied without noticing the version and I hit my head for about half an hour 😆

Brianzchen commented 2 years ago

I just got this error too, if it wasn't because of this issue I wouldn't have had a clue how to solve it. Maybe readme needs updating

ggrossetie commented 2 years ago

Feel free to open a pull request to update the README, I will gladly merge it.