Compare commits
2 Commits
pythonplus
...
zanie/eco-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8935ec7ce | ||
|
|
7e6584039e |
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
@@ -209,6 +209,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip install ./python/ruff-ecosystem
|
pip install ./python/ruff-ecosystem
|
||||||
|
|
||||||
|
- name: Restore cached checkouts
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
path: ./checkouts
|
||||||
|
key: ecosystem-checkouts
|
||||||
|
|
||||||
- name: Run `ruff check` stable ecosystem check
|
- name: Run `ruff check` stable ecosystem check
|
||||||
if: ${{ needs.determine_changes.outputs.linter == 'true' }}
|
if: ${{ needs.determine_changes.outputs.linter == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -273,6 +279,12 @@ jobs:
|
|||||||
cat ecosystem-result-format-preview >> ecosystem-result
|
cat ecosystem-result-format-preview >> ecosystem-result
|
||||||
echo "" >> ecosystem-result
|
echo "" >> ecosystem-result
|
||||||
|
|
||||||
|
- name: Save cached checkouts
|
||||||
|
uses: actions/cache/save@v3
|
||||||
|
with:
|
||||||
|
path: ./checkouts
|
||||||
|
key: ecosystem-checkouts
|
||||||
|
|
||||||
- name: Export pull request number
|
- name: Export pull request number
|
||||||
run: |
|
run: |
|
||||||
echo ${{ github.event.number }} > pr-number
|
echo ${{ github.event.number }} > pr-number
|
||||||
|
|||||||
@@ -162,38 +162,39 @@ class Repository(Serializable):
|
|||||||
logger.debug(f"Pulling latest changes for {self.fullname} @ {self.ref}")
|
logger.debug(f"Pulling latest changes for {self.fullname} @ {self.ref}")
|
||||||
await cloned_repo.pull()
|
await cloned_repo.pull()
|
||||||
|
|
||||||
return cloned_repo
|
else:
|
||||||
|
logger.debug(f"Cloning {self.owner}:{self.name} to {checkout_dir}")
|
||||||
|
command = [
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--config",
|
||||||
|
"advice.detachedHead=false",
|
||||||
|
"--quiet",
|
||||||
|
"--depth",
|
||||||
|
"1",
|
||||||
|
"--no-tags",
|
||||||
|
]
|
||||||
|
if self.ref:
|
||||||
|
command.extend(["--branch", self.ref])
|
||||||
|
|
||||||
logger.debug(f"Cloning {self.owner}:{self.name} to {checkout_dir}")
|
command.extend(
|
||||||
command = [
|
[
|
||||||
"git",
|
f"https://github.com/{self.owner}/{self.name}",
|
||||||
"clone",
|
str(checkout_dir),
|
||||||
"--config",
|
],
|
||||||
"advice.detachedHead=false",
|
)
|
||||||
"--quiet",
|
|
||||||
"--depth",
|
|
||||||
"1",
|
|
||||||
"--no-tags",
|
|
||||||
]
|
|
||||||
if self.ref:
|
|
||||||
command.extend(["--branch", self.ref])
|
|
||||||
|
|
||||||
command.extend(
|
process = await create_subprocess_exec(
|
||||||
[
|
*command, env={"GIT_TERMINAL_PROMPT": "0"}
|
||||||
f"https://github.com/{self.owner}/{self.name}",
|
)
|
||||||
str(checkout_dir),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
process = await create_subprocess_exec(
|
status_code = await process.wait()
|
||||||
*command, env={"GIT_TERMINAL_PROMPT": "0"}
|
|
||||||
)
|
|
||||||
|
|
||||||
status_code = await process.wait()
|
logger.debug(
|
||||||
|
f"Finished cloning {self.fullname} with status {status_code}",
|
||||||
|
)
|
||||||
|
|
||||||
logger.debug(
|
cloned_repo = await ClonedRepository.from_path(checkout_dir, self)
|
||||||
f"Finished cloning {self.fullname} with status {status_code}",
|
|
||||||
)
|
|
||||||
|
|
||||||
# Configure git user — needed for `self.commit` to work
|
# Configure git user — needed for `self.commit` to work
|
||||||
await (
|
await (
|
||||||
@@ -216,7 +217,7 @@ class Repository(Serializable):
|
|||||||
)
|
)
|
||||||
).wait()
|
).wait()
|
||||||
|
|
||||||
return await ClonedRepository.from_path(checkout_dir, self)
|
return cloned_repo
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user