This is an automated email from the ASF dual-hosted git repository.
chanjarster pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git
The following commit(s) were added to refs/heads/master by this push:
new 66da918 Update sonarcloud guide
66da918 is described below
commit 66da9186530116242e35bc68397eab4bd61c281e
Author: Daniel Qian <[email protected]>
AuthorDate: Sun Nov 17 13:25:34 2019 +0800
Update sonarcloud guide
---
_developers/cn/sonarcloud-how-to.md | 11 ++++++++++-
_developers/sonarcloud-how-to.md | 13 +++++++++++--
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/_developers/cn/sonarcloud-how-to.md
b/_developers/cn/sonarcloud-how-to.md
index e448c55..7d6b926 100755
--- a/_developers/cn/sonarcloud-how-to.md
+++ b/_developers/cn/sonarcloud-how-to.md
@@ -22,7 +22,16 @@ redirect_from:
4. 等待INFRA团队替你创建项目。然后你能在SonarCloud中看到了。
5. 根据SonarCloud中的指示修改你的`.travis.yml`
-注意:
+### 关于浅克隆
+
+Travis[默认使用浅克隆](https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth),而
SonarCloud需要commit信息,因此你需要禁用浅克隆:
+
+```yaml
+git:
+ depth: false
+```
+
+### 关于PR
因为Travis不支持在PR中启用SonarCloud集成,因此你需要对构建脚本做类似下面的改动:
diff --git a/_developers/sonarcloud-how-to.md b/_developers/sonarcloud-how-to.md
index 7937055..20ad1b6 100755
--- a/_developers/sonarcloud-how-to.md
+++ b/_developers/sonarcloud-how-to.md
@@ -22,9 +22,18 @@ This guide helps you to integrate SonarCloud in your Travis
build.
4. Wait for the INFRA team creating the project, after that you will see it at
SonarCloud.
5. Follow the SonarCloud instructions modify project's `.travis.yml`
-Notice:
+### About Shallow Clone
-Because Travis doesn't support SonarCloud in PR build, you should modify your
build script like this:
+Travis [use shallow clone by
default](https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth),
and SonarCloud needs commit information, so you need to disable shallow clone:
+
+```yaml
+git:
+ depth: false
+```
+
+### About PR
+
+Travis doesn't support SonarCloud in PR build, you should modify your build
script like this:
```bash
echo "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"