File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -210,9 +210,15 @@ def get_reserved_xls_numbers_from_prs(
210210
211211def 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 :
Original file line number Diff line number Diff line change 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 }}
You can’t perform that action at this time.
0 commit comments