Skip to content

Commit

Permalink
initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Aug 12, 2024
1 parent 2c553e3 commit c0bf0af
Show file tree
Hide file tree
Showing 20 changed files with 4,670 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
labels:
- 'type: dependencies'
- github_actions

- package-ecosystem: npm
directory: /
schedule:
interval: monthly
labels:
- 'type: dependencies'
- 'javascript'
60 changes: 60 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name-template: 'Release v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
categories:
- title: 'Breaking'
label: 'type: breaking'

- title: 'New'
label: 'type: feature'

- title: 'Bug Fixes'
label: 'type: bugfix'

- title: 'Maintenance'
labels:
- 'type: maintenance'
- 'type: performance'

- title: 'Documentation'
label: 'type: documentation'

- title: 'Other changes'

- title: 'Automation and CI changes'
label: 'type: ci'

- title: 'Dependency Updates'
label: 'type: dependencies'
collapse-after: 5

version-resolver:
major:
labels:
- 'type: breaking'

minor:
labels:
- 'type: feature'

patch:
labels:
- 'type: bug'
- 'type: maintenance'
- 'type: performance'
- 'type: documentation'
- 'type: ci'
- 'type: dependencies'
- 'type: security'

default: patch

exclude-labels:
- 'skip-changelog'
42 changes: 42 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CodeQL

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '31 7 * * 3'

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ TypeScript ]

permissions:
actions: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: src

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
53 changes: 53 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish package

on:
release:
types: [ created ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: yarn.lock

- name: Install
run: yarn install

- name: Compile
run: yarn build

- name: Test
run: yarn test

publish-npm:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install
run: yarn install

- name: Compile
run: yarn build

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches: [ main ]

permissions:
contents: read

jobs:
update_release_draft:
name: Update release Draft
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Tests - Node.js
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: yarn.lock

- name: Install
run: yarn install

- name: Compile
run: yarn build

- name: Test
run: yarn test

- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@ dist
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
# yarn2 - https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.github
/coverage
/vite.config.ts
/renovate.json
/tsconfig.*
/test

*.tsbuildinfo
.*
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
lib/
node_modules/
tsconfig.json
12 changes: 12 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
semi: true
overrides:
- files: '**/*.{ts,js}'
options:
trailingComma: 'es5'
tabWidth: 2
semi: true
singleQuote: true
quoteProps: 'as-needed'
bracketSpacing: true
bracketSameLine: true
arrowParens: 'avoid'
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.4.0.cjs
50 changes: 50 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "storypointer",
"version": "1.0.0",
"description": "Small CLI tool to set JIRA Story Points and Priority",
"main": "src/main.ts",
"type": "commonjs",
"bin": "./dist/main.js",
"directories": {
"test": "tests"
},
"scripts": {
"build": "esbuild ./src/main.js --bundle --outdir=dist --platform=node --target=node20.0.0 --packages=bundle",
"format": "prettier --write '**/*.ts'",
"format-check": "prettier --check '**/*.ts'",
"test": "vitest run --coverage",
"update-snapshots": "vitest run --update",
"all": "yarn && yarn run build && yarn run format && yarn test"
},
"packageManager": "[email protected]",
"repository": {
"type": "git",
"url": "git+https://github.com/redhat-plumbers-in-action/storypointer.git"
},
"author": "[email protected]",
"license": "GPL-3.0+",
"bugs": {
"url": "https://github.com/redhat-plumbers-in-action/storypointer/issues"
},
"homepage": "https://github.com/redhat-plumbers-in-action/storypointer#readme",
"dependencies": {
"@inquirer/select": "^2.4.7",
"@total-typescript/ts-reset": "^0.5.1",
"chalk": "^5.3.0",
"commander": "^12.1.0",
"dotenv": "^16.4.5",
"inquirer": "^10.1.8",
"jira.js": "^4.0.1",
"ora": "^8.0.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^22.1.0",
"@vitest/coverage-v8": "^2.0.5",
"esbuild": "^0.23.0",
"prettier": "^3.3.3",
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
}
}
Loading

0 comments on commit c0bf0af

Please sign in to comment.