Skip to content

brandnewbox/standard-ruby-action

 
 

Repository files navigation

image Standard Ruby Action

A GitHub Action to run StandardRB against your code and create annotations in the GitHub UI.

📄 Introduction

GitHub Actions are an amazing new tool that can dramatically improve productivity while using the GitHub platform. While it is not hard to write a custom GitHub action to run StandardRB on your codebase, this action takes that functionality one step further using the checks API. After the StandardRB Linter Action runs StandardRB against your code, it will create annotations that you can easily view, matched up with the offending code.

Since GitHub actions and the checks API are continually changing, it is possible that there will be breaking API changes that affect this action. If so, please open an issue and I will look into it as soon as I can.

💡 Usage

Add the following to your GitHub action workflow to use StandardRB Linter Action:

- name: StandardRB Linter
  uses: standardrb/[email protected]
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    USE_BUNDLE_VERSION: true # anything else (or omitting) will run the current version instead of your projects version

📦 Example Workflow

Here is an example workflow file incorporating StandardRB Linter Action:

name: StandardRB

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: StandardRB Linter
      uses: standardrb/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

⚠️ Gotchas

Due to the GitHub Check Runs API, we can only return 50 annotations per run. See here for more info.

📸 Screenshots

StandardRB Action Checks Overview StandardRB Action File Annotation

🔖 Changelog

View our Changelog

🆘 Contributing

Contributing Guide

🚨 Code of Conduct

This project follows Test Double's code of conduct for all community interactions, including (but not limited to) one-on-one communications, public posts/comments, code reviews, pull requests, and GitHub issues. If violations occur, Test Double will take any action they deem appropriate for the infraction, up to and including blocking a user from the organization's repositories.

✨ Contributors

Thanks goes to these wonderful people (emoji key):

Andrew Mason
Andrew Mason

🚇 📖 💻

This project follows the all-contributors specification. Contributions of any kind welcome!