Skip to content

Commit c1e87de

Browse files
Use the style_check.sh script in spack-packages (#110)
* Use the style_check.sh script in spack-packages * Clone spack core for flake8 modules
1 parent 9910787 commit c1e87de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spackbot/workers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ async def fix_style_task(event):
332332
)
333333
elif repo_name == "spack-packages":
334334
# Packages calls black directly per changed file
335-
style_tool = ("black", [])
335+
style_tool = (".ci/style_check.sh", ["--fix"])
336336

337337
# At this point, we can clone the repository and make the change
338338
with helpers.temp_dir() as cwd:
@@ -348,6 +348,10 @@ async def fix_style_task(event):
348348
git.clone("develop", "fork")
349349

350350
os.chdir("fork")
351+
if repo_name == "spack-packages":
352+
# We need to clone spack in order to use the style script
353+
spack_upstream_url = helpers.PROJECTS["spack"].upstream_url
354+
git.clone("--depth", "1", spack_upstream_url, "spack-core")
351355

352356
git.config("user.name", user)
353357
git.config("user.email", email)

0 commit comments

Comments
 (0)