Skip to content

Add tests for repository-level instrumentation#3025

Merged
plengauer merged 3 commits intomainfrom
copilot/add-tests-repo-instrumentation
Mar 3, 2026
Merged

Add tests for repository-level instrumentation#3025
plengauer merged 3 commits intomainfrom
copilot/add-tests-repo-instrumentation

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

No test coverage existed for actions/instrument/repository — unlike workflow and checksuite instrumentation which already had smoke tests in test_github.yml.

Changes

  • repository-smoke job: Runs the repository action with the ambient workflow_call event context, validating the always-executed path (dependency install, resource attributes, contributor count metric).

  • Individual event jobs (each needs: repository-smoke): One job per event type, each passing a minimal static event_body JSON to exercise the corresponding branch in main.sh:

    Job event_name event_action Code path exercised
    repository-pull-request-opened pull_request opened vcs.change.count +1
    repository-pull-request-closed pull_request closed no merge — vcs.change.duration
    repository-pull-request-merged pull_request closed merged — vcs.change.time_to_merge
    repository-pull-request-reopened pull_request reopened change state toggle
    repository-pull-request-review-submitted pull_request_review submitted vcs.change.time_to_approval (approved)
    repository-create create vcs.ref.count +1
    repository-delete delete vcs.ref.count -1
    repository-push push push without base_ref (no GitHub API comparison call)

All jobs use console exporters + OTEL_SHELL_SDK_OUTPUT_REDIRECT: /dev/null; no output assertions, consistent with the checksuite-smoke pattern.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add tests for repo level instrumentation</issue_title>
<issue_description>Add smoke tests for repository level instrumentations, as well as depending tests that's inflated the individual events by manually setting inputs to static jsons. These tests, similar to the worklow and checksuite level tests need not assert any output, but rather simply run the action</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: plengauer <100447901+plengauer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add smoke tests for repository level instrumentation Add tests for repository-level instrumentation Feb 28, 2026
Copy link
Owner

@plengauer plengauer left a comment

Choose a reason for hiding this comment

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

@copilot split these non smoke tests au into individual jobs

Co-authored-by: plengauer <100447901+plengauer@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 28, 2026

@copilot split these non smoke tests au into individual jobs

Done in 04606d2. The single repository job has been replaced with 8 individual jobs (repository-pull-request-opened, repository-pull-request-closed, repository-pull-request-merged, repository-pull-request-reopened, repository-pull-request-review-submitted, repository-create, repository-delete, repository-push), each depending on repository-smoke.

@plengauer plengauer marked this pull request as ready for review February 28, 2026 09:14
@plengauer plengauer requested a review from moflwi as a code owner February 28, 2026 09:14
Copilot AI review requested due to automatic review settings February 28, 2026 09:14
@plengauer plengauer enabled auto-merge (squash) February 28, 2026 09:14
Copy link
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

Adds GitHub Actions smoke coverage for repository-level instrumentation (previously untested), aligning it with existing workflow/checksuite smoke coverage in this repo’s CI.

Changes:

  • Adds a repository-smoke job that runs ./actions/instrument/repository under the ambient workflow_call context to exercise the always-executed path.
  • Adds per-event jobs (all needs: repository-smoke) that run the repository action with minimal static event_body JSON to hit key branches in actions/instrument/repository/main.sh.

@plengauer plengauer merged commit 1aeac7e into main Mar 3, 2026
1127 of 1129 checks passed
@plengauer plengauer deleted the copilot/add-tests-repo-instrumentation branch March 3, 2026 18:24
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.

Add tests for repo level instrumentation

4 participants