Microservice architecture has been introduced as a new alternative to the monolithic architecture. It has several benefits like scalability, reliability, increase in agility and productivity, resilience to failure, ease of deployment and maintenance, and decrease in time to market. Therefore, software companies have showed a tendency to transform architecture of their legacy applications from monoliths to microservice architecture. In this transformation process, software development teams face the challenge of migration of large applications to the new architecture, where understanding the current application and reusing existing code base are important. In this paper, we propose a new approach to transform existing applications into microservices using code repositories. We use evolutionary and static code coupling information, and the graph clustering methodology, in order to automatically extract microservices from monoliths. In experimental analysis, we investigate two software projects and our approach reach up to 89% of success rate by comparing extracted microservices with the actual results.