You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loaded #9358
I had searched in the issues and found no similar issues.
What happened
The GitHub extractApiIssues and GitHub GraphQL extractIssues subtasks report success without extracting anything when their setup fails.
Both drop the error from NewIssueRegexes, which compiles the issue regexes from the scope config (plugins/github/tasks/issue_extractor.go, plugins/github_graphql/tasks/issue_extractor.go):
So an invalid regex in the scope config (for example issueSeverity: "severity/(.*") or a failed milestone query makes the subtask return nil. The pipeline marks it successful, _tool_github_issues isn't updated, and the converters run on old data. No error is logged, so the user doesn't learn that the regex is wrong.
The PR extractors of both plugins return the same kind of error (regexp Compile prType failed), and so does the GitLab issue extractor.
What do you expect to happen
The subtask fails with the setup error, e.g. regexp Compile issueSeverity failed, like the PR extractors.
How to reproduce
Set an invalid regex such as severity/(.* as issueSeverity in a GitHub scope config and collect the repo. Extract Issues succeeds and no issues are extracted. A unit test that calls ExtractApiIssues or ExtractIssues with that scope config gets nil back.
Anything else
Proposed fix (I have a PR ready): return err instead of return nil in the three places.
Activity