npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

natali

v2.0.0

Published

The PR Review Bot that doesn't make friends.

Downloads

18

Readme

Natali

The no-fuss, configurable, and honest PR review bot.

Natali can be used in your CI environment to enforce certain rules with how Pull Requests are submitted.

Think of Natali as an objective first set of eyes over a Pull Request.

Usage

To use Natali, install the package in your projects package.json:

npm i -D natali

Add a natali.yaml configuration file at the root of your project (this can be configured, see ###).

Copy paste in this bare-bones configuration file:

rules:
  commitLimit:
    config:
      max: 1

This configuration file, will tell Natali, that you expect natali to run the rule commitLimit, which will limit the number of commits that can be in any one pull request. By default, this will compare the currently checked out branch with the master branch in the same repository to see by how many commits it differs. See commitLimit in the Rules section for more information.

Run the natali cli tool in the root of your project (this can be done locally or in a CI environment).

npx natali

Rules

commitLimit

Options

Limit the number of commits that can be in any one pull request.

max : number (default = 1)

The maximum number of commits that the pull request can differ from branch.

branch : string (default = 'master')

The name of the branch to compare the pull request with when figuring out how many commits difference there are.

Template Values

maxCommits : number

The maximum number of commits configured.

numberOfCommits : number

The number of commits that were found to be a part of the pull request.

commits : Array<string>

An array of commit messages in the format <hash> - <message>.

Comment Templates

Natali can generate comments that will be posted against the pull request on bitbucket cloud. All rules support providing a template option in the configuration that points to a handlebars template relative to the location of the config.yaml file. This template will be hydrated and the result posted to the pull request as a comment.

A sample template file configuration for commitLimit might look like:

# natali.yaml

rules:
  commitLimit:
    template: ./templates/commitLimit.md
    config:
      max: 1
      branch: develop
<!-- templates/commitLimit.md ->

### Only {{maxCommits}} commit(s) per pull request

There should be a maximum of {{maxCommits}} commit(s) in your pull request
but there were {{numberOfCommits}}.

**Commits**

{{#commits}}
{{index}}. {{commit}}
{{/commits}}

CLI

# natali <path-to-config-yaml>, default path is "./natali.yaml" if none
# provided.
natali natali/config.yaml