Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

pytorch/add-annotations-github-action

Repository files navigation

add-annotations-github-action

A GitHub Action to add checks to pull requests by running lines of output from a linter (such as Flake8 or clang-tidy) through a regex.

Example

on: pull_request
jobs:
  fake8:
    runs-on: ubuntu-latest
    steps:
      - run: |
          touch fake8.txt
          echo 'README.md:1:3: R100 make a better title' >> fake8.txt
          echo 'README.md:2:1: R200 give a better description' >> fake8.txt
      - uses: pytorch/add-annotations-github-action@master
        with:
          check_name: fake8
          linter_output_path: fake8.txt
          commit_sha: ${{ github.event.pull_request.head.sha }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Usage

See action.yml for most of the usage info. Also note that (as shown in the example above) env.GITHUB_TOKEN must be set, or this action will simply fail with the message Error: Bad credentials.

About

A GitHub action to run clang-tidy and annotate failures

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published