Skip to content

Commit 387ddbf

Browse files
committed
Add action to ensure SOP for ontology activity related changes
This adds a review requesting changes whenever the activity status of an ontology is changed. I dont want to encode the entire SOP here, this is just a fail safe that can be easily dismissed by a TWG maintainer if neeed.
1 parent ba09c30 commit 387ddbf

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Activity Status Change Review
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
paths: [ 'ontology/*.md' ]
7+
8+
jobs:
9+
check-activity-status:
10+
runs-on: ubuntu-latest
11+
if: github.triggering_actor != 'github-actions[bot]'
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
ref: ${{ github.event.pull_request.head.sha }}
16+
fetch-depth: 0
17+
18+
- name: Flag activity_status changes
19+
env:
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
run: |
22+
BASE=${{ github.event.pull_request.base.sha }}
23+
HEAD=${{ github.event.pull_request.head.sha }}
24+
25+
git diff "$BASE" "$HEAD" -- 'ontology/*.md' | grep -qE '^\+activity_status:|^-activity_status:' || exit 0
26+
27+
gh api --method POST \
28+
"repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \
29+
-f event="REQUEST_CHANGES" \
30+
-f body="### Activity Status Change Detected
31+
32+
This PR modifies the \`activity_status\` of one or more ontologies. Please ensure that the [OBO Foundry Standard Operating Procedures](https://obofoundry.org/docs/SOP.html) have been followed for any rules governing activity status changes.
33+
34+
Once verified, you can dismiss this review by navigating to the **Reviews** section under *\"Changes requested\"* in the QC block on the PR main page."

0 commit comments

Comments
 (0)