From 387ddbf95e83e0eb23bb28d872e07d064542750d Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Mon, 30 Mar 2026 21:59:35 +0300 Subject: [PATCH] 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. --- .github/workflows/activity-status-review.yml | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/activity-status-review.yml diff --git a/.github/workflows/activity-status-review.yml b/.github/workflows/activity-status-review.yml new file mode 100644 index 000000000..380fb8810 --- /dev/null +++ b/.github/workflows/activity-status-review.yml @@ -0,0 +1,34 @@ +name: Activity Status Change Review + +on: + pull_request: + branches: [ master ] + paths: [ 'ontology/*.md' ] + +jobs: + check-activity-status: + runs-on: ubuntu-latest + if: github.triggering_actor != 'github-actions[bot]' + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Flag activity_status changes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BASE=${{ github.event.pull_request.base.sha }} + HEAD=${{ github.event.pull_request.head.sha }} + + git diff "$BASE" "$HEAD" -- 'ontology/*.md' | grep -qE '^\+activity_status:|^-activity_status:' || exit 0 + + gh api --method POST \ + "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \ + -f event="REQUEST_CHANGES" \ + -f body="### Activity Status Change Detected + + 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. + + 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." \ No newline at end of file