Skip to content

Commit da61bc2

Browse files
committed
test remove pato from list
1 parent 1e715d6 commit da61bc2

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Update ontologies using change language.
1414

1515
Ontology resources that are powered by `ontobot-change-agent`:
1616
- [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)
2017
- [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)
2119
- [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)
2222

2323
<!-- IMPLEMENTERS_END -->
2424

src/ontobot_change_agent/api.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"""API section."""
33

44
import json
5+
import os
56
import re
67
import subprocess # noqa S404
78
from os.path import join, splitext
@@ -317,7 +318,15 @@ def get_ontobot_implementers(token: str = None):
317318
new_content += f" - [{full_name}]({html_url})\n"
318319

319320
# 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"
321330
with open(readme_path, "r") as file:
322331
current_readme_content = file.read()
323332

0 commit comments

Comments
 (0)