# @netsells/reg-suit-basic-git-hash-plugin

> This module is a plugin for reg-suit that provides basic functionality to set the Head and Base sha states for your reg-suit tests.

Latest version **0.2.1** (published 2020-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @netsells/reg-suit-basic-git-hash-plugin
pnpm add @netsells/reg-suit-basic-git-hash-plugin
yarn add @netsells/reg-suit-basic-git-hash-plugin
bun add @netsells/reg-suit-basic-git-hash-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2020-08-21 |
| First published | 2020-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Sam Turrell |
| Maintainers | jakub.gawron, martin91s, rebeccaanderton, sam.boylett, samturrell, spamoom |

## Links

- npm: https://www.npmjs.com/package/@netsells/reg-suit-basic-git-hash-plugin
- Repository: https://github.com/netsells/reg-suit-basic-git-hash-plugin
- Issues: https://github.com/netsells/reg-suit-basic-git-hash-plugin/issues
- npm.io page: https://npm.io/package/@netsells/reg-suit-basic-git-hash-plugin

## Dependencies (1)

- [reg-keygen-git-hash-plugin](https://npm.io/package/reg-keygen-git-hash-plugin.md) ^0.8.5

## Recent versions

- 0.2.1 (latest) — 2020-08-21
- 0.2.0 — 2020-08-21
- 0.1.0 — 2020-08-21

## README

# Reg Suit Basic Git Hash Plugin

This module is a plugin for reg-suit that provides basic functionality to set the Head and Base sha states for your reg-suit tests.

## Installation

```sh
$ yarn add -D @netsells/reg-suit-basic-git-hash-plugin
```

Add the plugin to your `regconfig.json`:

```
{
    "plugins": {
        "@netsells/reg-suit-basic-git-hash-plugin": {}
    }
}
```

## Usage

This plugin runs off of two env variables:

- `BASE_SHA` - the SHA of the commit that the current changes should be compared with
- `HEAD_SHA` - the SHA of the current commit to build your regression suit from

How you populate these variables is up to you. For github actions you would pass them as an `env` variable in your `reg-suit` step, e.g.:

```yml
-   name: Run Reg-suit
    env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        BASE_SHA: ${{ github.event.pull_request.base.sha }}
        HEAD_SHA: ${{ github.event.pull_request.head.sha }}
    run: |
        yarn run reg-suit run
```

The above would populate the required env variables with the value from the `github` context and the `pull_request` even object.

If either of the SHA values are not provided they will fall back to the existing `reg-keygen-git-hash-plugin` plugin to try and infer these values from your current setup.

---
_Source: https://npm.io/package/@netsells/reg-suit-basic-git-hash-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
