ci(alert-sync): adopt phenoShared reusable (-253 LOC) - #513
Conversation
…dation per audit #182) Replaces 265 LOC byte-identical workflow with ~12 LOC caller pinned to KooshaPari/phenoShared#85 HEAD (6a6e1b06026e9443449e419a2892cd0e47c19442). Part of org-wide consolidation: 15 repos × 265 LOC = 3975 LOC deleted, replaced by 15 × 12 LOC = 180 LOC callers. Net: -3795 LOC in this wave. Depends on: KooshaPari/phenoShared#85 (must merge first for caller to resolve).
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Missing permissions block for reusable workflow caller
- Added the required permissions block (actions:read, contents:read, issues:write, security-events:read) to restore the reusable workflow's ability to create/update/close issues and read security alerts.
Or push these changes by commenting:
@cursor push 9eda7abdee
Preview (9eda7abdee)
diff --git a/.github/workflows/alert-sync-issues.yml b/.github/workflows/alert-sync-issues.yml
--- a/.github/workflows/alert-sync-issues.yml
+++ b/.github/workflows/alert-sync-issues.yml
@@ -4,6 +4,12 @@
- cron: '17 * * * *'
workflow_dispatch:
+permissions:
+ actions: read
+ contents: read
+ issues: write
+ security-events: read
+
jobs:
sync:
uses: KooshaPari/phenoShared/.github/workflows/reusable/alert-sync-issues.yml@6a6e1b06026e9443449e419a2892cd0e47c19442You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit af132b6. Configure here.
| .write(); | ||
| uses: KooshaPari/phenoShared/.github/workflows/reusable/alert-sync-issues.yml@6a6e1b06026e9443449e419a2892cd0e47c19442 | ||
| with: | ||
| auto-label: auto-alert-sync |
There was a problem hiding this comment.
Missing permissions block for reusable workflow caller
High Severity
The alert-sync-issues.yml caller workflow no longer declares a permissions: block. This caps the reusable workflow's GITHUB_TOKEN scopes to the repository's default, potentially causing silent failures. The workflow needs issues: write, security-events: read, actions: read, and contents: read to create/update/close issues and read security alerts.
Reviewed by Cursor Bugbot for commit af132b6. Configure here.
|
CodeAnt AI is running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR replaces the in-repo alert sync GitHub Actions logic with a thin workflow that triggers a shared reusable workflow in phenoShared, while preserving the schedule, manual trigger, and auto-label behavior. sequenceDiagram
participant GitHubEvents
participant AlertSyncWorkflow
participant SharedAlertSync
participant GitHubAPIs
GitHubEvents->>AlertSyncWorkflow: Trigger on schedule or manual run
AlertSyncWorkflow->>SharedAlertSync: Call reusable workflow with auto-label input
SharedAlertSync->>GitHubAPIs: Read CI, dependabot, and code scanning alerts
SharedAlertSync->>GitHubAPIs: Create or update issues with auto alert sync label
SharedAlertSync->>GitHubAPIs: Close issues when alerts are resolved
Generated by CodeAnt AI |
|
CodeAnt AI finished running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI is running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR replaces the in-repo alert sync logic with a thin GitHub Actions workflow that triggers a reusable alert sync workflow from the shared phenoShared repository while preserving the existing schedule, manual trigger, and auto-label behavior. sequenceDiagram
participant Scheduler
participant Developer
participant RepoWorkflow as Repo alert sync workflow
participant SharedWorkflow as Shared alert sync workflow
participant GitHub as GitHub alerts and issues
Scheduler->>RepoWorkflow: Run on hourly schedule
Developer->>RepoWorkflow: Run via manual dispatch
RepoWorkflow->>SharedWorkflow: Call reusable alert sync with auto-label
SharedWorkflow->>GitHub: Fetch CI, Dependabot, and CodeQL alerts
SharedWorkflow->>GitHub: Create or update alert issues
SharedWorkflow->>GitHub: Close issues when alerts are resolved
Generated by CodeAnt AI |
|
CodeAnt AI finished running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |



User description
Replaces byte-identical 265-LOC
.github/workflows/alert-sync-issues.ymlwith a thin caller toKooshaPari/phenoShared/.github/workflows/reusable/alert-sync-issues.yml, pinned to phenoShared#85 HEAD6a6e1b06026e9443449e419a2892cd0e47c19442for independent mergeability.Prereq
Must merge KooshaPari/phenoShared#85 first. The reusable workflow lives on that PR's branch until it lands. Caller is SHA-pinned so this PR is reviewable today.
LOC delta
Audit trail
@6a6e1b06026e9443449e419a2892cd0e47c19442→@mainonce phenoShared#85 mergesVerification
yqparses new file17 * * * *hourlyworkflow_dispatchtrigger preservedauto-label: auto-alert-syncinput matches original behaviorNote
Medium Risk
Moderate risk because the repo now depends on an external, SHA-pinned reusable workflow for issue/alert syncing; behavior changes will come from that referenced workflow rather than local code.
Overview
Replaces the in-repo 265-line
alert-sync-issuesGitHub Actions workflow script with a thin wrapper that calls a reusable workflow fromKooshaPari/phenoSharedpinned to a specific commit.The schedule and
workflow_dispatchtriggers are retained, and the caller passesauto-label: auto-alert-syncas the only input.Reviewed by Cursor Bugbot for commit af132b6. Bugbot is set up for automated code reviews on this repo. Configure here.
CodeAnt-AI Description
Use a shared workflow for alert-to-issue syncing
What Changed
auto-alert-synclabel when it creates or updates synced issuesImpact
✅ Smaller workflow maintenance surface✅ Same alert sync schedule✅ Same manual run option🔄 Retrigger CodeAnt AI Review
Details
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.