Skip to content

ci(companion-check): run on PRs targeting dev#5339

Merged
Sg312 merged 1 commit into
devfrom
ci/companion-check-dev
Jul 1, 2026
Merged

ci(companion-check): run on PRs targeting dev#5339
Sg312 merged 1 commit into
devfrom
ci/companion-check-dev

Conversation

@Sg312

@Sg312 Sg312 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds dev to the branch filters of the companion-pr-check workflow. Feature PRs now target dev on both simstudioai repos, so the cross-repo companion lockstep warning must fire there too — previously the check only ran for PRs targeting staging/main.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: CI workflow config

Testing

Self-validating: this PR targets dev, and the companion check ran and passed on it (GitHub evaluates pull_request workflows from the PR merge ref, so the updated filter applies to this PR itself). Cross-linked with the mothership companion below, which shows the same green check.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing — n/a, CI config only
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Companion PR

Companion: https://github.com/simstudioai/mothership/pull/339

Feature PRs now target dev on both repos, so the companion lockstep
check must fire there too (trigger filter + manual re-scan loop).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 1, 2026 11:09pm

Request Review

@github-actions github-actions Bot added the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ Cross-repo companion check

One or more companion PRs aren't merged into dev yet. Merging this without them will leave copilot and sim out of sync — merge them in lockstep.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends the companion-pr-check workflow to also fire on PRs targeting the dev branch, in addition to staging and main. The change is minimal and consistent: both the pull_request trigger's branches filter and the workflow_dispatch manual-scan array are updated in lockstep, and relevant comments are refreshed.

  • dev PRs now receive the same companion-check treatment as staging PRs (body-only scan, no commit aggregation), which is the correct behavior given dev is a feature-integration branch rather than a release bundle.
  • The tierOk validation (cp.base.ref === base) naturally handles dev companions without any additional changes.
  • One inline comment in collectCompanions still only names staging as the "single feature" case and would benefit from including dev.

Confidence Score: 5/5

Straightforward additive change to a non-blocking CI workflow; no production code is touched.

All three change sites (trigger filter, manual-scan list, comments) are updated consistently. The dev branch follows the same code path as staging, which is appropriate. The workflow is explicitly non-blocking, so any edge case here has no downstream impact on mergeability.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/companion-pr-check.yml Adds dev to the PR trigger branches and workflow_dispatch branch list; also updates two comments. Logic for dev PRs mirrors staging: single-body companion scan with no commit aggregation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR opened / edited / synchronize] --> B{Target branch?}
    B -->|dev / staging / main| C[Run companion-pr-check job]
    B -->|other| D[Workflow skipped]
    C --> E[collectCompanions]
    E --> F{base.ref == 'main'?}
    F -->|Yes| G[Parse PR body + aggregate from squash-merged feature PRs]
    F -->|No: dev or staging| H[Parse PR body only]
    G --> I[checkPR: verify each companion via CROSS_REPO_TOKEN]
    H --> I
    I --> J{companions found?}
    J -->|No| K[Delete sticky comment + remove label]
    J -->|Yes| L[For each companion: check merged state & tier]
    L --> M{tierOk? cp.base.ref == base?}
    M -->|Yes, merged| N[✅ comment line]
    M -->|No or not merged| O[⚠️ / ❌ comment line]
    N --> P[Upsert sticky comment on PR]
    O --> P
    WD[workflow_dispatch] --> Q[Scan all open PRs on dev / staging / main]
    Q --> C
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[PR opened / edited / synchronize] --> B{Target branch?}
    B -->|dev / staging / main| C[Run companion-pr-check job]
    B -->|other| D[Workflow skipped]
    C --> E[collectCompanions]
    E --> F{base.ref == 'main'?}
    F -->|Yes| G[Parse PR body + aggregate from squash-merged feature PRs]
    F -->|No: dev or staging| H[Parse PR body only]
    G --> I[checkPR: verify each companion via CROSS_REPO_TOKEN]
    H --> I
    I --> J{companions found?}
    J -->|No| K[Delete sticky comment + remove label]
    J -->|Yes| L[For each companion: check merged state & tier]
    L --> M{tierOk? cp.base.ref == base?}
    M -->|Yes, merged| N[✅ comment line]
    M -->|No or not merged| O[⚠️ / ❌ comment line]
    N --> P[Upsert sticky comment on PR]
    O --> P
    WD[workflow_dispatch] --> Q[Scan all open PRs on dev / staging / main]
    Q --> C
Loading

Comments Outside Diff (1)

  1. .github/workflows/companion-pr-check.yml, line 124 (link)

    P2 The inline comment still only mentions staging as the "single feature" case, but dev PRs now also take this path. A quick update keeps the docs accurate as the branch list grows.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "ci(companion-check): run on PRs targetin..." | Re-trigger Greptile

@Sg312 Sg312 merged commit b52191e into dev Jul 1, 2026
12 of 13 checks passed
@Sg312 Sg312 deleted the ci/companion-check-dev branch July 1, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant