From 434497433ef796b342fa5ec046ccb92408df489a Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 09:55:52 +0100 Subject: [PATCH 01/10] docs: bump to v3.0.0 OK --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8f5ea9a..18560f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gha-python" -version = "2.1.0" +version = "2.3.0" description = "Add your description here" readme = "README.md" requires-python = ">=3.10" From 39982286c8d3ff2e651ffc9520531f412079658a Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 09:56:12 +0100 Subject: [PATCH 02/10] docs: set to v3.0.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 18560f6..dc13a6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gha-python" -version = "2.3.0" +version = "3.0.0" description = "Add your description here" readme = "README.md" requires-python = ">=3.10" From e1b04ed04f550d58ad4c7889d9780633f121a2c4 Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 12:58:16 +0100 Subject: [PATCH 03/10] test --- .github/{workflows => templates}/ci.yaml | 0 .../uv_run_lint_tests_calc_matrix_security.yaml | 0 TEST.md | 3 +++ uv.lock | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) rename .github/{workflows => templates}/ci.yaml (100%) rename .github/{templates => workflows}/uv_run_lint_tests_calc_matrix_security.yaml (100%) create mode 100644 TEST.md diff --git a/.github/workflows/ci.yaml b/.github/templates/ci.yaml similarity index 100% rename from .github/workflows/ci.yaml rename to .github/templates/ci.yaml diff --git a/.github/templates/uv_run_lint_tests_calc_matrix_security.yaml b/.github/workflows/uv_run_lint_tests_calc_matrix_security.yaml similarity index 100% rename from .github/templates/uv_run_lint_tests_calc_matrix_security.yaml rename to .github/workflows/uv_run_lint_tests_calc_matrix_security.yaml diff --git a/TEST.md b/TEST.md new file mode 100644 index 0000000..836841f --- /dev/null +++ b/TEST.md @@ -0,0 +1,3 @@ +run `git clone https://github.com/Python-Test-Engineer/gha-python.git` + +`uv sync` \ No newline at end of file diff --git a/uv.lock b/uv.lock index 0e23606..c0850cf 100644 --- a/uv.lock +++ b/uv.lock @@ -61,7 +61,7 @@ wheels = [ [[package]] name = "gha-python" -version = "0.1.0" +version = "3.0.0" source = { virtual = "." } dependencies = [ { name = "mypy" }, From d0f8863250ceff8b70e3fa5f0386365da5a0aa4c Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 13:01:38 +0100 Subject: [PATCH 04/10] docs: update README with setup instructions --- TEST.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TEST.md b/TEST.md index 836841f..0440373 100644 --- a/TEST.md +++ b/TEST.md @@ -1,3 +1,13 @@ run `git clone https://github.com/Python-Test-Engineer/gha-python.git` -`uv sync` \ No newline at end of file +`uv sync` + +`uv run pytest -vs` + +`uv run pre-commit install --hook-type commit-msg` sets up precommit and conventional commits + +`git add .` + +`git commit -m "will not work"` + +`git commit -m "docs: update README with setup instructions"` \ No newline at end of file From 4866186a6acb55f0279a5d6605add31508f4e86f Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 13:09:04 +0100 Subject: [PATCH 05/10] docs: add README.md setup --- README.md | 165 ++++++++++++++++++ ...E_HOW_I_SET_UP.md => README_CRAIG_NOTES.md | 0 TEST.md | 2 +- 3 files changed, 166 insertions(+), 1 deletion(-) rename README_HOW_I_SET_UP.md => README_CRAIG_NOTES.md (100%) diff --git a/README.md b/README.md index 57806ae..898756c 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,168 @@ - Ruff for linting - MyPy for type checking - uses a custom Python script to check for secrets + +## Setup + +`git clone https://github.com/Python-Test-Engineer/gha-python.git` + +`uv sync` - installs dependencies + +`uv run pytest -vs` - runs pytest to check all wired OK. You can remove files from `src` and `tests` to add your own files. + +`uv run pre-commit install --hook-type commit-msg` sets up precommit and conventional commits + +Test: + +`git add .` + +`git commit -m "will not work"` - this will fail + +`git commit -m "docs: update README with setup instructions"` - this will pass as if follows conventional commits. + + +# Conventional Commits Guide + +Conventional Commits is a specification for adding human and machine-readable meaning to commit messages. It provides a simple set of rules for creating an explicit commit history. + +TIPS: + +feat/fix or breaking changes will create Semantic Versioning bumps. + +To avoid this use 'docs/chore/perf/style/test/refactor' prefixes as these will idicate what you are doing without affecting versioning which can be saved for deployment push. + +## Basic Format + +``` +[optional scope]: + +[optional body] + +[optional footer(s)] +``` + +## Types + +**feat**: A new feature for the user +``` +feat: add user authentication +feat(auth): implement password reset +``` + +**fix**: A bug fix +``` +fix: resolve login validation error +fix(api): handle null response in user endpoint +``` + +**docs**: Documentation only changes +``` +docs: update README installation steps +docs(api): add authentication examples +``` + +**style**: Changes that don't affect code meaning (white-space, formatting, etc.) +``` +style: fix indentation in components +style(css): remove unused imports +``` + +**refactor**: Code change that neither fixes a bug nor adds a feature +``` +refactor: simplify user validation logic +refactor(utils): extract common date formatting +``` + +**perf**: A code change that improves performance +``` +perf: optimize database queries +perf(images): implement lazy loading +``` + +**test**: Adding missing tests or correcting existing tests +``` +test: add unit tests for user service +test(auth): cover edge cases in login flow +``` + +**build**: Changes that affect the build system or external dependencies +``` +build: update webpack configuration +build(deps): bump lodash from 4.17.20 to 4.17.21 +``` + +**ci**: Changes to CI configuration files and scripts +``` +ci: add automated testing workflow +ci(github): update deployment pipeline +``` + +**chore**: Other changes that don't modify src or test files +``` +chore: update .gitignore +chore(release): bump version to 1.2.0 +``` + +## Breaking Changes + +Add `!` after the type/scope to indicate breaking changes: +``` +feat!: remove deprecated API endpoints +feat(auth)!: change password requirements +``` + +Or use the footer: +``` +feat: add new authentication method + +BREAKING CHANGE: old auth tokens are no longer valid +``` + +## Examples + +**Simple feature:** +``` +feat: add dark mode toggle +``` + +**Bug fix with scope:** +``` +fix(checkout): prevent duplicate order submissions +``` + +**Documentation update:** +``` +docs: add contributing guidelines +``` + +**Breaking change:** +``` +feat!: upgrade to Node.js 18 + +BREAKING CHANGE: Node.js 16 is no longer supported +``` + +**With body and footer:** +``` +feat(lang): add French language support + +Add complete French translations for all user-facing text +including error messages and form labels. + +Closes #123 +``` + +## Benefits + +- Automatically generating changelogs +- Automatically determining semantic version bumps +- Communicating changes to teammates and stakeholders +- Triggering build and publish processes +- Making it easier to explore a more structured commit history + +## Tips + +- Use the imperative mood ("add" not "added" or "adds") +- Keep the description under 50 characters when possible +- Use the body to explain what and why vs. how +- Reference issues and pull requests in the footer \ No newline at end of file diff --git a/README_HOW_I_SET_UP.md b/README_CRAIG_NOTES.md similarity index 100% rename from README_HOW_I_SET_UP.md rename to README_CRAIG_NOTES.md diff --git a/TEST.md b/TEST.md index 0440373..88ae434 100644 --- a/TEST.md +++ b/TEST.md @@ -1,4 +1,4 @@ -run `git clone https://github.com/Python-Test-Engineer/gha-python.git` +`git clone https://github.com/Python-Test-Engineer/gha-python.git` `uv sync` From 406cca4c3973fcff708b1a3e1be12a98bb5f2e87 Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 13:12:41 +0100 Subject: [PATCH 06/10] test: added gitleaks precommit --- .pre-commit-config.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2ab8b3d..87a9c86 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,12 +12,10 @@ repos: - id: pretty-format-json - id: mixed-line-ending - # - repo: https://github.com/astral-sh/ruff-pre-commit - # rev: v0.1.6 + # - repo: https://github.com/gitleaks/gitleaks + # rev: v8.27.2 # Specify the desired version of Gitleaks # hooks: - # - id: ruff - # args: [--fix] - # - id: ruff-format + # - id: gitleaks - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. From 13da01c1e5a7c7a527dedbba5bd70f3dc1ec9454 Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 13:15:55 +0100 Subject: [PATCH 07/10] test: added added detect-secrets --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87a9c86..a71ead5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,10 +12,10 @@ repos: - id: pretty-format-json - id: mixed-line-ending - # - repo: https://github.com/gitleaks/gitleaks - # rev: v8.27.2 # Specify the desired version of Gitleaks - # hooks: - # - id: gitleaks + - repo: https://github.com/Yelp/detect-secrets + rev: v1.4.0 + hooks: + - id: detect-secrets - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. From 886a93681ae23fc9676bba803f8dd2f3e4b866b4 Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 13:17:28 +0100 Subject: [PATCH 08/10] test: added added detect-secrets --- README_CRAIG_NOTES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README_CRAIG_NOTES.md b/README_CRAIG_NOTES.md index d94cd83..87d9f11 100644 --- a/README_CRAIG_NOTES.md +++ b/README_CRAIG_NOTES.md @@ -30,6 +30,8 @@ v2.1.0 v3.0.0 - has the `ci.yaml` OK +v3.1.0 - has the detect-secrets precommit as gitleaks did not seem to work. + -------------------------------------------------------------------- # Set up From 9dbeafbf25803acd111c6fb2d301b55ef5320419 Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 13:18:55 +0100 Subject: [PATCH 09/10] feat: add precommit detect-secrets --- README_CRAIG_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CRAIG_NOTES.md b/README_CRAIG_NOTES.md index 87d9f11..9114bee 100644 --- a/README_CRAIG_NOTES.md +++ b/README_CRAIG_NOTES.md @@ -30,7 +30,7 @@ v2.1.0 v3.0.0 - has the `ci.yaml` OK -v3.1.0 - has the detect-secrets precommit as gitleaks did not seem to work. +v3.1.0 - has the detect-secrets precommit as gitleaks did not seem to work. Tested with uv_run_lint... -------------------------------------------------------------------- From 193996c9ef94e7f863dde721673185d6fb0f6add Mon Sep 17 00:00:00 2001 From: Craig West Date: Mon, 14 Jul 2025 13:19:04 +0100 Subject: [PATCH 10/10] feat: add precommit detect-secrets --- .../uv_run_lint_tests_calc_matrix_security.yaml | 0 .github/{templates => workflows}/ci.yaml | 0 README_CRAIG_NOTES.md | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename .github/{workflows => templates}/uv_run_lint_tests_calc_matrix_security.yaml (100%) rename .github/{templates => workflows}/ci.yaml (100%) diff --git a/.github/workflows/uv_run_lint_tests_calc_matrix_security.yaml b/.github/templates/uv_run_lint_tests_calc_matrix_security.yaml similarity index 100% rename from .github/workflows/uv_run_lint_tests_calc_matrix_security.yaml rename to .github/templates/uv_run_lint_tests_calc_matrix_security.yaml diff --git a/.github/templates/ci.yaml b/.github/workflows/ci.yaml similarity index 100% rename from .github/templates/ci.yaml rename to .github/workflows/ci.yaml diff --git a/README_CRAIG_NOTES.md b/README_CRAIG_NOTES.md index 9114bee..ecb127b 100644 --- a/README_CRAIG_NOTES.md +++ b/README_CRAIG_NOTES.md @@ -30,7 +30,7 @@ v2.1.0 v3.0.0 - has the `ci.yaml` OK -v3.1.0 - has the detect-secrets precommit as gitleaks did not seem to work. Tested with uv_run_lint... +v3.1.0 - has the detect-secrets precommit as gitleaks did not seem to work. Tested with `ci.yaml` -------------------------------------------------------------------- pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy