-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup project, add initial set of workflows
- Loading branch information
Showing
20 changed files
with
2,017 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# https://github.com/release-drafter/release-drafter | ||
autolabeler: # cspell:ignore autolabeler | ||
- label: bug | ||
branch: [/^(bug|bugfix|fix|hotfix)\/.*/] | ||
- label: changelog:skip | ||
branch: [/^(dependabot)\/.*/, /^pre-commit-ci-update-config/, /^renovate\/.*lockfile/] | ||
- label: dependencies | ||
branch: [/^(depend|dependabot|renovate)\/.*/] | ||
- label: documentation | ||
branch: [/^(docs)\/.*/] | ||
- label: feature | ||
branch: [/^(enhancement|feat|feature)\/.*/] | ||
- label: github_actions | ||
files: | ||
- .github/workflows/*.yml | ||
- label: maintenance | ||
branch: [/^(chore|maint|maintain|maintenance)\/.*/] | ||
- label: changelog:patch | ||
branch: [/^(bug|bugfix|fix|hotfix)\/.*/] | ||
- label: release | ||
branch: [/^(release)\/.*/] | ||
categories: | ||
- title: 🚀 Features | ||
labels: | ||
- feature | ||
- enhancement | ||
- title: 🐛 Bug Fixes | ||
labels: | ||
- bug | ||
- title: 🧶 Dependencies | ||
labels: | ||
- dependencies | ||
- title: 📖 Doc Updates | ||
labels: | ||
- documentation | ||
- title: 🧰 Maintenance | ||
label: maintenance | ||
category-template: >- | ||
### $TITLE | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
commitish: master # cspell:ignore commitish | ||
exclude-contributors: | ||
- dependabot | ||
exclude-labels: | ||
- changelog:skip | ||
- release | ||
name-template: v$RESOLVED_VERSION | ||
sort-direction: ascending | ||
tag-template: v$RESOLVED_VERSION | ||
template: | | ||
## What Changed | ||
$CHANGES | ||
version-resolver: | ||
major: | ||
labels: | ||
- changelog:major | ||
minor: | ||
labels: | ||
- changelog:minor | ||
patch: | ||
labels: | ||
- changelog:patch | ||
default: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"github>finleyfamily/renovate" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: PR Target | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
|
||
jobs: | ||
assign-author-to-pr: | ||
uses: ./workflows/.github/workflows/pr.assign-author.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Push | ||
|
||
on: | ||
pull_request: # any pull request | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
NODE_VERSION: '20' | ||
|
||
jobs: | ||
spellcheck: | ||
uses: ./.github/workflows/spellcheck.yml | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release-drafter: | ||
permissions: | ||
contents: write | ||
uses: ./workflows/.github/workflows/release-drafter.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Assign Author To PR | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
assign-author-to-pr: | ||
name: Assign Author to PR | ||
if: ${{ !endswith(github.actor, '[bot]') }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: technote-space/assign-author@v1 # cspell:ignore technote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
release-drafter: | ||
name: Release Drafter | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v6.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Spellcheck | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
node-version: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
spellcheck: | ||
name: Spellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- run: make setup-npm | ||
- run: make spellcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
default: true | ||
MD013: false # line-length | ||
MD024: false # no-duplicate-heading/no-duplicate-header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
default_language_version: | ||
node: system | ||
|
||
exclude: | | ||
(?x)^( | ||
(.*/)?package-lock\.json| | ||
(.*/)?poetry\.lock | ||
)$ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: file-contents-sorter | ||
args: [--unique] | ||
files: | | ||
(?x)^( | ||
\.dockerignore| | ||
\.gitignore | ||
)$ | ||
- id: pretty-format-json | ||
args: [--autofix, --indent, '4'] | ||
exclude: | | ||
(?x)^( | ||
(.*)?(cdk|package|tsconfig|tslint)\.json | ||
)$ | ||
- id: pretty-format-json | ||
args: [--autofix, --indent, '2'] | ||
files: | | ||
(?x)^( | ||
(.*)?(cdk|package|tsconfig|tslint)\.json | ||
)$ | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- repo: https://github.com/pappasam/toml-sort | ||
rev: v0.23.1 | ||
hooks: | ||
- id: toml-sort-fix | ||
- repo: https://github.com/ITProKyle/pre-commit-hook-yamlfmt | ||
rev: v0.3.0 | ||
hooks: | ||
- id: yamlfmt | ||
args: [--mapping, '2', --offset, '2', --sequence, '4'] | ||
- repo: https://github.com/executablebooks/mdformat | ||
rev: 0.7.17 | ||
hooks: | ||
- id: mdformat | ||
additional_dependencies: | ||
- mdformat-frontmatter | ||
- mdformat-gfm | ||
- mdformat-toc | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.41.0 | ||
hooks: | ||
- id: markdownlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"allowCompoundWords": true, | ||
"import": [ | ||
"@itprokyle/cspell-dict/cspell-ext.json" | ||
], | ||
"maxNumberOfProblems": 100, | ||
"version": "0.2", | ||
"words": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"recommendations": [ | ||
"DavidAnson.vscode-markdownlint", | ||
"charliermarsh.ruff", | ||
"editorconfig.editorconfig", | ||
"lextudio.restructuredtext", | ||
"ms-python.black-formatter", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"redhat.vscode-yaml", | ||
"streetsidesoftware.code-spell-checker", | ||
"tamasfe.even-better-toml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"[python]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.ruff": "explicit", | ||
"source.organizeImports": "always" | ||
}, | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.detectIndentation": false, | ||
"editor.formatOnSave": true, | ||
"editor.insertSpaces": true, | ||
"editor.rulers": [ | ||
81, | ||
88, | ||
100 | ||
], | ||
"editor.tabSize": 4 | ||
}, | ||
"cSpell.enabled": true, | ||
"files.insertFinalNewline": true, | ||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
CI := $(if $(CI),yes,no) | ||
SHELL := /bin/bash | ||
|
||
ifeq ($(CI), yes) | ||
POETRY_OPTS = "-v" | ||
PRE_COMMIT_OPTS = --show-diff-on-failure --verbose | ||
endif | ||
|
||
help: ## show this message | ||
@awk \ | ||
'BEGIN {FS = ":.*##"; printf "\nUsage: make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-30s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) }' \ | ||
$(MAKEFILE_LIST) | ||
|
||
run-pre-commit: ## run pre-commit for all files | ||
@poetry run pre-commit run $(PRE_COMMIT_OPTS) \ | ||
--all-files \ | ||
--color always | ||
|
||
setup: setup-poetry setup-pre-commit setup-npm ## setup development environment | ||
|
||
setup-npm: ## install node dependencies with npm | ||
@npm ci | ||
|
||
setup-poetry: ## setup python virtual environment | ||
@if [[ -d .venv ]]; then \ | ||
poetry run python -m pip --version >/dev/null 2>&1 || rm -rf ./.venv/* ./.venv/.*; \ | ||
fi | ||
@poetry check | ||
@poetry install $(POETRY_OPTS) --sync | ||
|
||
setup-pre-commit: ## install pre-commit git hooks | ||
@poetry run pre-commit install | ||
|
||
spellcheck: ## run cspell | ||
@echo "Running cSpell to checking spelling..." | ||
@npm exec --no -- cspell lint . \ | ||
--color \ | ||
--config .vscode/cspell.json \ | ||
--dot \ | ||
--gitignore \ | ||
--must-find-files \ | ||
--no-progress \ | ||
--relative \ | ||
--show-context |
Oops, something went wrong.