Skip to content

Commit 422de4c

Browse files
committed
Fix output file path in org automation
1 parent 3438ada commit 422de4c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/org-management.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Generate github org configuration
4848
working-directory: ./community/orgs
4949
run: |
50-
uv run --no-dev python -m org_management -o orgs.out.yml -b branchprotection.out.yml
50+
uv run --no-dev python -m org_management -o ../../orgs.out.yml -b ../../branchprotection.out.yml
5151
- name: write github private key
5252
run: |
5353
echo "${GH_PRIVATE_KEY}" > private_key

orgs/org_management/org_management.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,15 @@ def generate_branch_protection(self):
225225
branch_protection_repos[repo] = repo_rules[repo]
226226

227227
def write_org_config(self, path: str):
228-
print(f"Writing org configuration to {path}")
229-
with open(path, "w") as stream:
228+
p = Path(path)
229+
print(f"Writing org configuration to {p.absolute()}")
230+
with open(p, "w") as stream:
230231
return yaml.safe_dump(self.org_cfg, stream)
231232

232233
def write_branch_protection(self, path: str):
233-
print(f"Writing branch protection to {path}")
234-
with open(path, "w") as stream:
234+
p = Path(path)
235+
print(f"Writing branch protection to {p.absolute()}")
236+
with open(p, "w") as stream:
235237
return yaml.safe_dump(self.branch_protection, stream)
236238

237239
@staticmethod

0 commit comments

Comments
 (0)