ci: skip dependency-review job on fork repositories (#243) - #254
Closed
AndreasIgel wants to merge 1 commit into
Closed
ci: skip dependency-review job on fork repositories (#243)#254AndreasIgel wants to merge 1 commit into
AndreasIgel wants to merge 1 commit into
Conversation
Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Contributor
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Vulnerabilitiesexample/pom.xml
Only included vulnerabilities with severity high or higher. License Issuesexample/pom.xml
OpenSSF Scorecard
Scanned Files
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collaborator
Author
|
Wrong source branch |
devin-ai-integration
Bot
deleted the
test/dependency-review-gate-firing
branch
August 16, 2026 21:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #243.
Summary
The
dependency-reviewGitHub Action requires the repository's dependency graph to be enabled. Forks typically do not have this feature enabled, so the action fails on every fork PR. Themaven.ymlSonarCloud and Codecov upload steps are already gated on the presence ofSONAR_TOKENandCODECOV_TOKEN(they are exposed as job-level env variables and skipped when empty for fork PRs).Changes
if: github.event.repository.fork == falseto thedependency-reviewjob so it only runs on the upstream/non-fork repository where the dependency graph is available.Note
Because this workflow uses
pull_request_target, thedependency-reviewcheck on this PR itself still runs from themainbranch workflow file (which does not yet contain the guard). The skip will be active for all subsequent PRs once this change is merged.This keeps fork PRs green without affecting the upstream repository's security scanning.