diff --git a/scripts/fetchdep.sh b/scripts/fetchdep.sh index 737e87844f..81f0784ff9 100755 --- a/scripts/fetchdep.sh +++ b/scripts/fetchdep.sh @@ -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]} diff --git a/sonar-project.properties b/sonar-project.properties index b6516cb92a..47814f9d41 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -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