Skip to content
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

ISS-552 Supports workflow dispatch action event #6

Merged
merged 11 commits into from
Mar 29, 2024

Conversation

JesusCotlamee
Copy link
Contributor

@JesusCotlamee JesusCotlamee commented Mar 21, 2024

The pixee/upload-tool-results-action has been updated to support the workflow_dispatch event in addition to the existing check_run and pull_request events.

Please note that the action will not trigger PR analysis for workflow_dispatch events. Instead, it will solely handle the upload of the specified tool results file provided through the file input. Additionally, it will initiate the analysis trigger for the uploaded file.

After reviewing the push event, it may not be necessary for SonarCloud, as SonarCloud is triggered when pushing and finishes between the check_run (already supported by the pixee action). However, it might be an option to implement it when the analysis is different from SonarCloud, for example, Semgrep. But before running the pixee action, we would need something that creates the file and passes it in the file property.

Evidence
You can review the following pull request. The first suggestion is created upon the completion of SonarCloud by the check_run event, while the second suggestion is created by the workflow dispatch event

Refs: ISS-552-supports-workflow-dispatch-actions-events
Refs: ISS-552-supports-workflow-dispatch-actions-events
Refs: ISS-552-supports-workflow-dispatch-actions-events
Refs: ISS-552-supports-workflow-dispatch-actions-events
@JesusCotlamee JesusCotlamee requested review from rduran0 and fjpgtt March 21, 2024 22:47
@JesusCotlamee JesusCotlamee self-assigned this Mar 21, 2024
Copy link

@fjpgtt fjpgtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the examples of the workflows runs adnt he PR created in those cases?

README.md Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
src/github.ts Outdated Show resolved Hide resolved
src/github.ts Outdated Show resolved Hide resolved
Refs: ISS-552-supports-workflow-dispatch-actions-events
@JesusCotlamee JesusCotlamee requested a review from fjpgtt March 25, 2024 20:56
src/github.ts Outdated Show resolved Hide resolved
src/github.ts Outdated Show resolved Hide resolved
src/sonar.ts Outdated Show resolved Hide resolved
@fjpgtt
Copy link

fjpgtt commented Mar 26, 2024

Can you add the links to workflow rusn where you show that it still works for the other types and the dispatch now works also

Refs: ISS-552-supports-workflow-dispatch-actions-events
@JesusCotlamee
Copy link
Contributor Author

Can you add the links to workflow rusn where you show that it still works for the other types and the dispatch now works also

Of course, updated pull request description

@JesusCotlamee JesusCotlamee requested a review from fjpgtt March 27, 2024 00:33
Refs: ISS-552-supports-workflow-dispatch-actions-events
Copy link

@fjpgtt fjpgtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only check my comment

src/github.ts Outdated Show resolved Hide resolved
Refs: ISS-552-supports-workflow-dispatch-actions-events
@JesusCotlamee JesusCotlamee requested a review from fjpgtt March 27, 2024 16:46
@gilday
Copy link
Contributor

gilday commented Mar 28, 2024

Recall that the scope of ISS-552 is limited to just the file upload. That's all we need from workflow_dispatch to workaround a weird demo scenario.

The action will not trigger PR analysis in for workflow_dispatch events: it will only upload the tool results file specified by the file input.

I'd be happy to stash the PR trigger logic in a branch, but I'm leaning towards not merging it until we have a use case for it. @ryandens does that make sense to you too?

Refs: ISS-552-supports-workflow-dispatch-actions-events
Refs: ISS-552-supports-workflow-dispatch-actions-events
dist/index.js Outdated Show resolved Hide resolved
Refs: ISS-552-supports-workflow-dispatch-actions-events
@gilday gilday self-requested a review March 28, 2024 19:17
@fjpgtt fjpgtt merged commit ed2c73d into main Mar 29, 2024
1 check passed
@fjpgtt fjpgtt deleted the ISS-552-supports-workflow-dispatch-actions-events branch March 29, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants