Registry Mirror
Skip to content

Conversation

@bhushan4work

Copy link
Copy Markdown
Collaborator

What does this change?

Fixes the GitHub reporter so annotations point at the right file when chatcops test runs from a subfolder (e.g. a monorepo job with working-directory: site). When GITHUB_WORKSPACE is set, the reporter now writes file= relative to the workspace root instead of io.cwd, so annotations land on the correct file in the PR Files tab. Paths are normalized to forward slashes on Windows. Without GITHUB_WORKSPACE, output is unchanged.

Closes #599

How I tested this

  • Added a test in packages/cli/tests/github.test.ts with GITHUB_WORKSPACE set to the parent of the working folder; asserts the annotation emits file=site/evals/.... Confirmed it fails on unmodified dev and passes with the fix.
  • Added/kept a test asserting output is unchanged when GITHUB_WORKSPACE is absent.
  • Ran the GitHub reporter tests and pnpm -r typecheck for @chatcops/cli.

AI assistance

none

Checklist

  • This PR targets dev
  • I was assigned the linked issue
  • pnpm -r build, pnpm test and pnpm -r typecheck pass locally
  • Tests added or updated where it makes sense
  • For a bug fix: the new test fails without my change
  • Changeset added (pnpm changeset) if this changes core, widget or server
  • pnpm api run and api/ committed if an exported type or option changed
  • Docs updated if behavior or options changed

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @bhushan4work. With GITHUB_WORKSPACE set, the path now comes from the workspace, so a run in site/ writes file=site/evals/pricing.chat.yaml, and without it the output is the same as before. cwd reaches the reporter from io.cwd through the factory options, and api/cli.api.md has the new option. All checks pass, including e2e.

@anurag629
anurag629 merged commit 395096f into codercops:dev Nov 13, 2026
@anurag629

Copy link
Copy Markdown
Member

Merged, thanks @bhushan4work.

@github-actions github-actions Bot added the codercops-accepted Merged PR that counts on the monthly leaderboard (oss.codercops.com) label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codercops-accepted Merged PR that counts on the monthly leaderboard (oss.codercops.com)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: GitHub annotations point at the wrong file when chatcops test runs in a subfolder

2 participants