Skip to content

feat: add GitHub test session metadata [ship]#1378

Merged
thebiglabasky merged 5 commits into
mainfrom
herve/github-test-session-metadata
Jul 4, 2026
Merged

feat: add GitHub test session metadata [ship]#1378
thebiglabasky merged 5 commits into
mainfrom
herve/github-test-session-metadata

Conversation

@thebiglabasky

@thebiglabasky thebiglabasky commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds optional GitHub Actions metadata to CLI test-session payloads so detached checkly test and checkly trigger runs can be associated with a GitHub workflow run.

The CLI now:

  • reads explicit CHECKLY_GITHUB_* environment variables only when CHECKLY_GITHUB_REPORT=true
  • includes the metadata under repoInfo.github
  • falls back to CHECKLY_GITHUB_SHA and CHECKLY_GITHUB_REPOSITORY for the existing repo info fields when needed
  • forwards the GitHub metadata for both detached test-session run and trigger payloads

Why

This supports the packaged GitHub Action flow where the Action can pass trusted workflow metadata to the backend, while direct npx checkly ... usage remains unchanged unless users explicitly set the Checkly-scoped env vars.

Validation

  • pnpm exec vitest --run src/services/__tests__/util.spec.ts src/rest/__tests__/test-sessions.spec.ts --reporter=verbose
  • pnpm run lint -- packages/cli/src/services/util.ts packages/cli/src/rest/test-sessions.ts packages/cli/src/services/__tests__/util.spec.ts packages/cli/src/rest/__tests__/test-sessions.spec.ts

Linear

@thebiglabasky thebiglabasky added build Issue regarding building and packaging and removed build Issue regarding building and packaging labels Jul 2, 2026
thebiglabasky and others added 3 commits July 2, 2026 17:23
The gate only matched the exact lowercase string 'true', so a user
exporting TRUE or 1 got a silent no-op. Accept true/1 case-insensitively
(trimmed); everything else still disables the github metadata block.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thebiglabasky thebiglabasky marked this pull request as ready for review July 4, 2026 08:49
@thebiglabasky thebiglabasky enabled auto-merge (squash) July 4, 2026 14:33
@thebiglabasky thebiglabasky changed the title feat: add GitHub test session metadata feat: add GitHub test session metadata [ship] Jul 4, 2026

@github-actions github-actions Bot 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.

Auto-approved: ship/show PR from a same-repo branch.

@thebiglabasky thebiglabasky merged commit fd9d079 into main Jul 4, 2026
15 checks passed
@thebiglabasky thebiglabasky deleted the herve/github-test-session-metadata branch July 4, 2026 14:37
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