Skip to content

Migrations regeneration api types precommit#5917

Open
Jeeziorny wants to merge 5 commits intodevelopfrom
migrations-regeneration-api-types-precommit
Open

Migrations regeneration api types precommit#5917
Jeeziorny wants to merge 5 commits intodevelopfrom
migrations-regeneration-api-types-precommit

Conversation

@Jeeziorny
Copy link
Copy Markdown
Contributor

@Jeeziorny Jeeziorny commented Apr 20, 2026

Recently I got a few issues bc I forgot to commit django migration files and/or REST API Types. Changes on this branch introduce precommit checks:

  1. If there are django migration that should be added to the index but are not,
  2. If there are REST API Types regeneration needed but the commit doesn't have it.

@Jeeziorny Jeeziorny marked this pull request as ready for review April 20, 2026 07:47
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (567c491) to head (955252d).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5917   +/-   ##
========================================
  Coverage    92.28%   92.28%           
========================================
  Files          494      494           
  Lines        34362    34362           
  Branches      3603     3603           
========================================
  Hits         31711    31711           
  Misses        1904     1904           
  Partials       747      747           
Flag Coverage Δ
e2e 52.63% <ø> (+0.02%) ⬆️
unit 91.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@@ -0,0 +1,45 @@
#!/usr/bin/env bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting we need to check FE types...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reason @mmaciekk

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what action this comment require

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the idea of this hook?

# than its directory name, add an explicit mapping here.

set -euo pipefail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can reuse something

repos:

  • repo: local
    hooks:

    • id: django-migrations-check
      name: Check for missing Django migrations
      entry: python manage.py makemigrations --check --dry-run
      language: system
      pass_filenames: false
  • repo: https://github.com/ecugol/pre-commit-hooks-django
    rev: v0.4.0
    hooks:

    • id: check-absent-migrations

@saxix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants