matan-wonderful opened a new pull request, #8911: URL: https://github.com/apache/devlake/pull/8911
### Summary This PR fixes a linker crash when `prToIssueRegexp` is empty. Normal-mode projects can enable the linker metric without a configured regexp, which currently produces a linker task with an empty regexp. `PrepareTaskData` leaves `PrToIssueRegexp` nil in that case, and `LinkPrToIssue` later panics when it calls `FindAllString` on the nil regexp. Changes: - Skip linker metric pipeline generation when `prToIssueRegexp` is empty. - Reject explicit linker task options with an empty `prToIssueRegexp`. - Add a defensive nil-regexp guard in `LinkPrToIssue`. - Add unit coverage for empty and trimmed regexp handling. ### Does this close any open issues? No linked issue. ### Screenshots Not applicable. ### Other Information Validation: - `go test ./plugins/linker/tasks ./plugins/linker/impl` - `git diff --check` I also tried `go test ./plugins/linker/...`, but the linker e2e package requires `E2E_DB_URL` and fails immediately without that environment variable. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
