Git Product home page Git Product logo

action-bundler-audit's Introduction

GitHub Action: Run bundler-audit with reviewdog ๐Ÿถ

Test reviewdog depup release GitHub release (latest SemVer) action-bumpr supported

Example comment made by the action, with github-pr-review

This action runs bundler-audit with reviewdog on pull requests to improve code review experience.

Input

github_token

GITHUB_TOKEN. Default is ${{ github.token }}.

bundler_audit_version

Optional. Set bundler-audit version. Possible values:

  • empty or omit: install latest version
  • gemfile: install version from Gemfile (Gemfile.lock should be presented, otherwise it will fallback to latest bundler version)
  • version (e.g. 1.9.0): install said version

bundler_audit_flags

Optional. bundler-audit flags. (bundler-audit check --format json <bundler_audit_flags>).

tool_name

Optional. Tool name to use for reviewdog reporter. Useful when running multiple actions with different config.

level

Optional. Report level for reviewdog [info, warning, error]. It's same as -level flag of reviewdog.

reporter

Optional. Reporter of reviewdog command [github-pr-check, github-check, github-pr-review]. The default is github-pr-check.

filter_mode

Optional. Filtering mode for the reviewdog command [added, diff_context, file, nofilter]. Default is added.

fail_on_error

Optional. Exit code for reviewdog when errors are found [true, false]. Default is false.

reviewdog_flags

Optional. Additional reviewdog flags.

workdir

Optional. The directory from which to look for and run bundler-audit. Default ..

Example usage

name: reviewdog
on: [pull_request]
jobs:
  bundler_audit:
    name: runner / bundler_audit
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.0.0
      - name: bundler_audit
        uses: tomferreira/action-bundler-audit@v1
        with:
          bundler_audit_version: gemfile
          # Change reviewdog reporter if you need [github-check,github-pr-review,github-pr-check].
          reporter: github-pr-review

action-bundler-audit's People

Contributors

tomferreira avatar

Stargazers

 avatar  avatar

Watchers

 avatar

action-bundler-audit's Issues

You don't have write permissions on ubuntu-latest workflow

When using this action, it will fail with the following error:

Run tomferreira/action-bundler-audit@v1
Run reviewdog/action-setup@v1
Run $GITHUB_ACTION_PATH/install.sh
๐Ÿถ Installing reviewdog ... https://github.com/reviewdog/reviewdog
Run echo "::group::๐Ÿ“– reviewdog -h"
๐Ÿ“– reviewdog -h
Run $GITHUB_ACTION_PATH/script.sh
 Installing bundler-audit with extensions ... https://github.com/rubysec/bundler-audit
  ERROR:  While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /var/lib/gems/3.0.0 directory.
  Error: Process completed with exit code 1.

Looks like this line https://github.com/tomferreira/action-bundler-audit/blob/main/script.sh#L33 is can not be done.

The only thing I can see in comparison to RuboCop action, is this different line https://github.com/reviewdog/action-rubocop/blob/master/script.sh#L8?!

My setup for this action (shortened to important lines):

...
jobs:
  linter:
    name: Linter
    runs-on: ubuntu-latest

...
    steps:
...
      - name: Bundler Audit with reviewdog
        uses: tomferreira/action-bundler-audit@v1
        with:
          reporter: github-pr-review
          filter_mode: diff_context
          tool_name: Bundler Audit
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.