Skip to content

Commit 7a81b22

Browse files
sbidoulyajo
authored andcommitted
Check that pre-commit generated files are in git
1 parent 056d236 commit 7a81b22

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/.github/workflows/pre-commit.yml.jinja

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@ jobs:
1818
# Python 3.9.8+, and we can't bump black without reformatting.
1919
python-version: {% if odoo_version < 15 %}"3.9.7"{% else %}"3.10"{% endif %}
2020
- uses: pre-commit/[email protected]
21+
- name: Check that all files generated by pre-commit are in git
22+
run: |
23+
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
24+
if [ "$newfiles" != "" ] ; then
25+
echo "Please check-in the following files:"
26+
echo "$newfiles"
27+
exit 1
28+
fi

0 commit comments

Comments
 (0)