From 431ca4acfacf4fa722702560d9e4b5c998500d7b Mon Sep 17 00:00:00 2001 From: Usama Rahman Khan <96389500+hedge-urk@users.noreply.github.com> Date: Tue, 3 Nov 2026 17:59:46 +0500 Subject: [PATCH 1/3] ci: prepare HalvorAI Brain merged-PR notification --- .github/workflows/notify-brain.yml | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/notify-brain.yml diff --git a/.github/workflows/notify-brain.yml b/.github/workflows/notify-brain.yml new file mode 100644 index 0000000..150d5c6 --- /dev/null +++ b/.github/workflows/notify-brain.yml @@ -0,0 +1,51 @@ +# Proposes documentation updates in the private halvorai-brain repository. +# Disabled until BRAIN_SYNC_ENABLED is set to "true" in Actions variables. +# Uses the workflow on the default branch: no PR code is checked out/executed. +name: Notify HalvorAI Brain + +on: + pull_request_target: + types: [closed] + +permissions: + contents: read + +jobs: + notify-brain: + if: >- + ${{ github.event.pull_request.merged == true && + github.event.pull_request.base.ref == github.event.repository.default_branch && + vars.BRAIN_SYNC_ENABLED == 'true' }} + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Create short-lived token for Brain only + id: brain-token + uses: actions/create-github-app-token@v3 + with: + client-id: ${{ vars.BRAIN_APP_CLIENT_ID }} + private-key: ${{ secrets.BRAIN_APP_PRIVATE_KEY }} + owner: halvorAI + repositories: halvorai-brain + permission-contents: write + + - name: Notify Brain about merged PR + env: + GH_TOKEN: ${{ steps.brain-token.outputs.token }} + SOURCE_REPO: ${{ github.repository }} + PR_NUMBER: ${{ github.event.pull_request.number }} + MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }} + run: | + jq -n \ + --arg repo "$SOURCE_REPO" \ + --argjson pr "$PR_NUMBER" \ + --arg sha "$MERGE_SHA" \ + '{ + event_type: "product-pr-merged", + client_payload: { + repository: $repo, + pr_number: $pr, + merge_sha: $sha + } + }' | + gh api -X POST repos/halvorAI/halvorai-brain/dispatches --input - From 1da850c91d04f9fcb881db30e0a59776f977bb2c Mon Sep 17 00:00:00 2001 From: Usama Rahman Khan <96389500+hedge-urk@users.noreply.github.com> Date: Tue, 3 Nov 2026 18:38:57 +0500 Subject: [PATCH 2/3] docs: make Brain change summaries part of each product PR --- .github/PULL_REQUEST_TEMPLATE.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..c30924d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ + + +## Summary + + + +## Tests and verification + + + +## Brain update + + + +- What changed: +- Why: +- Affected APIs, schemas, SDKs, integrations, or behavior: +- Verification performed: +- Deployment status (merged code is not necessarily deployed): +- Known limitations and follow-up: + + From ca57bee503597ee3d5efd3524d5a2c4ee2069805 Mon Sep 17 00:00:00 2001 From: Usama Rahman Khan <96389500+hedge-urk@users.noreply.github.com> Date: Tue, 3 Nov 2026 19:37:08 +0500 Subject: [PATCH 3/3] ci: centralize Brain sync; source repo no longer needs workflow or secrets --- .github/workflows/notify-brain.yml | 51 ------------------------------ 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/notify-brain.yml diff --git a/.github/workflows/notify-brain.yml b/.github/workflows/notify-brain.yml deleted file mode 100644 index 150d5c6..0000000 --- a/.github/workflows/notify-brain.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Proposes documentation updates in the private halvorai-brain repository. -# Disabled until BRAIN_SYNC_ENABLED is set to "true" in Actions variables. -# Uses the workflow on the default branch: no PR code is checked out/executed. -name: Notify HalvorAI Brain - -on: - pull_request_target: - types: [closed] - -permissions: - contents: read - -jobs: - notify-brain: - if: >- - ${{ github.event.pull_request.merged == true && - github.event.pull_request.base.ref == github.event.repository.default_branch && - vars.BRAIN_SYNC_ENABLED == 'true' }} - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Create short-lived token for Brain only - id: brain-token - uses: actions/create-github-app-token@v3 - with: - client-id: ${{ vars.BRAIN_APP_CLIENT_ID }} - private-key: ${{ secrets.BRAIN_APP_PRIVATE_KEY }} - owner: halvorAI - repositories: halvorai-brain - permission-contents: write - - - name: Notify Brain about merged PR - env: - GH_TOKEN: ${{ steps.brain-token.outputs.token }} - SOURCE_REPO: ${{ github.repository }} - PR_NUMBER: ${{ github.event.pull_request.number }} - MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }} - run: | - jq -n \ - --arg repo "$SOURCE_REPO" \ - --argjson pr "$PR_NUMBER" \ - --arg sha "$MERGE_SHA" \ - '{ - event_type: "product-pr-merged", - client_payload: { - repository: $repo, - pr_number: $pr, - merge_sha: $sha - } - }' | - gh api -X POST repos/halvorAI/halvorai-brain/dispatches --input -