dosubot[bot] commented on issue #5207: URL: https://github.com/apache/incubator-devlake/issues/5207#issuecomment-2146755745
<!-- Greeting --> Hey @mars-esther! I'm a bot designed to help you out with bugs, questions, and becoming a contributor. How can I assist you today? <!-- Answer --> Yes, you can dynamically manage multiple repositories in Apache DevLake using the `PutScopes` API. This API allows you to create or update multiple repositories in bulk for tools like Azure DevOps and Bitbucket. Here is an example for Azure DevOps: ```go // PutScopes create or update Azure DevOps repo // @Summary create or update Azure DevOps repo // @Description Create or update Azure DevOps repo // @Tags plugins/azuredevops // @Accept application/json // @Param connectionId path int true "connection ID" // @Param scope body PutScopesReqBody true "json" // @Success 200 {object} []models.AzuredevopsRepo // @Failure 400 {object} shared.ApiBody "Bad Request" // @Failure 500 {object} shared.ApiBody "Internal Error" // @Router /plugins/azuredevops/connections/{connectionId}/scopes [PUT] func PutScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { return dsHelper.ScopeApi.PutMultiple(input) } ``` And for Bitbucket: ```go // PutScopes create or update repo // @Summary create or update repo // @Description Create or update repo // @Tags plugins/bitbucket // @Accept application/json // @Param connectionId path int true "connection ID" // @Param scope body PutScopesReqBody true "json" // @Success 200 {object} []models.BitbucketRepo // @Failure 400 {object} shared.ApiBody "Bad Request" // @Failure 500 {object} shared.ApiBody "Internal Error" // @Router /plugins/bitbucket/connections/{connectionId}/scopes [PUT] func PutScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { return dsHelper.ScopeApi.PutMultiple(input) } ``` These endpoints allow you to send a PUT request with the necessary data to create or update multiple repositories at once <sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/azuredevops_go/api/scope_api.go)</sup><sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/bitbucket/api/scope_api.go)</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: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org