ci: auto lint/format fix in CI + test with bad formatting#172
ci: auto lint/format fix in CI + test with bad formatting#172
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
There was a problem hiding this comment.
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 --fixandoxfmt --writecommands to auto-fix code style issues - Added auto-commit step that commits and pushes formatting fixes back to the PR branch
- Added
contents: writepermission to allow the workflow to push commits - Renamed job from
run_comfy_prtocomfy_pr_testfor 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 |
There was a problem hiding this comment.
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.
f1fda78 to
7a98c87
Compare
…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>
…mfy-PR into sno-fix-msg-post-2026-02-18
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>
* 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>
…y-Org/Comfy-PR into sno-fix-msg-post-2026-02-18
- 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>
Summary
oxlint --fixandoxfmt --writeto CI, auto-committing any fixes back to the branchlib/slack/index.tsto verify the auto-fix worksTest plan