-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating sonar github action to also retrieve and upload hotspots #11
Conversation
dist/index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file was uploaded just for testing purposes but it won't be merged
const { prNumber } = getGitHubContext(); | ||
const url = `${apiUrl}/issues/search?componentKeys=${encodeURIComponent( | ||
componentKey | ||
)}&resolved=false`; | ||
)}&resolved=false&ps=${MAX_PAGE_SIZE}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating page size limit to 500
Issue: #10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall but we need to make sure we're using the correct analysis inputs parameters to distinguish between issues and hotspots.
src/action.ts
Outdated
break; | ||
case "sonar": | ||
const issuesfile = await fetchOrLocateSonarResultsFile("issues"); | ||
await uploadInputFile(tool, issuesfile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function call isn't quite correct anymore. In this case, instead of tool
we need to pass "sonar_issues"
. The sonar
parameter is still supported for now but has been deprecated since we need to differentiate between issues and hotspots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the purpose of that change is because of the way the URL is built and used to upload the files to pixee, right? @drdavella
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's right, Pixeebot stores sonar issues and sonar hotspots in separate buckets so we need to upload them to different endpoints.
Related issue: #7 and #10