mappjzc opened a new issue, #2067: URL: https://github.com/apache/incubator-devlake/issues/2067
## Describe the bug The MustCompile function throws a panic instead of an error when we fill in an invalid regex setting in the .env config file or somewhere else.    As shown in the figure above, when the github plugin has been executed for a long time and finally reaches the step of EnrichPullRequestIssues, it will read the regular expression from the configuration file and execute MustCompile At this point, MustCompile fails to parse and throws panic. From the log, no error log was written at this time. There is also no line count information for the error location, the only known information is the panic sent to the config-ui MustCompile be used at lot of place. There all will be throw panic but not an error. ## To Reproduce Steps to reproduce the behavior: 1. Go to set an incorrect regex to GITHUB_PR_BODY_CLOSE_PATTERN. 2. Run github plugin with EnrichPullRequestIssues. ## Expected behavior Use error,but not panic. Maybe Compile is better than MustCompile ? ## Screenshots If applicable, add screenshots to help explain your problem. ## Additional context Add any other context about the problem here. -- 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]
