Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
d230ecc5
Unverified
Commit
d230ecc5
authored
Feb 28, 2025
by
Sayak Paul
Committed by
GitHub
Feb 28, 2025
Browse files
[style bot] improve security for the stylebot. (#10908)
* improve security for the stylebot. *
❌
parent
37a5f1b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
.github/workflows/pr_style_bot.yml
.github/workflows/pr_style_bot.yml
+24
-4
No files found.
.github/workflows/pr_style_bot.yml
View file @
d230ecc5
...
@@ -64,18 +64,38 @@ jobs:
...
@@ -64,18 +64,38 @@ jobs:
run
:
|
run
:
|
pip install .[quality]
pip install .[quality]
-
name
:
Download
Make
file from main branch
-
name
:
Download
necessary
file
s
from main branch
of Diffusers
run
:
|
run
:
|
curl -o main_Makefile https://raw.githubusercontent.com/huggingface/diffusers/main/Makefile
curl -o main_Makefile https://raw.githubusercontent.com/huggingface/diffusers/main/Makefile
curl -o main_setup.py https://raw.githubusercontent.com/huggingface/diffusers/refs/heads/main/setup.py
curl -o main_check_doc_toc.py https://raw.githubusercontent.com/huggingface/diffusers/refs/heads/main/utils/check_doc_toc.py
-
name
:
Compare
Make
files
-
name
:
Compare
the
files
and raise error if needed
run
:
|
run
:
|
diff_failed=0
if ! diff -q main_Makefile Makefile; then
if ! diff -q main_Makefile Makefile; then
echo "Error: The Makefile has changed. Please ensure it matches the main branch."
echo "Error: The Makefile has changed. Please ensure it matches the main branch."
diff_failed=1
fi
if ! diff -q main_setup.py setup.py; then
echo "Error: The setup.py has changed. Please ensure it matches the main branch."
diff_failed=1
fi
if ! diff -q main_check_doc_toc.py utils/check_doc_toc.py; then
echo "Error: The utils/check_doc_toc.py has changed. Please ensure it matches the main branch."
diff_failed=1
fi
if [ $diff_failed -eq 1 ]; then
echo "❌ Error happened as we detected changes in the files that should not be changed ❌"
exit 1
exit 1
fi
fi
echo "No changes in Makefile. Proceeding..."
rm -rf main_Makefile
echo "No changes in the files. Proceeding..."
rm -rf main_Makefile main_setup.py main_check_doc_toc.py
-
name
:
Run make style and make quality
-
name
:
Run make style and make quality
run
:
|
run
:
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment