Skip to content

fix(cli): keep Link column aligned on runError rows in GitHub reporter - #1614

Open
shafiktanbir wants to merge 1 commit into
checkly:mainfrom
shafiktanbir:fix/github-reporter-run-error-columns
Open

shafiktanbir wants to merge 1 commit into
checkly:mainfrom
shafiktanbir:fix/github-reporter-run-error-columns

Conversation

@shafiktanbir

Copy link
Copy Markdown
Contributor

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

Notes for the Reviewer

In GithubMdBuilder.render() (packages/cli/src/reporters/github.ts), when testSessionId is set, the table header and unfinished (!result) rows include 6 columns (Result, Name, Check Type, Filename, Duration, Link), while finished rows only pushed a Link cell when testResultId was also truthy. Checks that fail with a runError have no testResultId, leaving those rows one column short (5 cells instead of 6).

Additionally, when hasFilenames is true and one check in checkFilesMap has no sourceFile, the Filename cell rendered literal `undefined` instead of -.

This pushes an empty Link cell when this.testSessionId is set without testResultId, falls back to - when sourceFile is missing under hasFilenames, updates the runError snapshot, and adds unit assertions in github-md-builder.spec.ts.

This branch has not been deployed

No deployments
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.

1 participant