Created
September 11, 2016 15:44
-
-
Save sAbakumoff/addf6fbf1362428c7572b0e87df71bb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular_commits_type_scope <- react_angular_commits %>% | |
filter(name=="angular.js", | |
str_detect(message, "^(feat|fix|docs|style|refactor|test|chore)\\s*\\(")) %>% | |
mutate(type=trimws(str_sub(message, start=0, end=regexpr( "\\(", message ) - 1)), | |
scope=trimws(str_sub(message, | |
start=regexpr( "\\(", message ) + 1, | |
end=regexpr( "\\)", message ) - 1))) %>% | |
select(type, scope) | |
top_scope<-angular_commits_type_scope %>% | |
count(scope, sort=TRUE) %>% | |
head(10) %>% | |
select(-n) | |
angular_commits_type_scope %>% | |
inner_join(top_scope) %>% | |
count(type, scope) %>% | |
ggplot(aes(type, n, fill = scope)) + | |
geom_bar(stat = "identity", position = "dodge") + | |
labs(x = "", y = "Number of commits", fill = "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment