@@ -91,6 +91,11 @@ def action_ref():
9191 return os .environ .get ("COVERAGE_COMMENT_E2E_ACTION_REF" , "main" )
9292
9393
94+ @pytest .fixture
95+ def repository_owner ():
96+ return os .environ .get ("COVERAGE_COMMENT_E2E_REPOSITORY_OWNER" , "py-cov-action" )
97+
98+
9499@pytest .fixture
95100def _gh (call , gh_config_dir ):
96101 def gh (* args , token , json = False , fail_value = None ):
@@ -194,7 +199,7 @@ def gh_other_username(gh_other):
194199
195200
196201@pytest .fixture
197- def git_repo (cd , git , action_ref , code_path , subproject_id ):
202+ def git_repo (cd , git , action_ref , repository_owner , code_path , subproject_id ):
198203 with cd ("repo" ) as repo :
199204 git ("init" , "-b" , "main" )
200205 # Copy .github
@@ -214,6 +219,7 @@ def git_repo(cd, git, action_ref, code_path, subproject_id):
214219 for file in (repo / ".github/workflows" ).iterdir ():
215220 content = (
216221 file .read_text ()
222+ .replace ("__ACTION_REPOSITORY_OWNER__" , repository_owner )
217223 .replace ("__ACTION_REF__" , action_ref )
218224 .replace ("__ACTION_COVERAGE_PATH__" , str (code_path ))
219225 .replace ("__ACTION_SUBPROJECT_ID__" , json_module .dumps (subproject_id ))
0 commit comments