Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action to post ro-edit.owl diff #770

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'Create ROBOT diffs on Pull requests'

on:

issue_comment:
types: [created]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
diff-reports:
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
container: obolibrary/odkfull:v1.4
permissions:
contents: read
pull-requests: read
steps:
- uses: khan/[email protected]
id: check
with:
trigger: '#gogoeditdiff'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
# Checks-out current branch
- uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch
- uses: actions/checkout@v3
if: steps.check.outputs.triggered == 'true'
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
# Checks-out master branch under "master" directory
- uses: actions/checkout@v3
if: steps.check.outputs.triggered == 'true'
with:
ref: master
path: master
- name: Diff Edit
if: steps.check.outputs.triggered == 'true'
run: |
cd src/ontology
robot diff --left ../../master/src/ontology/ro-edit.owl --left-catalog ../../master/src/ontology/catalog-v001.xml --right ro-edit.owl --right-catalog catalog-v001.xml -f markdown -o edit-diff.md
echo "<details>\n<summary>Here's a diff of your edit file</summary>\n" > edit-comment.md
cat edit-diff.md >> edit-comment.md
echo "</details>" >> edit-comment.md
- name: Post comment
if: steps.check.outputs.triggered == 'true'
uses: NejcZdovc/[email protected]
with:
file: "../../edit-comment.md"
github_token: ${{secrets.GITHUB_TOKEN}}

2 changes: 1 addition & 1 deletion src/ontology/ro-edit.owl
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ SubAnnotationPropertyOf(obo:RO_0002536 obo:RO_0002423)
# Annotation Property: obo:RO_0002537 (has start time value)

AnnotationAssertion(rdfs:label obo:RO_0002537 "has start time value")
AnnotationAssertion(rdfs:seeAlso obo:RO_0002537 <http://purl.obolibrary.org/obo/ro/docs/temporal-durations/>)
AnnotationAssertion(rdfs:seeAlso obo:RO_0002537 "http://purl.obolibrary.org/obo/ro/docs/temporal-durations/"^^xsd:anyURI)
SubAnnotationPropertyOf(obo:RO_0002537 obo:RO_0002535)

# Annotation Property: obo:RO_0002538 (has end time value)
Expand Down
Loading