From 9194b8e4bafcd9f372ded93b5c659661e28a653b Mon Sep 17 00:00:00 2001
From: Pere Miquel Brull
Date: Sat, 8 Jan 2022 13:13:24 +0100
Subject: [PATCH] [issue-2108] - Fix PR base and add repo slug (#2109)
* Fix PR base and add repo slug
* Add SCM revision
---
.github/workflows/maven-build.yml | 4 +++-
.github/workflows/py-tests.yml | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml
index 19e402a6726..0f56c3a4751 100644
--- a/.github/workflows/maven-build.yml
+++ b/.github/workflows/maven-build.yml
@@ -60,7 +60,9 @@ jobs:
mvn -Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
-Dsonar.pullrequest.branch=${{ github.head_ref }} \
- -Dsonar.pullrequest.base=origin/main \
+ -Dsonar.pullrequest.base=main \
+ -Dsonar.pullrequest.github.repository=OpenMetadata \
+ -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} \
-Dsonar.pullrequest.provider=github clean install
- name: Build with Maven
diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml
index 227ba5b7882..54b717988c5 100644
--- a/.github/workflows/py-tests.yml
+++ b/.github/workflows/py-tests.yml
@@ -69,7 +69,9 @@ jobs:
# Add PR analysis information
echo "\nsonar.pullrequest.key=${{ github.event.pull_request.number }}" >> ingestion/sonar-project.properties
echo "sonar.pullrequest.branch=${{ github.head_ref }}" >> ingestion/sonar-project.properties
- echo "sonar.pullrequest.base=origin/main" >> ingestion/sonar-project.properties
+ echo "sonar.pullrequest.base=main" >> ingestion/sonar-project.properties
+ echo "sonar.pullrequest.github.repository=OpenMetadata" >> ingestion/sonar-project.properties
+ echo "sonar.scm.revision=${{ github.event.pull_request.head.sha }}" >> ingestion/sonar-project.properties
echo "sonar.pullrequest.provider=github" >> ingestion/sonar-project.properties
# Validate new properties