Skip to content

ci: auto lint/format fix in CI + test with bad formatting#172

Open
snomiao wants to merge 12 commits intomainfrom
sno-fix-msg-post-2026-02-18
Open

ci: auto lint/format fix in CI + test with bad formatting#172
snomiao wants to merge 12 commits intomainfrom
sno-fix-msg-post-2026-02-18

Conversation

@snomiao
Copy link
Copy Markdown
Member

@snomiao snomiao commented Feb 19, 2026

Summary

  • Adds oxlint --fix and oxfmt --write to CI, auto-committing any fixes back to the branch
  • Intentionally bad formatting in lib/slack/index.ts to verify the auto-fix works

Test plan

  • CI should detect unformatted code and commit a fix automatically

Copilot AI review requested due to automatic review settings February 19, 2026 05:27
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 19, 2026

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

Project Deployment Actions Updated (UTC)
comfy-pr Ready Ready Preview, Comment Mar 21, 2026 6:00pm

Request Review

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 19, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds automated linting and formatting fixes to the CI test workflow. When pull requests are created, the workflow will automatically run oxlint --fix and oxfmt --write, commit any fixes, and push them back to the PR branch before running tests.

Changes:

  • Added oxlint --fix and oxfmt --write commands to auto-fix code style issues
  • Added auto-commit step that commits and pushes formatting fixes back to the PR branch
  • Added contents: write permission to allow the workflow to push commits
  • Renamed job from run_comfy_pr to comfy_pr_test for clarity

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

contents: write
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The checkout action needs to be configured to checkout the PR branch with proper ref when running on pull_request events. By default, actions/checkout@v4 checks out a merge commit in pull_request context, which prevents pushing back to the PR branch. You should add ref: ${{ github.head_ref }} to the checkout step to ensure the actual PR branch is checked out, allowing the auto-commit to work properly.

Copilot uses AI. Check for mistakes.
snomiao and others added 4 commits March 17, 2026 11:54
…gs and author tagging (#179)

* feat(backport): improve backport notifications with persistent warnings and author tagging

- Replace fixed maxReleasesToCheck with version-based filtering (4 minor versions behind)
- Add core-backport-not-needed and cloud-backport-not-needed label support
- Tag PR authors in Slack backport notifications
- Fall back to release sheriff (from #frontend-releases channel description) for external contributors
- Fix pre-existing TS errors in bot/slack-bot.ts, $pipeline.ts, EmailTasks.ts, filterDebugMessages.ts
- Add comprehensive tests for new functionality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(backport): add --dry-run flag and graceful error handling for compare API

- Add --dry-run CLI flag to preview output without sending Slack messages
- Skip Slack user lookups in dry-run mode (show @github-username instead)
- Gracefully handle 404s from GitHub compare API (skip failed releases instead of crashing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(test): add missing upsertSlackMarkdownMessage to mock in desktop-release spec

The mock.module() for upsertSlackMessage only included upsertSlackMessage
but not upsertSlackMarkdownMessage or mdFmt. When bun runs the test suite
and gh-frontend-backport-checker tests run after desktop-release tests,
the module mock is still active without the export, causing a SyntaxError.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(backport): guard profile.real_name against undefined before .replace()

Optional chaining on .toLowerCase() returns undefined when real_name is
missing, causing .replace() to throw. Normalize to empty string first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(backport): paginate through all Slack users instead of only first 500

slack.users.list() returns at most one page of 500 users; large workspaces
would silently fail to find authors beyond the first page. Now loops using
response_metadata.next_cursor until all pages are fetched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(backport): use <= for version-distance filter so releases exactly N behind are included

The previous < comparison excluded releases exactly maxMinorVersionsBehind
behind the latest. The PR intent is to include those releases, so <= is correct.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(backport): remove redundant filter in targetBranches

branchName already came from labels.filter(reBackportTargets), so
labels.some(...includes(branchName)) was always true. Remove the no-op.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(bot): remove duplicate ANSI escape regex in filterDebugMessages

Lines 36 and 37 had identical patterns. Remove the duplicate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: format code with prettier (no logic changes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(test): align version-distance filter test with <= boundary change

The test used < (strict) to mirror the old production code, but d0fd106
changed production to <=. Update the test to match: v1.36.0 (exactly 4
behind latest) is now expected to be included.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(slack): handle integer-only timestamps in slackTsToISO

Channel creation timestamps from Slack API are plain Unix seconds
(e.g. "1234567890") with no decimal/microseconds part. Splitting
on "." leaves microseconds undefined, causing a crash.

Default microseconds to "000" when the decimal part is absent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(backport): cache Slack member list and set bugfixCommits on failure

Two fixes per Copilot review:

1. Cache the Slack workspace member list with a run-scoped promise so
   findSlackUserIdByGithubUsername doesn't paginate through all members
   on every author lookup (avoids repeated full-directory scans and
   Slack rate-limit exposure).

2. Include bugfixCommits: [] when saving a failed compareCommits task
   so downstream callers that flatMap over bugfixCommits get a consistent
   array shape regardless of task status.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(backport): add detailed doc comment and comprehensive edge-case tests

Add thorough documentation comment at top of index.ts explaining the
full workflow and all edge cases. Export middleTruncated and
getBackportStatusEmoji for testing. Add 12 new test suites covering
missing edge cases: middleTruncated, emoji mapping, backport commit
filtering, bot comment regex, overall status derivation, compare link
parsing, branch name generation, processSince filtering, targetBranches
guard, idempotent Slack updates, author tag filtering, and report
status categorization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(backport): format code and use slackCached for member lookups

Prettier formatting changes. Switch slack.users.list to
slackCached.users.list for Slack member lookups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…#183)

Rename backport dismissal labels for clarity:
- `core-backport-not-needed` → `no-backport-needed-core`
- `cloud-backport-not-needed` → `no-backport-needed-cloud`
- Add general `no-backport-needed` label that dismisses all targets

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
The CI auto-commit step triggered the husky pre-commit hook which runs
typecheck and lint. This caused the CI to fail because the hook is meant
for developer commits, not bot auto-format commits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
comfy-pr-bot and others added 5 commits March 19, 2026 23:46
* fix: resolve TS2589 deep type instantiation in zChatCompletion calls

Create lib/zChat.ts wrapper with simplified options type to avoid
"Type instantiation is excessively deep" errors caused by
Partial<ChatCompletionCreateParamsNonStreaming> from OpenAI types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: add .logs to gitignore and remove stale TODO

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: improve slack bot message processing and terminal output cleaning

- Add cleanTerminalOutput() to filter ANSI codes, debug prefixes, system paths
- Add JSONL logging for response debugging
- Parse attachment text and resolve channel names from from_url
- Apply linter auto-fixes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add video read skill with Gemini 2.5 Flash and GPT-4o support

Add reusable video analysis capability via `prbot video read` CLI command.
Gemini path sends native video inline data; GPT-4o path extracts frames
with ffmpeg. Supports local files and Slack-hosted videos (--slack-file,
--slack-url). Auto-generates .md report file alongside the video.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: snomiao <snomiao@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- Add [skip ci] to auto-fix commit message to prevent CI loop
- Add same-repo guard so push only runs for non-fork PRs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants