dosubot[bot] commented on issue #7889:
URL: 
https://github.com/apache/incubator-devlake/issues/7889#issuecomment-2285810238

   <!-- Greeting -->
   Hey @MattiasSvenssonQred! 👋 I'm here to help you with any bugs, questions, 
or contributions while you're waiting for a human maintainer. Let's squash some 
bugs together!
   
   <!-- Answer -->
   The issue you're experiencing with regex matching for CircleCI jobs has been 
addressed in the pull request 
[#7770](https://github.com/apache/incubator-devlake/pull/7770). The changes 
made in the `job_collector.go` file include the addition of the `CollectJobs` 
function, which sets up the necessary database queries and API calls to collect 
CircleCI job data. This ensures that job names are correctly matched against 
the specified regex patterns 
<sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/circleci/tasks/job_collector.go)</sup>.
   
   To ensure data is collected and displayed in DORA metrics, you need to 
adjust the regex to match both the workflow run names and the job names. For 
example, if you want to match a job named 'deploy-job' within a workflow, you 
can use a regex like `(?i)(deploy-job)` 
<sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Configuration/CircleCI.md)</sup>.
   
   Here is how you can update the regex configuration in the DevLake UI:
   
   ```tsx
   <Input
     style={{ width: 200, margin: '0 8px' }}
     placeholder="(deploy|push-image)"
     value={transformation.deploymentPattern ?? ''}
     onChange={(e) =>
       onChangeTransformation({
         ...transformation,
         deploymentPattern: e.target.value,
         productionPattern: !e.target.value ? '' : 
transformation.productionPattern,
       })
     }
   />
   <Input
     style={{ width: 200, margin: '0 8px' }}
     placeholder="prod(.*)"
     value={transformation.productionPattern ?? ''}
     onChange={(e) =>
       onChangeTransformation({
         ...transformation,
         productionPattern: e.target.value,
       })
     }
   />
   ```
   
   By configuring these fields correctly, you can ensure that both workflow and 
job names are matched, enabling accurate data collection for DORA metrics 
<sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Configuration/CircleCI.md)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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]

Reply via email to