payload-validation #33
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "*****pre-commit hook******"
|
||||||
|
|
||||||
# Avoid commits to the master branch
|
# Avoid commits to the master branch
|
||||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||||
REGEX="^(master|main|staging|development)$"
|
REGEX="^(master|main|staging|development)$"
|
||||||
|
37
.gitea/workflows/staging-pull-request.yaml
Normal file
37
.gitea/workflows/staging-pull-request.yaml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Open PR on Staging
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, edited, synchronize]
|
||||||
|
branches:
|
||||||
|
- staging
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
audit_and_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Audit
|
||||||
|
run: npm audit --omit=dev
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: License check
|
||||||
|
run: npm run license-checker
|
||||||
|
|
||||||
|
- name: Lint check
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Formatter check
|
||||||
|
run: npm run formatter:check
|
||||||
|
|
||||||
|
- name: Create Build
|
||||||
|
run: npm run build
|
@ -16,7 +16,8 @@
|
|||||||
"lint:fix": "eslint . --fix --ext ts --report-unused-disable-directives --max-warnings 0",
|
"lint:fix": "eslint . --fix --ext ts --report-unused-disable-directives --max-warnings 0",
|
||||||
"lint:staged": "eslint --fix --ext ts --report-unused-disable-directives --max-warnings 0",
|
"lint:staged": "eslint --fix --ext ts --report-unused-disable-directives --max-warnings 0",
|
||||||
"lint-staged": "lint-staged",
|
"lint-staged": "lint-staged",
|
||||||
"start:db": "docker compose -f mongo-docker-compose.yml up -d"
|
"start:db": "docker compose -f mongo-docker-compose.yml up -d",
|
||||||
|
"preinstall": "git config core.hooksPath .git-hooks"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ObjectId } from 'mongodb'
|
import { ObjectId } from 'mongodb'
|
||||||
import { SakeDesignation, SakeStarter, Vintage } from '../types'
|
import { SakeDesignation, SakeStarter, VintageOptions } from '../types'
|
||||||
import { Alpha2Code } from 'i18n-iso-countries'
|
import { Alpha2Code } from 'i18n-iso-countries'
|
||||||
import { CurrencyCode } from 'currency-codes-ts/dist/types'
|
import { CurrencyCode } from 'currency-codes-ts/dist/types'
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ export class Sake {
|
|||||||
public yeastStrain: number,
|
public yeastStrain: number,
|
||||||
public alcohol: number, // alcohol percentage
|
public alcohol: number, // alcohol percentage
|
||||||
public standardDrinks100ml: number, // number representing an amount of standard drinks per bottle per 100ml
|
public standardDrinks100ml: number, // number representing an amount of standard drinks per bottle per 100ml
|
||||||
public vintage: Vintage, // year, nv (non-vintage) or mv (multi-vintage)
|
public vintage: number | VintageOptions, // year, nv (non-vintage) or mv (multi-vintage)
|
||||||
public RRPamount: number, // 20
|
public RRPamount: number, // 20
|
||||||
public RRPcurrency: CurrencyCode, // USD
|
public RRPcurrency: CurrencyCode, // USD
|
||||||
public description: string, // detailed description of the product
|
public description: string, // detailed description of the product
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ObjectId } from 'mongodb'
|
import { ObjectId } from 'mongodb'
|
||||||
import { SpiritType, SpiritVariant, Ingredient, Vintage } from '../types'
|
import { SpiritType, SpiritVariant, Ingredient, VintageOptions } from '../types'
|
||||||
import { Alpha2Code } from 'i18n-iso-countries'
|
import { Alpha2Code } from 'i18n-iso-countries'
|
||||||
import { CurrencyCode } from 'currency-codes-ts/dist/types'
|
import { CurrencyCode } from 'currency-codes-ts/dist/types'
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ export class Spirit {
|
|||||||
public ingredients: Ingredient[], // an array of ingredients(flavouring)
|
public ingredients: Ingredient[], // an array of ingredients(flavouring)
|
||||||
public alcohol: number, // alcohol percentage
|
public alcohol: number, // alcohol percentage
|
||||||
public standardDrinks100ml: number, // number representing an amount of standard drinks per bottle
|
public standardDrinks100ml: number, // number representing an amount of standard drinks per bottle
|
||||||
public vintage: Vintage, // year, nv (non-vintage) or mv (multi-vintage)
|
public vintage: number | VintageOptions, // year, nv (non-vintage) or mv (multi-vintage)
|
||||||
public RRPamount: number, // 20
|
public RRPamount: number, // 20
|
||||||
public RRPcurrency: CurrencyCode, // USD
|
public RRPcurrency: CurrencyCode, // USD
|
||||||
public description: string, // detailed description of the product
|
public description: string, // detailed description of the product
|
||||||
|
Loading…
x
Reference in New Issue
Block a user