[PR #91] [MERGED] fix: add null check for repository field in updateCNReposInfo #89

Closed
opened 2026-10-27 21:09:28 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/91
Author: @snomiao
Created: 10/22/2025
Status: ✅ Merged
Merged: 10/22/2025
Merged by: @snomiao

Base: main ← Head: sno-fix-pr-hourly-ci


📝 Commits (1)

  • 4ff6d66 fix: add null check for repository field in updateCNReposInfo

📊 Changes

1 file changed (+8 additions, -0 deletions)

View changed files

📝 src/updateCNReposInfo.ts (+8 -0)

📄 Description

Summary

  • Adds a filter to skip processing CNRepos documents with null, undefined, or empty repository fields
  • Prevents TypeError: null is not an object (evaluating 'gitUrl.replace') in parseGithubRepoUrl()
  • Complements recent fixes in #87 and #85 for handling invalid repository values

Root Cause

The hourly CI job was failing when updateCNReposInfo() tried to process repositories with invalid repository field values. The function calls parseGithubRepoUrl(repository) which expects a valid string, but some documents had null, undefined, or empty string values.

Error from CI Log

TypeError: null is not an object (evaluating 'gitUrl.replace')
      at parseGithubRepoUrl (/home/runner/work/Comfy-PR/Comfy-PR/src/parseOwnerRepo.ts:9:29)
      at <anonymous> (/home/runner/work/Comfy-PR/Comfy-PR/src/updateCNReposInfo.ts:25:21)

Solution

Added an early filter in the sflow pipeline that:

  1. Checks if repository field exists and is a string
  2. Logs a warning for invalid entries
  3. Filters them out before processing

Test Plan

  • Tested filter logic with mock data (null, undefined, empty string, valid URLs)
  • Verified correct repos are processed and invalid ones are skipped
  • CI job should now complete successfully

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/91 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 10/22/2025 **Status:** ✅ Merged **Merged:** 10/22/2025 **Merged by:** [@snomiao](https://github.com/snomiao) **Base:** `main` ← **Head:** `sno-fix-pr-hourly-ci` --- ### 📝 Commits (1) - [`4ff6d66`](https://github.com/Comfy-Org/Comfy-PR/commit/4ff6d6612e8566cb8724ede2fb9f5b1f2cb15650) fix: add null check for repository field in updateCNReposInfo ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/updateCNReposInfo.ts` (+8 -0) </details> ### 📄 Description ## Summary - Adds a filter to skip processing CNRepos documents with null, undefined, or empty repository fields - Prevents `TypeError: null is not an object (evaluating 'gitUrl.replace')` in parseGithubRepoUrl() - Complements recent fixes in #87 and #85 for handling invalid repository values ## Root Cause The hourly CI job was failing when `updateCNReposInfo()` tried to process repositories with invalid `repository` field values. The function calls `parseGithubRepoUrl(repository)` which expects a valid string, but some documents had `null`, `undefined`, or empty string values. ## Error from CI Log ``` TypeError: null is not an object (evaluating 'gitUrl.replace') at parseGithubRepoUrl (/home/runner/work/Comfy-PR/Comfy-PR/src/parseOwnerRepo.ts:9:29) at <anonymous> (/home/runner/work/Comfy-PR/Comfy-PR/src/updateCNReposInfo.ts:25:21) ``` ## Solution Added an early filter in the sflow pipeline that: 1. Checks if `repository` field exists and is a string 2. Logs a warning for invalid entries 3. Filters them out before processing ## Test Plan - [x] Tested filter logic with mock data (null, undefined, empty string, valid URLs) - [x] Verified correct repos are processed and invalid ones are skipped - [ ] CI job should now complete successfully 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:09:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#89
No description provided.