Skip to content

Commit

Permalink
tools(//.github): fix reading from json
Browse files Browse the repository at this point in the history
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed Nov 10, 2020
1 parent d71658b commit e72280a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/scripts/run_cpp_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

event_file_path = "/GITHUB_EVENT.json"
with open(event_file_path, 'r') as f:
j = f.read()
event = json.load(j)
event = json.load(f)

repo_name = event["repository"]["full_name"]
pr_number = event["number"]
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/run_py_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

event_file_path = "/GITHUB_EVENT.json"
with open(event_file_path, 'r') as f:
j = f.read()
event = json.load(j)
event = json.load(f)

repo_name = event["repository"]["full_name"]
pr_number = event["number"]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
- name: Run image
run: |
docker run -it -d --name cpplinter -e GITHUB_TOKEN=$GITHUB_TOKEN -v $GITHUB_WORKSPACE:/workspace -v $GITHUB_EVENT_PATH:/GITHUB_EVENT.json -w /workspace docker.pkg.github.com/nvidia/trtorch/docgen:latest
docker exec cpplinter bash -c "ls /workspace"
docker exec cpplinter bash -c "cp /workspace/docker/WORKSPACE.docker /workspace/WORKSPACE"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down

0 comments on commit e72280a

Please sign in to comment.