-
[OPIK-4688] [INFRA] Auto-trigger FERN update on BE merge and notify #code-review (#5783)
发布于
2026-03-24 11:55:14 +00:00 - [OPIK-4688] [INFRA] Auto-trigger FERN update on BE merge and notify #code-review
- Trigger workflow on push to main when BE Java/OpenAPI/pom files change
- Add concurrency group to prevent parallel runs
- Extract merge author and originating PR for traceability
- Add PR body context linking back to the triggering BE merge
- Add notify-slack job that posts to #code-review via SLACK_WEBHOOK_URL_CODE_REVIEW
- Include Slack user mention mapping for author tagging
- Fail the workflow if Slack notification doesn't send successfully
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4688] [INFRA] Add contents:read permission for originating PR lookup
The gh API call to find the originating PR needs contents:read
permission at the job level.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4688] [INFRA] Add pull_request trigger for testing workflow
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4688] [INFRA] Remove job-level permissions that blocked branch creation
The remote-branch-action and create-pull-request steps need
contents:write via the default GITHUB_TOKEN. The explicit
contents:read restriction was blocking the push.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4688] [INFRA] Temporarily allow notify-slack on pull_request for testing
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4688] [INFRA] Add auto FERN update on BE merge with Slack notification
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 2: Fix jq syntax — use quoted keys for JSON objects
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 3: Fix jq — wrap blocks array in parentheses for concatenation
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 4: Address PR comments — refine path filter and remove pull_request trigger
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 5: Extract trigger context into separate job with scoped permissions
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 6: Add explicit permissions per job and skip Slack post for testing
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 7: Remove temporary PR testing triggers and Slack skip
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Claude Opus 4.6 noreply@anthropic.com
下载附件