litellm/.github/workflows
ryan-crabbe-berri 0d120de785
chore(hooks): enforce Conventional Commits and Conventional Branches (#30174)
* chore(hooks): enforce Conventional Commits and Conventional Branches

Adds opt-in local git hooks plus a CI PR-title check:

- .githooks/commit-msg validates commit subjects against Conventional
  Commits 1.0.0 (feat|fix|docs|style|refactor|perf|test|build|ci|
  chore|revert)(scope)!: subject. Merge/revert/fixup!/squash!/amend!
  messages pass through; --no-verify still works.
- .githooks/pre-push validates branch names against Conventional
  Branches (feature|bugfix|hotfix|release|chore)/desc. Bypasses
  main, litellm_internal_staging, dependabot/*, gh-readonly-queue/*.
  Tag pushes and deletions are skipped.
- scripts/install_git_hooks.sh sets core.hooksPath=.githooks and is
  wired up as 'make install-hooks'. Opt-in — not chained into
  install-dev.
- .github/workflows/conventional-commits.yml validates PR titles via
  amannn/action-semantic-pull-request pinned to v6.1.1's SHA. This is
  the actual gate since squash-merge uses the PR title as the commit
  subject.
- tests/test_litellm/test_git_hooks.py exercises both hooks via
  subprocess for accept / reject / bypass / git-generated-message
  cases.
- CONTRIBUTING.md documents the conventions, the install step, the
  bypass list, and the --no-verify escape hatch.

Resolves LIT-3306

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(hooks): address Greptile review on PR #28703

Resolves two findings from the automated code review:

1. CONTRIBUTING.md: shrink the new Conventional Commits / Branches
   section to a 2-line pointer at docs.litellm.ai. Per the team
   convention, the full documentation lives in the litellm-docs
   repo — see BerriAI/litellm-docs#208 for the companion change that
   adds the section to docs/extras/contributing_code.md.

2. .githooks/commit-msg: tighten the subject regex to also reject an
   uppercase first letter in the description. CI's subjectPattern is
   ^(?![A-Z]).+$ so the previous local hook would accept 'feat: Add
   thing' which would then fail the PR-title check. The local hook is
   now the strictly tighter of the two gates. Test cases extended to
   cover both the new rejection and the digit/symbol-start cases that
   remain allowed.

Resolves LIT-3306

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: trigger ci after branch rename

* fix(ci): rerun pr title check when bypass label changes

amannn/action-semantic-pull-request only honors ignoreLabels if the
workflow retriggers on labeled/unlabeled events; without them a red
check stays red after a maintainer applies the bypass label.

Also point the CONTRIBUTING.md workflow comments at the conventions
section, which now sits above the Development Workflow section.

---------

Co-authored-by: Yassin Kortam <yassinkortam@Yassins-MBP.localdomain>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-11 10:00:23 -07:00
..
_test-unit-base.yml test(proxy): stop running real-DB tests in GitHub Actions unit jobs (#29700) 2026-06-04 14:56:02 -07:00
auto_update_price_and_context_window_file.py only add/update vercel ai gateway models 2025-08-04 17:22:36 -07:00
auto_update_price_and_context_window.yml build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
check_duplicate_issues.yml [Infra] Flip remaining CI jobs to Python 3.12 2026-04-22 21:26:19 -07:00
check-schema-sync.yml chore: fixes 2026-04-05 01:30:57 -07:00
check-ui-api-types.yml feat(ui): generate dashboard API types from the proxy OpenAPI spec (#29816) 2026-06-05 17:20:01 -07:00
codeql.yml CI: copy of #25177 (OCI GenAI: embeddings, streaming/reasoning fixes, model catalog) (#28223) 2026-05-23 12:15:41 -07:00
codspeed.yml build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
conventional-commits.yml chore(hooks): enforce Conventional Commits and Conventional Branches (#30174) 2026-06-11 10:00:23 -07:00
create_daily_oss_agent_shin_branch.yml ci: add daily oss-agent-shin branch creation workflow (#28829) 2026-05-25 20:04:40 -07:00
create_daily_staging_branch.yml chore: fixes 2026-04-05 01:30:57 -07:00
create-release-branch.yml ci(release): create stable/X.Y.x line branch on X.Y.0 tags (#29457) 2026-06-01 15:56:34 -07:00
create-release.yml fix(release): stop backport releases from overwriting the latest badge (#30005) 2026-06-10 16:33:48 -07:00
guard-fork-dependencies.yml ci: add supply-chain guard to block fork PRs that modify dependencies 2026-04-25 18:46:50 +00:00
guard-main-branch.yml Point contributors toward litellm_oss_branch in guard error messages 2026-04-14 18:41:59 -07:00
helm_unit_test.yml chore: fixes 2026-04-05 01:30:57 -07:00
issue-keyword-labeler.yml chore: fixes 2026-04-05 01:30:57 -07:00
label-component.yml chore: fixes 2026-04-05 01:30:57 -07:00
mutation-test.yml ci: add manually-triggered mutation testing workflow (#27576) 2026-05-11 15:19:57 -07:00
run_llm_translation_tests.py build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
scorecard.yml chore: fixes 2026-04-05 01:30:57 -07:00
stale.yml chore: fixes 2026-04-05 01:30:57 -07:00
sync-schema.yml chore: fixes 2026-04-05 01:30:57 -07:00
test_server_root_path.yml refactor(ui): extract auth state into AuthContext (#28910) 2026-05-26 17:53:03 -07:00
test-code-quality.yml ci: check out litellm-docs directly into docs/my-website 2026-04-24 14:21:18 -07:00
test-linting.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-litellm-ui-build.yml ci(ui): frontend-lint job enforcing prettier + eslint on changed files (#29633) 2026-06-04 07:41:31 -07:00
test-mcp.yml ci: use --cov=./litellm so coverage paths resolve unambiguously in Codecov 2026-05-14 14:01:05 -07:00
test-model-map.yaml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-semgrep.yml [Infra] Move non-API-key CCI jobs to GitHub Actions 2026-04-22 13:38:00 -07:00
test-unit-core-utils.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-unit-documentation.yml ci: check out litellm-docs directly into docs/my-website 2026-04-24 14:21:18 -07:00
test-unit-enterprise-routing.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-unit-integrations.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-unit-llm-providers.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-unit-misc.yml feat(litellm): add models and repository layers (#29686) 2026-06-06 20:59:33 -07:00
test-unit-proxy-auth.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-unit-proxy-db.yml test(proxy): stop running real-DB tests in GitHub Actions unit jobs (#29700) 2026-06-04 14:56:02 -07:00
test-unit-proxy-endpoints.yml test(proxy/utils): pin bottom-of-file helper behavior (#29509) 2026-06-02 17:45:19 -07:00
test-unit-proxy-infra.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
test-unit-proxy-legacy.yml Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_migration_projects 2026-04-24 12:52:10 -07:00
test-unit-responses-caching-types.yml [Infra] Expand CI branch filters for non-main PR targets 2026-04-15 15:39:57 -07:00
zizmor.yml chore: fixes 2026-04-05 01:30:57 -07:00