GitHub PR Decoration Configuration - Dockerfile

We are in the process of migrating to GitHub from Azure DevOps, we do our build and unit tests inside of a Dockerised environment so we don’t use the standalone tasks that Sonar provide within the GH actions workflow.

Previously in Azure DevOps I have used the following within our Dockerfile to configure PR decoration:

       dotnet sonarscanner begin \
       /k:"$SONAR_PROJECT_KEY" \
       /o:"$SONAR_ORGANIZATION_KEY" \
       /n:"$SONAR_PROJECT_NAME" \
       /d:sonar.host.url="$SONAR_HOST_URL" \
       /d:sonar.login="$SONAR_TOKEN" \
       /d:sonar.pullrequest.branch="$SONAR_ADO_BRANCH_NAME" \
       /d:sonar.pullrequest.key="$SONAR_PR_ID" \
       /d:sonar.pullrequest.vsts.instanceUrl="$SONAR_ADO_URL" \
       /d:sonar.pullrequest.vsts.project="$SONAR_ADO_PROJECT" \
       /d:sonar.pullrequest.vsts.repository="$SONAR_ADO_REPO" \
       /d:sonar.cs.vstest.reportsPaths="$SONAR_TEST_RESULTS_PATH" \
       /d:sonar.coverageReportPaths="$SONAR_CODE_COVERAGE_PATH" \
       /d:sonar.coverage.exclusions="$SONAR_COVERAGE_EXCLUSIONS"; \

Note where we are configuring pullrequest.vsts.project, pullrequest.vsts.repository and pullrequest.vsts.instanceUrl.

I just wondered what the equivalent parameters for GitHub are and if PR decoration is supported with GitHub enterprise.

I have already tried searching on the forums, but everything points to using the inbuilt task inside of a GitHub Actions Workflow - which is not an approach that would work for us.

e.g. This article here: GitHub integration

Hey there.

There are no equivalent analysis parameters for GitHub. In this case you should set up Github integration at the project level.