<commit_before>'use strict';

const actions = {
    searchRepositories () {
        if(!store.state.user.user.login)
            return;

        $github.searchRepositories(store.state.user.user.login).then(response => {
            store.commit('bindRepositories', response.data);
        }).catch(response => {
            store.commit('updatePage', { isOk: response.status == 200, status: response.statusText, message: response.body.message });
        });
    },
    getBranchs (store, repository = {}) {
        $github.branchs(store.state.user.user.login, repository).then(response => {
            store.commit('bindBranchs', response.data);
        }).catch(response => {
            store.commit('updatePage', { isOk: response.status == 200, status: response.statusText, message: response.body.message });
        });
    },
    getCommitComments (store, sha = '') {
        $github.commitComments(store.state.user.user.login, store.state.commit.repository, sha).then(response => {
            store.commit('bindComments', { sha: sha, comments: response.data });
        }).catch(response => {
            store.commit('updatePage', { isOk: response.status == 200, status: response.statusText, message: response.body.message });
        });
    }
};<commit_msg>refactor(actions): use mutation-types in the store actions<commit_after>'use strict';

const actions = {
    searchRepositories () {
        if(!store.state.user.user.login)
            return;

        $github.searchRepositories(store.state.user.user.login).then(response => {
            store.commit(types.UPDATE.REPOS, response.data);
        }).catch(response => {
            store.commit(types.UPDATE.PAGE, { isOk: response.status == 200, status: response.statusText, message: response.body.message });
        });
    },
    getBranchs (store, repository = {}) {
        $github.branchs(store.state.user.user.login, repository).then(response => {
            store.commit(types.UPDATE.BRANCHS, response.data);
        }).catch(response => {
            store.commit(types.UPDATE.PAGE, { isOk: response.status == 200, status: response.statusText, message: response.body.message });
        });
    },
    getCommitComments (store, sha = '') {
        $github.commitComments(store.state.user.user.login, store.state.commit.repository, sha).then(response => {
            store.commit(types.UPDATE.COMMENTS, { sha: sha, comments: response.data });
        }).catch(response => {
            store.commit(types.UPDATE.PAGE, { isOk: response.status == 200, status: response.statusText, message: response.body.message });
        });
    }
};
{'fraction_non_alphanumeric': 0.15761285386381024, 'fraction_numerical': 0.006885998469778117, 'mean_word_length': 2.811953352769679, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4637160', 'n_tokens_mistral': 750, 'n_tokens_neox': 729, 'n_words': 116}