Skip to content

chore(ci): prune upstream workflows and add upstream sync - #61

Merged
terisuke merged 1 commit into
devfrom
chore/ci-cleanup-for-fork
Apr 5, 2026
Merged

chore(ci): prune upstream workflows and add upstream sync#61
terisuke merged 1 commit into
devfrom
chore/ci-cleanup-for-fork

Conversation

@terisuke

Copy link
Copy Markdown

Summary

Closes#60

  • Remove 27 upstream-only workflows not needed for internal fork
  • Simplify test.yml: Linux only (remove Windows matrix)
  • Add upstream-sync.yml: weekly sync from anomalyco/opencode excluding .github/workflows/

Kept workflows (5)

  • typecheck.yml — type checking on PR
  • test.yml — unit + e2e on Linux only
  • pr-standards.yml — PR title/format validation
  • pr-management.yml — duplicate check + labels
  • generate.yml — code generation on dev push

Added workflows (1)

  • upstream-sync.yml — weekly fetch from upstream, creates PR with workflow directory excluded

Removed workflows (27)

deploy, publish, beta, nix-eval, nix-hashes, containers, storybook,
discord, vouch (3), triage, review, opencode, stats, docs (2),
daily recaps (2), close-issues, close-stale-prs, compliance-close,
duplicate-issues, publish-vscode, publish-github-action,
release-github-action, sync-zed-extension

🤖 Generated with Claude Code

Remove 27 upstream-only workflows not needed for internal fork.
Keep: typecheck, test (linux only), pr-standards, pr-management, generate.
Add: upstream-sync workflow (weekly, excludes .github/workflows/).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings April 5, 2026 06:49
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

CopilotAI 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.

Pull request overview

This PR streamlines CI for the internal fork by removing upstream-only GitHub Actions workflows, simplifying the remaining test workflow to Linux-only, and adding an automated upstream synchronization workflow that preserves the fork’s custom workflows.

Changes:

  • Removed 27 upstream-only workflows to declutter Actions and avoid failing/irrelevant runs in the fork.
  • Simplified .github/workflows/test.yml to run unit + e2e on Linux only (no Windows matrix).
  • Added .github/workflows/upstream-sync.yml to periodically merge anomalyco/opencode changes into dev while excluding .github/workflows/.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
.github/workflows/upstream-sync.ymlNew scheduled/manual workflow to sync upstream dev into fork dev while discarding workflow directory changes.
.github/workflows/test.ymlRemoves Windows matrix and hardcodes Linux runner + artifact/check naming.
.github/workflows/vouch-manage-by-issue.ymlRemoved upstream-only vouch management workflow.
.github/workflows/vouch-check-pr.ymlRemoved upstream-only vouch PR gate workflow.
.github/workflows/vouch-check-issue.ymlRemoved upstream-only vouch issue gate workflow.
.github/workflows/triage.ymlRemoved upstream-only issue triage automation workflow.
.github/workflows/sync-zed-extension.ymlRemoved upstream-only Zed extension sync workflow.
.github/workflows/storybook.ymlRemoved upstream-only Storybook build workflow.
.github/workflows/stats.ymlRemoved upstream-only stats generation workflow.
.github/workflows/review.ymlRemoved upstream-only AI review workflow.
.github/workflows/release-github-action.ymlRemoved upstream-only GitHub Action release workflow.
.github/workflows/publish.ymlRemoved upstream-only publish/release pipeline workflow.
.github/workflows/publish-vscode.ymlRemoved upstream-only VS Code publish workflow.
.github/workflows/publish-github-action.ymlRemoved upstream-only GitHub Action publish workflow.
.github/workflows/opencode.ymlRemoved upstream-only opencode command workflow.
.github/workflows/notify-discord.ymlRemoved upstream-only Discord notification workflow.
.github/workflows/nix-hashes.ymlRemoved upstream-only Nix hashes workflow.
.github/workflows/nix-eval.ymlRemoved upstream-only Nix evaluation workflow.
.github/workflows/duplicate-issues.ymlRemoved upstream-only duplicate-issues workflow.
.github/workflows/docs-update.ymlRemoved upstream-only docs update automation workflow.
.github/workflows/docs-locale-sync.ymlRemoved upstream-only docs locale sync workflow.
.github/workflows/deploy.ymlRemoved upstream-only deploy workflow.
.github/workflows/daily-pr-recap.ymlRemoved upstream-only daily PR recap workflow.
.github/workflows/daily-issues-recap.ymlRemoved upstream-only daily issues recap workflow.
.github/workflows/containers.ymlRemoved upstream-only containers build workflow.
.github/workflows/compliance-close.ymlRemoved upstream-only compliance auto-close workflow.
.github/workflows/close-stale-prs.ymlRemoved upstream-only stale PR closer workflow.
.github/workflows/close-issues.ymlRemoved upstream-only stale issues closer workflow.
.github/workflows/beta.ymlRemoved upstream-only beta sync workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +33 to +36
git merge upstream/dev --no-commit --no-ff || true

# Restore our fork's workflows (discard upstream workflow changes)
git checkout HEAD -- .github/workflows/ || true

CopilotAIApr 5, 2026

Copy link

Choose a reason for hiding this comment

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

git merge upstream/dev --no-commit --no-ff || true will mask merge failures/conflicts and then subsequent steps continue in a potentially conflicted state (and git commit will fail with unmerged paths). Consider removing the || true and explicitly handling conflicts (e.g., abort the merge and exit non-zero with a clear message) so the workflow fails fast and predictably when upstream can’t be merged cleanly.

Suggested change
git merge upstream/dev --no-commit --no-ff || true
# Restore our fork's workflows (discard upstream workflow changes)
git checkout HEAD -- .github/workflows/ || true
if ! git merge upstream/dev --no-commit --no-ff; then
echo "Failed to merge upstream/dev cleanly; aborting sync."
git merge --abort || true
exit 1
fi
# Restore our fork's workflows (discard upstream workflow changes)
git checkout HEAD -- .github/workflows/

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +42
# Check if there are actual changes to commit
if git diff --cached --quiet && git diff --quiet; then
echo "No changes to sync"
exit 0
fi

CopilotAIApr 5, 2026

Copy link

Choose a reason for hiding this comment

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

The “No changes to sync” path exits the merge step successfully, but the job will still proceed to “Create PR”, creating/pushing an empty branch and opening a no-op PR. Suggest setting an output/env flag when a commit is created (or when diffs exist) and add an if: condition on the PR-creation step so it only runs when there are actual changes.

Copilot uses AI. Check for mistakes.
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="chore/upstream-sync-$(date +%Y%m%d)"

CopilotAIApr 5, 2026

Copy link

Choose a reason for hiding this comment

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

BRANCH="chore/upstream-sync-$(date +%Y%m%d)" can collide on reruns (manual dispatch, retries, or multiple runs in a day), causing git push or gh pr create to fail. Consider including github.run_id/github.run_attempt or a timestamp with time-of-day, or detect and reuse/update an existing branch/PR for the day.

Suggested change
BRANCH="chore/upstream-sync-$(date +%Y%m%d)"
BRANCH="chore/upstream-sync-$(date +%Y%m%d)-${{ github.run_id }}-${{ github.run_attempt }}"

Copilot uses AI. Check for mistakes.
@terisuke
terisuke merged commit 869eed2 into devApr 5, 2026
8 of 12 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(ci): prune upstream workflows and add upstream sync for fork

2 participants

@terisuke