Skip to content

Getting a GitHubApiError when running this action #36

Open
@emily-hawkins

Description

running:

      - name: Annotate
        uses: yuzutech/[email protected]
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          title: 'SQLFluff Lint'
          input: './annotations.json'

the contents of the json file look like this:

[{"file": "dbt/models/admin/fact_dbt_runs.sql", "line": 7, "start_column": 1, "title": "SQLFluff", "message": "L010: Inconsistent capitalisation of keywords.", "annotation_level": "failure"}]

and this is what is returned in github actions:

Run yuzutech/[email protected]
  with:
    repo-token: ***
    ignore-unauthorized-error: true
    title: SQLFluff Lint
    input: ./annotations.json
    ignore-missing-file: true
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.10/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.10/x64/lib
Creating check {owner: 'DrizlyInc', repo: 'data-workflows', name: SQLFluff Lint}
Found 1 failure(s), 0 warning(s) and 0 notice(s)
Updating check {owner: 'DrizlyInc', repo: 'data-workflows', check_run_id: 3069168367}
Error: GitHubApiError: Unable to update check {owner: 'DrizlyInc', repo: 'data-workflows', check_run_id: 3069168367} - cause: HttpError: Validation Failed: {"resource":"CheckRun","code":"invalid","field":"annotations"}

Any insight on what might be the cause of this? I have other actions that are able to annotate, though they are built into the action itself so i dont have much insight into what they might be doing differently.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions