Skip to content

Commit

Permalink
Merge pull request #2 from viqueen/issue/LABSET-121-release-labset-org
Browse files Browse the repository at this point in the history
LABSET-121 : release labset org
  • Loading branch information
viqueen authored May 26, 2023
2 parents 40e969c + e53f20d commit ffa2a5e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: typescript-package Build and Test
name: eslint-plugin-license-notice Build and Test
on:
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: typescript-package Publish
name: eslint-plugin-license-notice Publish

on:
release:
Expand All @@ -17,6 +17,6 @@ jobs:
- run: yarn build
- run: yarn lint
- run: yarn format:check
- run: npm publish
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
25 changes: 25 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! /usr/bin/env bash

function jiraIssueNumber() {
branch_name=$(git rev-parse --abbrev-ref HEAD);
prefix="noissue";
if [[ ${branch_name} =~ ^(.+/)?([A-Za-z]+-[0-9]+)(-(.*))?$ ]]; then
prefix=${BASH_REMATCH[2]};
fi;
echo "${prefix}";
}

branch_name=$(git branch | grep '*' | sed 's/* //')

# skip hook when rebasing
if [ "${branch_name}" != '(no branch)' ]
then
commit_file="$1"
message=$(cat "$commit_file")
issue_ticket_number=$(jiraIssueNumber);

# skip hook if issue number already in commit message
if [[ ! "${message}" =~ ${issue_ticket_number} ]]; then
echo "${issue_ticket_number}: ${message}" > "${commit_file}"
fi
fi
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-license-notice",
"version": "1.0.0",
"name": "@labset/eslint-plugin-license-notice",
"version": "1.1.0",
"description": "eslint plugin to ensure license notice/header is included across your files",
"repository": "[email protected]:viqueen/eslint-plugin-license-notice.git",
"author": "Hasnae R. <>",
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -765,11 +765,16 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==

"@types/node@*", "@types/node@^20.2.3":
"@types/node@*":
version "20.2.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.3.tgz#b31eb300610c3835ac008d690de6f87e28f9b878"
integrity sha512-pg9d0yC4rVNWQzX8U7xb4olIOFuuVL9za3bzMT2pu2SU0SNEi66i2qrvhE2qt0HvkhuCaWJu7pLNOt/Pj8BIrw==

"@types/node@^20.2.3":
version "20.2.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.4.tgz#e6c3345f7ed9c6df41fdc288a94e2633167bc15d"
integrity sha512-ni5f8Xlf4PwnT/Z3f0HURc3ZSw8UyrqMqmM3L5ysa7VjHu8c3FOmIo1nKCcLrV/OAmtf3N4kFna/aJqxsfEtnA==

"@types/prettier@^2.1.5":
version "2.7.2"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0"
Expand Down

0 comments on commit ffa2a5e

Please sign in to comment.