Skip to content

ci(test): skip coverage comment on fork PRs#409

Closed
juftin wants to merge 1 commit into
mainfrom
ci/skip-coverage-comment-on-forks
Closed

ci(test): skip coverage comment on fork PRs#409
juftin wants to merge 1 commit into
mainfrom
ci/skip-coverage-comment-on-forks

Conversation

@juftin
Copy link
Copy Markdown
Owner

@juftin juftin commented May 24, 2026

Problem

When external contributors submit PRs from forks, the pytest-coverage-comment action fails with HttpError: Resource not accessible by integration.

This is because GitHub overrides GITHUB_TOKEN permissions for first-time contributor fork PRs, preventing the action from posting PR comments — even though the workflow declares pull-requests: write.

The result is a false CI failure unrelated to the submitted code.

Fix

Only run the coverage comment step on PRs from the main repo (juftin/camply), skipping external forks entirely. Coverage still generates locally — it just won't attempt post a PR comment on fork PRs.

Testing

Driven by PR #407 — a legitimate fork PR blocked by this despite all 108 tests passing.

The pytest-coverage-comment action fails when run on fork PRs from
first-time contributors because GITHUB_TOKEN lacks write access to
post PR comments on those events. This causes a false CI failure.

Only attempt to post coverage comments on PRs from the main repo
(juftin/camply) and skip them for external forks.
@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py60100% 
__main__.py110%5
cli.py3025681%62, 64, 69, 73, 75, 182–185, 230, 233, 237–238, 240, 277, 280, 289, 334, 338, 505–514, 579, 653, 657, 788–791, 794–795, 820–828, 857, 860, 863–864, 882–885, 887
exceptions.py30100% 
config
   __init__.py60100% 
   api_config.py940100% 
   data_columns.py240100% 
   file_config.py140100% 
   logging_config.py27581%31, 49, 67, 70–71
   notification_config.py540100% 
   search_config.py330100% 
containers
   __init__.py30100% 
   api_responses.py2441295%83, 113–114, 116, 146–147, 149, 179–181, 184, 186
   base_container.py23195%38
   data_containers.py74297%36, 48
   examples.py30100% 
   gtc_api_responses.py100100% 
   search_model.py460100% 
   usedirect.py2570100% 
notifications
   __init__.py100100% 
   apprise.py332233%22–26, 30, 35, 40–44, 54, 67–68, 71–77
   base_notifications.py38294%59, 70
   email_notifications.py594032%36, 38, 45–46, 49, 55–56, 58, 62–63, 67, 84–99, 109–111, 114–123
   multi_provider_notifications.py531669%56, 59, 62–63, 65, 82–83, 107, 120–123, 127–130
   ntfy.py301936%23–25, 29–30, 44, 52–55, 59–60, 70–71, 74–78
   pushbullet.py372629%23–28, 33–34, 48–50, 53–54, 58–61, 65–66, 76–77, 80–84
   pushover.py431076%29, 35–36, 39, 66–67, 71, 83, 86–87
   silent_notifications.py160100% 
   slack.py443325%23–26, 31–32, 46–47, 50–51, 54–55, 59–62, 66–67, 77–78, 81–83, 89–90, 92–93, 100–101, 111–113, 119
   telegram.py433030%23–25, 33, 38–39, 54–63, 67–68, 83, 103–105, 115–116, 119–124
   twilio.py342332%22–26, 30, 38, 43–47, 59–60, 72–73, 76–82
   webhook.py301743%26–32, 39–40, 46, 56–61, 65
providers
   __init__.py90100% 
   base_provider.py52786%79, 110–111, 164–167
providers/going_to_camp
   __init__.py00100% 
   going_to_camp_provider.py1932487%66, 73–75, 79, 81, 83, 129, 132, 186, 275–276, 304, 321, 343–345, 391–394, 399, 564, 568
   rec_areas.py20100% 
providers/recreation_dot_gov
   __init__.py00100% 
   recdotgov_camps.py851187%57–58, 117–118, 121, 136–137, 140–141, 149–150
   recdotgov_provider.py2923687%56, 70, 78, 86, 94, 102, 110, 118, 143–144, 152, 155, 216, 378, 381–382, 406, 451–455, 503–504, 532–533, 647–651, 674–675, 698–699, 799
   recdotgov_tours.py1482980%48, 56, 154–155, 158–159, 162–163, 260–267, 271–279, 282–283, 295–296
providers/usedirect
   __init__.py20100% 
   usedirect.py2533685%76, 84, 92, 100, 146, 150, 153, 188, 196, 200, 338–339, 454, 456, 502–504, 508, 510, 513, 620, 720–728, 732–733, 739–741, 758
   variations.py770100% 
providers/xanterra
   __init__.py00100% 
   yellowstone_lodging.py1751690%56, 67, 103, 107–108, 130–131, 140, 275, 284, 360, 410, 413, 427, 447, 523
search
   __init__.py80100% 
   base_search.py3464287%108, 267, 270–271, 273, 276–277, 297, 301, 406, 409, 411, 414, 420, 428–430, 449–452, 456–458, 460–461, 522, 525–526, 528, 585–588, 634, 641–642, 776, 781, 990, 999, 1001
   search_going_to_camp.py761580%40, 103–104, 106, 109, 119–120, 125, 180, 221, 225, 228–229, 246, 258
   search_recreationdotgov.py140894%135, 163, 173, 241–243, 329, 380
   search_usedirect.py94792%47, 95–96, 99, 112–113, 115
   search_yellowstone.py60788%118, 122, 127–128, 167–168, 178
utils
   __init__.py40100% 
   api_utils.py211338%68–77, 80–82
   configure_camply.py584424%28–31, 33–34, 47–48, 52, 54, 66–71, 75–81, 93, 98–103, 110–111, 115–116, 119–121, 124, 129–132, 136–137
   general_utils.py42490%66–67, 69, 73
   logging_utils.py38392%48–49, 51
   yaml_utils.py47882%66–71, 74–75
TOTAL391662584% 

Tests Skipped Failures Errors Time
108 0 💤 0 ❌ 0 🔥 1m 7s ⏱️

@juftin juftin closed this May 24, 2026
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