Skip to content

Commit 9736e14

Browse files
committed
Merge branch 'master' into bot-concurrence
2 parents 0b82825 + 67ee21d commit 9736e14

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/scripts/assign_xls_number.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,15 @@ def get_reserved_xls_numbers_from_prs(
210210

211211
def main():
212212
"""Main entry point for the script."""
213-
# Get repository root (parent of .github directory)
214-
script_dir = Path(__file__).resolve().parent
215-
repo_root = script_dir.parent.parent
213+
# Get repository root from environment variable (set by GitHub Actions)
214+
# or fall back to calculating from script location
215+
repo_root_env = os.environ.get("REPO_ROOT")
216+
if repo_root_env:
217+
repo_root = Path(repo_root_env)
218+
else:
219+
# Fallback: parent of .github directory
220+
script_dir = Path(__file__).resolve().parent
221+
repo_root = script_dir.parent.parent
216222

217223
# Get changed files from command line arguments or environment variable
218224
if len(sys.argv) > 1:

.github/workflows/assign-xls-number.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
- name: Assign XLS number
6767
if: steps.check-drafts.outputs.has_drafts == 'true'
6868
id: assign-number
69+
env:
70+
REPO_ROOT: ${{ github.workspace }}
6971
run: |
7072
echo ${{ steps.check-drafts.outputs.draft_files }}
7173
python base-repo/.github/scripts/assign_xls_number.py ${{ steps.check-drafts.outputs.draft_files }}

0 commit comments

Comments
 (0)