Tweak sonar-project.properties (#8498)

This commit is contained in:
Michael Telatynski 2022-05-04 20:29:34 +01:00 committed by GitHub
parent d79349029a
commit cda31136b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 11 deletions

View File

@ -10,6 +10,9 @@ defbranch="$3"
rm -r "$defrepo" || true
PR_ORG=${PR_ORG:-"matrix-org"}
PR_REPO=${PR_REPO:-"matrix-react-sdk"}
# A function that clones a branch of a repo based on the org, repo and branch
clone() {
org=$1
@ -29,8 +32,7 @@ getPRInfo() {
if [ -n "$number" ]; then
echo "Getting info about a PR with number $number"
apiEndpoint="https://api.github.com/repos/${REPOSITORY:-"matrix-org/matrix-react-sdk"}/pulls/"
apiEndpoint+=$number
apiEndpoint="https://api.github.com/repos/$PR_ORG/$PR_REPO/pulls/$number"
head=$(curl $apiEndpoint | jq -r '.head.label')
fi
@ -58,7 +60,7 @@ TRY_ORG=$deforg
TRY_BRANCH=${BRANCH_ARRAY[0]}
if [[ "$head" == *":"* ]]; then
# ... but only match that fork if it's a real fork
if [ "${BRANCH_ARRAY[0]}" != "matrix-org" ]; then
if [ "${BRANCH_ARRAY[0]}" != "$PR_ORG" ]; then
TRY_ORG=${BRANCH_ARRAY[0]}
fi
TRY_BRANCH=${BRANCH_ARRAY[1]}

View File

@ -1,13 +1,6 @@
sonar.projectKey=matrix-react-sdk
sonar.organization=matrix-org
# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=matrix-react-sdk
#sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
@ -17,5 +10,5 @@ sonar.exclusions=__mocks__,docs
sonar.typescript.tsconfigPath=./tsconfig.json
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.coverage.exclusions=spec/*.ts
sonar.coverage.exclusions=test/**/*,cypress/**/*
sonar.testExecutionReportPaths=coverage/test-report.xml