hyades icon indicating copy to clipboard operation
hyades copied to clipboard

Change Sonar to Codacy

Open sahibamittal opened this issue 2 years ago • 2 comments

Description

PR to test the sonar analysis being triggered by PRs raised from forks. This PR is being raised from my fork to test it.

Checklist

  • [x] I have read and understand the contributing guidelines
  • [ ] This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • [ ] This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • [ ] This PR introduces changes to the database model, and I have updated the migration changelog accordingly
  • [ ] This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

sahibamittal avatar Apr 25 '24 09:04 sahibamittal

@sahibamittal If this turns out to be too finicky to resolve, I think we can make the decision to simply ditch Sonar altogether. All other repos use Codacy. We could just copy-paste the solution we implemented in the other repos.

nscuro avatar May 01 '24 18:05 nscuro

@sahibamittal If this turns out to be too finicky to resolve, I think we can make the decision to simply ditch Sonar altogether. All other repos use Codacy. We could just copy-paste the solution we implemented in the other repos.

Yes, we can do that but issue I'm facing here is with downloading the artifact (before performing sonar analysis) due to error : Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'id')

It is not able to read the workflow_run.id in below script:

let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
   owner: context.repo.owner,
   repo: context.repo.repo,
   run_id: context.payload.workflow_run.id,
});

I can see artifacts beings created here.

sahibamittal avatar May 02 '24 11:05 sahibamittal

https://github.com/DependencyTrack/hyades/issues/1203

sahibamittal avatar May 24 '24 13:05 sahibamittal