From 92bb1bda011bef338e0801250559e641615dd637 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Mon, 6 Nov 2023 17:13:31 +0000 Subject: [PATCH 1/2] github action to post diff --- .github/workflows/diff.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/diff.yml diff --git a/.github/workflows/diff.yml b/.github/workflows/diff.yml new file mode 100644 index 00000000..1d3df398 --- /dev/null +++ b/.github/workflows/diff.yml @@ -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/pull-request-comment-trigger@v1.1.0 + 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 "
\nHere's a diff of your edit file\n" > edit-comment.md + cat edit-diff.md >> edit-comment.md + echo "
" >> edit-comment.md + - name: Post comment + if: steps.check.outputs.triggered == 'true' + uses: NejcZdovc/comment-pr@v1.1.1 + with: + file: "../../edit-comment.md" + github_token: ${{secrets.GITHUB_TOKEN}} + \ No newline at end of file From 7a073d7afc4866b453d43c3d4e6252a91f0b0edf Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Mon, 6 Nov 2023 17:21:35 +0000 Subject: [PATCH 2/2] temporary change to test gh action --- src/ontology/ro-edit.owl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ontology/ro-edit.owl b/src/ontology/ro-edit.owl index c066275d..f597ba33 100644 --- a/src/ontology/ro-edit.owl +++ b/src/ontology/ro-edit.owl @@ -951,7 +951,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 ) +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)