Commit da61bc2 1 parent 1e715d6 commit da61bc2 Copy full SHA for da61bc2
File tree 2 files changed +13
-4
lines changed
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ Update ontologies using change language.
14
14
15
15
Ontology resources that are powered by ` ontobot-change-agent ` :
16
16
- [ geneontology/go-ontology] ( https://github.com/geneontology/go-ontology/blob/6fbedcc5650a7a5363123d04ace38413434d709f/.github/workflows/new_pr.yml )
17
- - [ monarch-initiative/mondo] ( https://github.com/monarch-initiative/mondo/blob/ede6a34907480f18353539fd3df9be31d9f01cdf/.github/workflows/ontobot.yaml )
18
- - [ obophenotype/uberon] ( https://github.com/obophenotype/uberon/blob/e0ca62d37dfb665d5ef8f4a0c7014ae20af28531/.github/workflows/auto-pr-ontobot.yml )
19
- - [ EnvironmentOntology/envo] ( https://github.com/EnvironmentOntology/envo/blob/cf0db392bc566c68cfafaa3a8e32ad218f216a8e/.github/workflows/ontobot.yml )
20
17
- [ obophenotype/cell-ontology] ( https://github.com/obophenotype/cell-ontology/blob/2180772b156cf79797b04cc494efc8185088428c/.github/workflows/ontobot.yml )
18
+ - [ obophenotype/uberon] ( https://github.com/obophenotype/uberon/blob/e0ca62d37dfb665d5ef8f4a0c7014ae20af28531/.github/workflows/auto-pr-ontobot.yml )
21
19
- [ pato-ontology/pato] ( https://github.com/pato-ontology/pato/blob/f5573b017aba14714af17da975834b095000d99a/.github/workflows/onotobot.yml )
20
+ - [ EnvironmentOntology/envo] ( https://github.com/EnvironmentOntology/envo/blob/cf0db392bc566c68cfafaa3a8e32ad218f216a8e/.github/workflows/ontobot.yml )
21
+ - [ monarch-initiative/mondo] ( https://github.com/monarch-initiative/mondo/blob/2ad92a38d1e59c62fe45da32f437f9d0b7b09942/.github/workflows/ontobot.yaml )
22
22
23
23
<!-- IMPLEMENTERS_END -->
24
24
Original file line number Diff line number Diff line change 2
2
"""API section."""
3
3
4
4
import json
5
+ import os
5
6
import re
6
7
import subprocess # noqa S404
7
8
from os .path import join , splitext
@@ -317,7 +318,15 @@ def get_ontobot_implementers(token: str = None):
317
318
new_content += f" - [{ full_name } ]({ html_url } )\n "
318
319
319
320
# Get current README.md file
320
- readme_path = Path (__file__ ).parents [2 ] / "README.md"
321
+
322
+ # Check if the script is running in a GitHub Actions environment
323
+ if os .getenv ('GITHUB_ACTIONS' ) == 'true' :
324
+ # Use GITHUB_WORKSPACE environment variable to get the working directory
325
+ github_workspace = Path (os .getenv ('GITHUB_WORKSPACE' ))
326
+ readme_path = github_workspace / "ontobot-change-agent/README.md"
327
+ else :
328
+ # Fallback to a local path (e.g., relative to the script) if not on GitHub Actions
329
+ readme_path = Path (__file__ ).parents [2 ] / "README.md"
321
330
with open (readme_path , "r" ) as file :
322
331
current_readme_content = file .read ()
323
332
You can’t perform that action at this time.
0 commit comments