Skip to content

Commit

Permalink
Merge pull request #24 from CM000n/enhancement/beautify_pre_commit
Browse files Browse the repository at this point in the history
Enhancemet: beautify pre-commit
  • Loading branch information
CM000n authored Jan 7, 2024
2 parents 2b52725 + 122eb0e commit 618a3ae
Show file tree
Hide file tree
Showing 12 changed files with 322 additions and 192 deletions.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ':bug: bug'
assignees: ''

title: ""
labels: ":bug: bug"
assignees: ""
---

**Describe the bug**
Expand Down
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Enhancement
about: 'Suggest an idea what we can do better '
title: ''
labels: ':sparkles: enhancement'
assignees: ''

about: "Suggest an idea what we can do better "
title: ""
labels: ":sparkles: enhancement"
assignees: ""
---

**Is your enhancement request related to a problem? Please describe.**
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for a new function to this project
title: ''
labels: ':bulb: feature'
assignees: ''

title: ""
labels: ":bulb: feature"
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ updates:
schedule:
interval: weekly
labels:
- ':robot: bot'
- ':game_die: dependencies'
- ":robot: bot"
- ":game_die: dependencies"
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- ':robot: bot'
- ':game_die: dependencies'
- ":robot: bot"
- ":game_die: dependencies"
138 changes: 69 additions & 69 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
- name: ':bell: automerge'
color: 8f4fbc
description: ''
- name: ':robot: bot'
color: 69cde9
description: ''
- name: ':bug: bug'
color: b60205
description: ''
- name: ':warning: breaking change'
color: b60205
description: ''
- name: ':game_die: dependencies'
color: 0366d6
description: ''
- name: ':memo: documentation'
color: c5def5
description: ''
- name: ':busts_in_silhouette: duplicate'
color: cccccc
description: ''
- name: ':speech_balloon: translation'
color: b2a8a6
description: ''
- name: ':wrench: enhancement'
color: 0054ca
description: ''
- name: ':rocket: feature'
color: 0e8a16
description: ''
- name: ':mega: feedback'
color: 03a9f4
description: ''
- name: ':clock10: future maybe'
color: fef2c0
description: ''
- name: ':hatching_chick: good first issue'
color: 7057ff
description: ''
- name: ':pray: help wanted'
color: 4caf50
description: ''
- name: ':no_entry_sign: invalid'
color: e6e6e6
description: ''
- name: ':mag: investigate'
color: e6625b
description: ''
- name: ':thinking: needs more info'
color: '795548'
description: ''
- name: ':pushpin: pinned'
color: 28008e
description: ''
- name: ':question: question'
color: 3f51b5
description: ''
- name: ':skull: stale'
color: 237da0
description: ''
- name: ':eyes: upstream'
color: fbca04
description: ''
- name: ':construction_worker: WIP'
color: '668000'
description: ''
- name: ':coffin: wontfix'
color: ffffff
description: ''
- name: ":bell: automerge"
color: 8f4fbc
description: ""
- name: ":robot: bot"
color: 69cde9
description: ""
- name: ":bug: bug"
color: b60205
description: ""
- name: ":warning: breaking change"
color: b60205
description: ""
- name: ":game_die: dependencies"
color: 0366d6
description: ""
- name: ":memo: documentation"
color: c5def5
description: ""
- name: ":busts_in_silhouette: duplicate"
color: cccccc
description: ""
- name: ":speech_balloon: translation"
color: b2a8a6
description: ""
- name: ":wrench: enhancement"
color: 0054ca
description: ""
- name: ":rocket: feature"
color: 0e8a16
description: ""
- name: ":mega: feedback"
color: 03a9f4
description: ""
- name: ":clock10: future maybe"
color: fef2c0
description: ""
- name: ":hatching_chick: good first issue"
color: 7057ff
description: ""
- name: ":pray: help wanted"
color: 4caf50
description: ""
- name: ":no_entry_sign: invalid"
color: e6e6e6
description: ""
- name: ":mag: investigate"
color: e6625b
description: ""
- name: ":thinking: needs more info"
color: "795548"
description: ""
- name: ":pushpin: pinned"
color: 28008e
description: ""
- name: ":question: question"
color: 3f51b5
description: ""
- name: ":skull: stale"
color: 237da0
description: ""
- name: ":eyes: upstream"
color: fbca04
description: ""
- name: ":construction_worker: WIP"
color: "668000"
description: ""
- name: ":coffin: wontfix"
color: ffffff
description: ""
20 changes: 10 additions & 10 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name-template: v$RESOLVED_VERSION 🏳️‍🌈
tag-template: v$RESOLVED_VERSION
change-template: '- #$NUMBER $TITLE @$AUTHOR'
change-template: "- #$NUMBER $TITLE @$AUTHOR"
sort-direction: ascending
categories:
- title: ⚠️ Breaking changes
labels: [':warning: breaking change']
labels: [":warning: breaking change"]
- title: 🚀 Features
labels: [':rocket: feature']
labels: [":rocket: feature"]
- title: 🔧 Code enhancements
labels: [':wrench: enhancement']
labels: [":wrench: enhancement"]
- title: 🐛 Bug Fixes
labels: [':bug: bug']
labels: [":bug: bug"]
- title: 💬 Translations
labels: [':speech_balloon: translation']
labels: [":speech_balloon: translation"]
- title: 📝 Documentation
labels: [':memo: documentation']
labels: [":memo: documentation"]
- title: 🎲 Dependencies
labels: [':game_die: dependencies']
labels: [":game_die: dependencies"]
version-resolver:
major:
labels:
Expand All @@ -40,9 +40,9 @@ exclude-contributors:
- github-actions

autolabeler:
- label: ':bug: bug'
- label: ":bug: bug"
branch:
- /fix/.+/
- label: ':bulb: feature'
- label: ":bulb: feature"
branch:
- /feature/.+/
98 changes: 75 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,89 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
- repo: local
hooks:
- id: check-added-large-files
- id: check-json
name: "✅ Check JSON files"
language: system
types: [json]
entry: poetry run check-json
- id: check-toml
name: "✅ Check TOML files"
language: system
types: [toml]
entry: poetry run check-toml
- id: check-yaml
name: "✅ Check YAML files"
language: system
types: [yaml]
entry: poetry run check-yaml
- id: check-json
name: "📁 Check for large files"
language: system
entry: poetry run check-added-large-files
- id: check-json
exclude: .devcontainer
name: "🐛 Check for forgotten debug statemens"
language: system
types: [python]
entry: poetry run debug-statement-hook
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
args: [--branch, master, --branch, main]
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.2
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '120', --implicit_start]
- repo: local
hooks:
name: "💥 Check for merge conflicts"
language: system
types: [text]
entry: poetry run check-merge-conflict
- id: check-symlinks
name: "🔗 Check for broken symlinks"
language: system
types: [symlink]
entry: poetry run check-symlinks
- id: codespell
name: codespell
name: "💭 Check for code spelling"
entry: poetry run codespell --write-changes --skip="./*"
language: system
pass_filenames: false
always_run: true
- id: ruff format
name: ruff format
entry: poetry run ruff format
- id: end-of-file-fixer
name: "🔚 Fix End of Files"
language: system
types: [text]
entry: poetry run end-of-file-fixer
stages: [commit, push, manual]
- id: end-of-file-fixer
name: "⬜ Fix trailing whitespaces"
language: system
types: [text]
entry: poetry run end-of-file-fixer
stages: [commit, push, manual]
- id: ruff-check
name: "🐶 Ruff Linter"
language: system
types: [python]
- id: ruff lint
name: ruff lint
entry: poetry run ruff
entry: poetry run ruff check --fix
require_serial: true
stages: [commit, push, manual]
- id: ruff-format
name: "🐶 Ruff Formatter"
language: system
types: [python]
entry: poetry run ruff format
require_serial: true
stages: [commit, push, manual]
- id: poetry pyproject check
name: "📜 Check pyproject with Poetry"
language: system
entry: poetry check
pass_filenames: false
always_run: true
- id: no-commit-to-branch
name: "🛑 Don't commit to main branch"
language: system
entry: poetry run no-commit-to-branch
pass_filenames: false
always_run: true
args:
- --branch=master
- --branch=main
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: 🎨 Format using prettier
Loading

0 comments on commit 618a3ae

Please sign in to comment.