Skip to content

Commit da01e74

Browse files
committed
jbr-debug-access-right-test
1 parent 1e3db93 commit da01e74

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ jobs:
190190
uses: actions/setup-python@v5
191191
with:
192192
python-version: "3.12"
193+
- name: "Setup git credentials"
194+
run: "git config --global user.name 'Infrahub' && \
195+
git config --global user.email '[email protected]' && \
196+
git config --global --add safe.directory '*' && \
197+
git config --global credential.usehttppath true && \
198+
git config --global credential.helper /usr/local/bin/infrahub-git-credential"
193199
- name: "Setup environment"
194200
run: |
195201
pipx install poetry==1.8.5

infrahub_sdk/testing/repository.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import asyncio
44
import shutil
5-
import os
65
from dataclasses import dataclass, field
76
from enum import Enum
87
from pathlib import Path
@@ -60,18 +59,17 @@ def path(self) -> str:
6059

6160
def init(self) -> None:
6261
self.dst_directory.mkdir(parents=True, exist_ok=True)
63-
os.chmod(self.dst_directory, 0o777)
64-
62+
6563
dest_path = self.dst_directory / self.name
6664
if dest_path.exists():
6765
shutil.rmtree(dest_path)
68-
66+
6967
dest = shutil.copytree(
7068
src=self.src_directory,
7169
dst=dest_path,
7270
ignore=shutil.ignore_patterns(".git", *self.directories_to_ignore),
7371
)
74-
72+
dest_path.chmod(0o755)
7573
print(dest)
7674

7775
self._repo = GitRepoManager(str(Path(self.dst_directory / self.name)), branch=self.initial_branch)

0 commit comments

Comments
 (0)