Skip to content

Commit

Permalink
add check merge of check-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust committed Jul 4, 2019
1 parent 3cba081 commit b12d9b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ coverage:
project:
app:
target: 70
threshold: 0.1
threshold: 0.2
paths: "!test/"
default:
target: 80
threshold: 0.1
threshold: 0.2
patch:
default:
target: 10
Expand Down
5 changes: 5 additions & 0 deletions tools/ci/check-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ function check_PR_limit()
LOG_ERROR "${commits} commits, limit is ${commit_limit}"
exit 1
fi
local merges=$(git log --format=%s HEAD^..HEAD | grep -i merge | wc -l)
if [ ${merges} -gt 2 ];then
LOG_ERROR "PR contain merge : ${merges}, Please rebase!"
exit 1
fi
LOG_INFO "modify ${files} files, insert ${insertions} lines, delete ${deletions} lines. Total ${commits} commits."
}

Expand Down

0 comments on commit b12d9b5

Please sign in to comment.