Skip to content

Commit

Permalink
Check that pre-commit generated files are in git
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul authored and yajo committed Dec 15, 2021
1 parent 056d236 commit 7a81b22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/.github/workflows/pre-commit.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ jobs:
# Python 3.9.8+, and we can't bump black without reformatting.
python-version: {% if odoo_version < 15 %}"3.9.7"{% else %}"3.10"{% endif %}
- uses: pre-commit/action@v2.0.0
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi

0 comments on commit 7a81b22

Please sign in to comment.