Skip to content

Action failed with status code 403 #1

@urish

Description

@urish

Hi,

Thanks for creating this action, it's super useful!

I've set in up on this repo, but for some reason it fails with status code 403:

/usr/bin/docker run --name e5c3501ae509f2133444782556f9391002d8b_dcc1b8 --label 1e5c35 --workdir /github/workspace --rm -e INPUT_TOKEN -e INPUT_JSON_SCHEMA -e INPUT_JSON_PATH_PATTERN -e INPUT_SEND_COMMENT -e INPUT_CLEAR_COMMENTS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/pull-request-community/pull-request-community":"/github/workspace" 1e5c35:01ae509f2133444782556f9391002d8b
validating people/yonatan-kra.json
clearing comments
Traceback (most recent call last):
  File "/validate.py", line 38, in <module>
    delete_comments(repo, pull_number)
  File "/utils.py", line 79, in delete_comments
    user = request('get', AUTHENTICATED_USER)
  File "/utils.py", line 49, in request
    raise Exception('Status code {}: {}'.format(response.status_code, url))
Exception: Status code 403: https://api.github.com/user

This is the configuration file I used:

name: Validate JSONs on PR
on: [pull_request]
jobs:
  validate_schemas:
    name: Validate JSON Schemas
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Validate People JSON schema
        uses: snapcart/json-schema-validator@v1.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          json_schema: ./schemas/people-schema.json
          json_path_pattern: ^people/.+\.json$
          send_comment: true
          clear_comments: true

Any pointers on what could be wrong / how to debug this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions