Skip to content

ci(alert-sync): adopt phenoShared reusable (-253 LOC) - #513

Merged
KooshaPari merged 1 commit into
mainfrom
ci/alert-sync-reusable
Apr 24, 2026
Merged

ci(alert-sync): adopt phenoShared reusable (-253 LOC)#513
KooshaPari merged 1 commit into
mainfrom
ci/alert-sync-reusable

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Apr 24, 2026

Copy link
Copy Markdown
Owner

User description

Replaces byte-identical 265-LOC .github/workflows/alert-sync-issues.yml with a thin caller to KooshaPari/phenoShared/.github/workflows/reusable/alert-sync-issues.yml, pinned to phenoShared#85 HEAD 6a6e1b06026e9443449e419a2892cd0e47c19442 for 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

  • Before: 265 LOC
  • After: 12 LOC
  • Delta: -253 LOC

Audit trail

  • Audit: phenoShared#182 (org-wide alert-sync-issues duplication, 15 repos × 265 LOC = 3975 LOC)
  • Pattern: same as Item: helios-cli 137 #135 (SHA-pinned caller for independent mergeability)
  • Post-merge: update @6a6e1b06026e9443449e419a2892cd0e47c19442@main once phenoShared#85 merges

Verification

  • yq parses new file
  • Schedule preserved: 17 * * * * hourly
  • workflow_dispatch trigger preserved
  • auto-label: auto-alert-sync input matches original behavior

Note

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-issues GitHub Actions workflow script with a thin wrapper that calls a reusable workflow from KooshaPari/phenoShared pinned to a specific commit.

The schedule and workflow_dispatch triggers are retained, and the caller passes auto-label: auto-alert-sync as 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

  • The alert-sync workflow now calls a shared reusable workflow instead of keeping the full logic in this repo
  • The scheduled hourly run and manual trigger are still available
  • The workflow still applies the auto-alert-sync label when it creates or updates synced issues

Impact

✅ 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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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.

…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).
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codeant-ai

codeant-ai Bot commented Apr 24, 2026

Copy link
Copy Markdown

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 ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Apr 24, 2026
@codeant-ai

codeant-ai Bot commented Apr 24, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

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.

Create PR

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@6a6e1b06026e9443449e419a2892cd0e47c19442

You 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit af132b6. Configure here.

@KooshaPari
KooshaPari merged commit 122ff5a into main Apr 24, 2026
15 of 19 checks passed
@KooshaPari
KooshaPari deleted the ci/alert-sync-reusable branch April 24, 2026 22:18
@codeant-ai

codeant-ai Bot commented May 5, 2026

Copy link
Copy Markdown

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 ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:XS This PR changes 0-9 lines, ignoring generated files and removed size:XS This PR changes 0-9 lines, ignoring generated files labels May 5, 2026
@codeant-ai

codeant-ai Bot commented May 5, 2026

Copy link
Copy Markdown

Sequence Diagram

This 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
Loading

Generated by CodeAnt AI

@codeant-ai

codeant-ai Bot commented May 5, 2026

Copy link
Copy Markdown

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 ·
Reddit ·
LinkedIn

@codeant-ai

codeant-ai Bot commented May 5, 2026

Copy link
Copy Markdown

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 ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:XS This PR changes 0-9 lines, ignoring generated files and removed size:XS This PR changes 0-9 lines, ignoring generated files labels May 5, 2026
@codeant-ai

codeant-ai Bot commented May 5, 2026

Copy link
Copy Markdown

Sequence Diagram

This 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
Loading

Generated by CodeAnt AI

@codeant-ai

codeant-ai Bot commented May 5, 2026

Copy link
Copy Markdown

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 ·
Reddit ·
LinkedIn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant