Skip to content

Commit

Permalink
ci(sage-monorepo): test Sonar workflow with label-based approval (#2461)
Browse files Browse the repository at this point in the history
* Touch two oc projects

* Throw error if sonar label is missing

* Update mesage
  • Loading branch information
tschaffter authored Jan 26, 2024
1 parent 80bd375 commit 40c13c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ env:

jobs:
sonar:
if: contains(github.event.pull_request.labels.*.name, 'sonar-scan-approved')
runs-on: ubuntu-latest
steps:
- name: Check the presence of the label `sonar-scan-approved`
if: contains(github.event.pull_request.labels.*.name, 'sonar-scan-approved') != true
run: echo "Add the label 'sonar-scan-approved' to this PR to activate Sonar scan"; exit 1

- uses: actions/checkout@v3
name: Checkout ${{ env.HEAD_REPOSITORY }}:${{ env.HEAD_REF }}
with:
Expand Down
1 change: 0 additions & 1 deletion apps/openchallenges/app/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<openchallenges-google-tag-manager *ngIf="useGoogleTagManager" />
<!-- XXX -->
<openchallenges-navbar
class="mat-elevation-z6"
[title]="title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

// Add comment to trigger Sonar
@ComponentScan(basePackages = {"org.sagebionetworks.openchallenges"})
@EnableEurekaClient
@EnableFeignClients
Expand Down

0 comments on commit 40c13c0

Please sign in to comment.