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

Skip Codacy Checks on Forked PRs #14293

Closed
1 task
rbarkerSL opened this issue Jul 17, 2024 · 3 comments · Fixed by #16215
Closed
1 task

Skip Codacy Checks on Forked PRs #14293

rbarkerSL opened this issue Jul 17, 2024 · 3 comments · Fixed by #16215
Assignees
Labels
github_actions Pull requests that update GitHub Actions code
Milestone

Comments

@rbarkerSL
Copy link
Contributor

Background

On forked PRs codacy fails

Request(s) and Intent

Some of the checks like the Codacy reporter need an additional if condition added in order to be skipped on forked PRs (this will need to be done for any step which requires access to secrets)

Acceptance Criteria

  • Codacy is skipped on forked PRs
@rbarkerSL rbarkerSL added the github_actions Pull requests that update GitHub Actions code label Jul 17, 2024
@rbarkerSL rbarkerSL self-assigned this Jul 17, 2024
@rbarkerSL rbarkerSL assigned san-est and unassigned rbarkerSL Sep 3, 2024
@rbarkerSL
Copy link
Contributor Author

Any action that requires the use of secrets throughout the primary workflows should have the following conditional applied to it:

if: ${{ github.event.pull_request.head.repo.full_name == 'org/repo' }}

This ensures that the step requiring github secrets will only run on pull requests sourced from within the original repository (not forked repositories)

@san-est
Copy link
Contributor

san-est commented Sep 10, 2024

I've reviewed the repository and the task and I believe Codacy is setup via GUI only for this repo. What this means is that we may still skip Codacy checks on forked PRs but we would have to make the configuration through the GUI itself and we cant use the if statement in a workflow.
I don't believe I have access to the configuration through: Codacy GUI

Maybe something we can review together.

@rbarkerSL
Copy link
Contributor Author

I think we just need to skip over the bash call in the Publish to Codacy step of node-zxc-compile-application-code.yaml. There's an if check there already that we should just need to expand on without needing access to the codacy configuration gui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment