dosubot[bot] commented on issue #7877:
URL:
https://github.com/apache/incubator-devlake/issues/7877#issuecomment-2286663368
<!-- Answer -->
To modify your existing GitHub project to include the `gitextractor` and
`customize` plugins, you need to update the JSON configuration of your
blueprint. Here is how you can do it:
1. **Add the `gitextractor` plugin**:
- Include the `gitextractor` plugin in the `plan` array with the
necessary options.
2. **Add the `customize` plugin**:
- Include the `customize` plugin in the `plan` array with the necessary
transformation rules.
Here is the updated JSON configuration:
```json
{
"id": 10,
"name": "GHEDev-Blueprint",
"plan": [
[
{
"plugin": "org",
"subtasks": [
"setProjectMapping"
],
"options": {
"projectMappings": [
{
"projectName": "GHEDev",
"scopes": [
{
"rowId": "github:GithubRepo:1:7345",
"table": "repos"
},
{
"rowId": "github:GithubRepo:1:7345",
"table": "cicd_scopes"
},
{
"rowId": "github:GithubRepo:1:7345",
"table": "boards"
}
]
}
]
}
}
],
[
{
"plugin": "github",
"subtasks": [
"Convert Releases",
"Convert Repos",
"Extract Comments",
"Extract Events",
"Extract Issues",
"Extract Milestones",
"Extract PR Review Comments",
"Extract Pull Requests",
"Extract Users",
"Extract Workflow Runs",
"Convert Issue Assignees",
"Convert Issue Comments",
"Convert Issue Labels",
"Convert Issues",
"Convert Milestones",
"Convert PR Labels",
"Convert Pull Requests",
"Convert Workflow Runs",
"Enrich PR Issues",
"Convert PR Issues",
"Extract Jobs",
"Extract PR Commits",
"Extract PR Reviews",
"Convert Jobs",
"Convert PR Comments",
"Convert PR Commits",
"Convert PR Reviews",
"Extract User Org",
"Convert Users"
],
"options": {
"connectionId": 1,
"fullName": "INFServices/terraform-base",
"githubId": 7345,
"name": "INFServices/terraform-base"
}
}
],
[
{
"plugin": "dora",
"subtasks": [
"generateDeployments",
"generateDeploymentCommits",
"enrichPrevSuccessDeploymentCommits"
],
"options": {
"projectName": "GHEDev"
}
}
],
[
{
"plugin": "refdiff",
"subtasks": [
"calculateDeploymentCommitsDiff"
],
"options": {
"projectName": "GHEDev"
}
}
],
[
{
"plugin": "dora",
"subtasks": [
"calculateChangeLeadTime",
"ConnectIncidentToDeployment"
],
"options": {
"projectName": "GHEDev"
}
}
],
[
{
"plugin": "gitextractor",
"options": {
"url": "https://github.com/apache/incubator-devlake.git",
"repoId": "github:GithubRepo:384111310"
}
}
],
[
{
"plugin": "customize",
"options": {
"transformationRules": [
{
"table": "commit_files",
"rawDataTable": "_raw_gitlab_api_commit_files",
"rawDataParams": "{\"ConnectionId\":1,\"ProjectId\":123}",
"mapping": {
"x_file_path": "file_path",
"x_commit_sha": "commit_sha",
"x_change_type": "change_type"
}
}
]
}
}
]
],
"skipOnFail": true
}
```
### Explanation:
- **`gitextractor` Plugin**: Added with the necessary options to extract
data from the specified GitHub repository.
- **`customize` Plugin**: Added with transformation rules to populate the
`commit_files` table from the raw data table.
You can now use this updated JSON configuration to update your existing
blueprint or create a new one. This will ensure that both the `gitextractor`
and `customize` plugins are included in your project
<sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Plugins/gitextractor.md)</sup><sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/routes/blueprint/detail/components/advanced-editor/example/gitextractor.ts)</sup><sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Plugins/customize.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]