Skip to content

Approve JavaScript Formatting Changes

Approve PRs that only contain formatting changes to JavaScript or TypeScript files.

Approve JavaScript formatting changes

Configuration Description

Conditions (all must be true):

  • All of the files end in .js or .ts
  • All changes are non-functional

Automation Actions:

  • Approve the PR
  • Apply a code-formatting label.
  • Post a comment that explains the automation.

Approve JavaScript Formatting Change

# -*- mode: yaml -*-

  version: 1.0

      - {{ files | extensions | match(list=['js', 'ts']) | every }}
      - {{ source.diff.files | isFormattingChange }}
      - action: approve@v1
      - action: add-label@v1
          label: code-formatting
      - action: add-comment@v1
          comment: |
            This PR only contains formatting changes and has been approved.

Additional Resources

gitStream is a workflow automation tool that enables you to use YAML configuration files to optimize your code review process. Add context to PRs, find code experts for reviews, and automate the merge process to maximize developer productivity.

Learn More about how gitStream Works.

Related Automations:

More Automations can be found on the Automation Library and Integrations pages.