Skip to content

feat: add --test-report flag and fix PyGithub auth#35

Open
YuanYuYuan wants to merge 1 commit into
ros-tooling:mainfrom
YuanYuYuan:feat/test-report
Open

feat: add --test-report flag and fix PyGithub auth#35
YuanYuYuan wants to merge 1 commit into
ros-tooling:mainfrom
YuanYuYuan:feat/test-report

Conversation

@YuanYuYuan

@YuanYuYuan YuanYuYuan commented Jun 5, 2026

Copy link
Copy Markdown

Summary

  • Fix PyGithub >= 2.0 compatibility: the deprecated Github(token) positional argument no longer authenticates; switch to Github(auth=Auth.Token(token))
  • Add --test-report <ci_launcher_url> flag to fetch JUnit results from a completed ci_launcher run and post a structured summary comment on the PR

Key Changes

  • ros_github_scripts/ci_for_pr.py: PyGithub auth fix; new --test-report flag with parse_child_build_urls, fetch_child_build_urls, fetch_test_report, and format_test_report_comment helpers

Example output

--test-report posts a comment like this one on ros2/rmw_zenoh#987:
ros2/rmw_zenoh#987 (comment)

The comment includes:

  • A summary table with pass/fail counts, build duration, and a direct link to each platform's test report page
  • Collapsible per-platform failure tables sorted by package name

Usage

# Step 1 — trigger the build (existing flow)
ros-ci-for-pr --pulls ros2/rmw_zenoh#987 --target lyrical --packages rmw_zenoh_cpp --build --comment

# Step 2 — after builds complete (~1-2h), post the test report
ros-ci-for-pr --pulls ros2/rmw_zenoh#987 --test-report https://ci.ros2.org/job/ci_launcher/19468 --comment

Fix PyGithub >= 2.0 compatibility: the deprecated Github(token)
positional argument no longer authenticates; switch to
Github(auth=Auth.Token(token)).

Add --test-report <ci_launcher_url> to fetch JUnit results from a
completed ci_launcher run and post a structured summary comment on the
PR. The comment includes:
- A summary table with pass/fail counts, build duration per platform,
  and a direct link to each platform's /testReport/ page
- Collapsible per-platform failure tables sorted by package name
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